- mavenBundle(YANGTOOLS_MODELS,"yang-ext").versionAsInProject(),
- mavenBundle(YANGTOOLS_MODELS,"ietf-inet-types").versionAsInProject(),
- mavenBundle(YANGTOOLS_MODELS,"ietf-yang-types").versionAsInProject(),
- mavenBundle(YANGTOOLS_MODELS,"opendaylight-l2-types").versionAsInProject(),
- mavenBundle(CONTROLLER_MODELS,"model-flow-base").versionAsInProject(),
- mavenBundle(CONTROLLER_MODELS,"model-flow-service").versionAsInProject(),
- mavenBundle(CONTROLLER_MODELS,"model-inventory").versionAsInProject(),
- junitAndMockitoBundles()
- );
- }
-
-
- public static Option junitAndMockitoBundles() {
- return new DefaultCompositeOption(
- // Repository required to load harmcrest (OSGi-fied version).
- repository("http://repository.springsource.com/maven/bundles/external").id(
- "com.springsource.repository.bundles.external"),
-
- // Mockito without Hamcrest and Objenesis
- mavenBundle("org.mockito", "mockito-all", "1.9.5"),
-
- // Hamcrest with a version matching the range expected by Mockito
- //mavenBundle("org.hamcrest", "com.springsource.org.hamcrest.core", "1.1.0"),
-
- // Objenesis with a version matching the range expected by Mockito
- //wrappedBundle(mavenBundle("org.objenesis", "objenesis", "1.2"))
- // .exports("*;version=1.2"),
-
- // The default JUnit bundle also exports Hamcrest, but with an (incorrect) version of
- // 4.9 which does not match the Mockito import. When deployed after the hamcrest bundles, it gets
- // resolved correctly.
- junitBundles(),
-
- /*
- * Felix has implicit boot delegation enabled by default. It conflicts with Mockito:
- * java.lang.LinkageError: loader constraint violation in interface itable initialization:
- * when resolving method "org.osgi.service.useradmin.User$$EnhancerByMockitoWithCGLIB$$dd2f81dc
- * .newInstance(Lorg/mockito/cglib/proxy/Callback;)Ljava/lang/Object;" the class loader
- * (instance of org/mockito/internal/creation/jmock/SearchingClassLoader) of the current class,
- * org/osgi/service/useradmin/User$$EnhancerByMockitoWithCGLIB$$dd2f81dc, and the class loader
- * (instance of org/apache/felix/framework/BundleWiringImpl$BundleClassLoaderJava5) for interface
- * org/mockito/cglib/proxy/Factory have different Class objects for the type org/mockito/cglib/
- * proxy/Callback used in the signature
- *
- * So we disable the bootdelegation. this property has no effect on the other OSGi implementation.
- */
- frameworkProperty("felix.bootdelegation.implicit").value("false")
- );