From: Martin Vitez Date: Fri, 4 Oct 2013 14:26:12 +0000 (+0200) Subject: Added test for OSGi metadata. X-Git-Tag: release/helium~718 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=commitdiff_plain;h=0b096ed320120859d43377bba9164b5a67b3a515;p=yangtools.git Added test for OSGi metadata. Change-Id: I225ffa4b5b85fda03e31b238f51151fd89bb6b17 Signed-off-by: Martin Vitez --- diff --git a/code-generator/binding-java-api-generator/pom.xml b/code-generator/binding-java-api-generator/pom.xml index 57c1066a8c..6666e155a6 100644 --- a/code-generator/binding-java-api-generator/pom.xml +++ b/code-generator/binding-java-api-generator/pom.xml @@ -30,6 +30,10 @@ ${project.groupId}.${project.artifactId} + + !org.sonatype.plexus.build.incremental, + * + @@ -60,6 +64,7 @@ junit junit + test org.eclipse.xtend diff --git a/code-generator/maven-sal-api-gen-plugin/pom.xml b/code-generator/maven-sal-api-gen-plugin/pom.xml index dc77859ec9..d5bc18d4d9 100644 --- a/code-generator/maven-sal-api-gen-plugin/pom.xml +++ b/code-generator/maven-sal-api-gen-plugin/pom.xml @@ -78,6 +78,11 @@ ${project.groupId}.${project.artifactId} + + !org.apache.maven.plugin.logging, + !org.apache.maven.project + * + diff --git a/yang/yang-model-util/pom.xml b/yang/yang-model-util/pom.xml index 5f6d18ee41..8e8efe23d2 100644 --- a/yang/yang-model-util/pom.xml +++ b/yang/yang-model-util/pom.xml @@ -41,6 +41,15 @@ org.eclipse.xtend xtend-maven-plugin + + org.apache.felix + maven-bundle-plugin + + + ${project.groupId}.${project.artifactId} + + + diff --git a/yangtools-it/pom.xml b/yangtools-it/pom.xml new file mode 100644 index 0000000000..789582a087 --- /dev/null +++ b/yangtools-it/pom.xml @@ -0,0 +1,151 @@ + + + + + + + yangtools + org.opendaylight.yangtools + 0.6.2-SNAPSHOT + + + 4.0.0 + yangtools-it + + + 3.0.0 + + + + + thirdparty + thirdparty + ${nexusproxy}/repositories/thirdparty/ + + + + + + junit + junit + test + + + org.ops4j.pax.exam + pax-exam-container-native + ${exam.version} + test + + + org.ops4j.pax.exam + pax-exam-junit4 + ${exam.version} + test + + + org.ops4j.pax.exam + pax-exam-link-mvn + ${exam.version} + test + + + equinoxSDK381 + org.eclipse.osgi + 3.8.1.v20120830-144521 + test + + + ch.qos.logback + logback-classic + 1.0.9 + + + org.sonatype.plexus + plexus-build-api + + + org.codehaus.plexus + plexus-slf4j-logging + + + + org.opendaylight.yangtools + yang-data-util + ${project.parent.version} + test + + + org.opendaylight.yangtools + maven-sal-api-gen-plugin + ${project.parent.version} + test + + + org.opendaylight.yangtools.thirdparty + antlr4-runtime-osgi-nohead + 4.0 + test + + + org.opendaylight.yangtools.thirdparty + xtend-lib-osgi + 2.4.3 + test + + + + + + + org.ops4j.pax.exam + maven-paxexam-plugin + 1.2.4 + + + generate-config + + generate-depends-file + + + + + + + + + + org.eclipse.m2e + lifecycle-mapping + 1.0.0 + + + + + + org.ops4j.pax.exam + + maven-paxexam-plugin + + [1.2.4,) + + generate-depends-file + + + + + + + + + + + + + + + diff --git a/yangtools-it/src/test/java/BundleStartTest.java b/yangtools-it/src/test/java/BundleStartTest.java new file mode 100644 index 0000000000..f005f35526 --- /dev/null +++ b/yangtools-it/src/test/java/BundleStartTest.java @@ -0,0 +1,117 @@ +/* + * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.ops4j.pax.exam.CoreOptions.*; + +import java.util.ArrayList; +import java.util.List; + +import javax.inject.Inject; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.ops4j.pax.exam.Configuration; +import org.ops4j.pax.exam.Option; +import org.ops4j.pax.exam.junit.PaxExam; +import org.osgi.framework.Bundle; +import org.osgi.framework.BundleContext; +import org.osgi.framework.BundleException; + +@RunWith(PaxExam.class) +public class BundleStartTest { + private static final String GROUP = "org.opendaylight.yangtools"; + + @Inject + BundleContext ctx; + + private List