Fix NoClassDefFoundError (related to c/48901) 93/50293/2
authorMichael Vorburger <vorburger@redhat.com>
Wed, 11 Jan 2017 13:43:40 +0000 (14:43 +0100)
committerVratko Polák <vrpolak@cisco.com>
Wed, 11 Jan 2017 17:04:55 +0000 (17:04 +0000)
Change-Id: Ice79416edcfd2807474ca72528a4a6ce16ef59f5
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
features-test/pom.xml

index cbf26d5e57214e827722a5edcfa14a86fba8e111..056c5e5a32494aa46b3e7dcb9e09615f7d67b272 100644 (file)
             <classifier>features</classifier>
             <type>xml</type>
         </dependency>
-        <!-- test to validate features.xml -->
-        <dependency>
-            <groupId>org.opendaylight.odlparent</groupId>
-            <artifactId>features-test</artifactId>
-            <version>${feature.odlparent.version}</version>
-            <scope>test</scope>
-        </dependency>
+        <!-- ****************************************************************************************
+                *** DO NOT ADD a <dependency> to org.opendaylight.odlparent:features-test here! ***
+               Since the introduction of the bundles-test, this lead to very weird following error:
+               java.lang.NoClassDefFoundError: Could not initialize class org.opendaylight.odlparent.featuretest.SingleFeatureTest
+               The features-test (and the bundles-test through a transitive dependency from it)
+               are already on the classpath transitively from the previous dependency above,
+               so it works without repeating it here.  Why repeating it here, which should
+               have no effect in Maven, leads to the NoClassDefFoundError, is one of the
+               currently unsolved mysteries of the universe.
+             **************************************************************************************** -->
         <!-- dependency for opendaylight-karaf-empty for use by testing -->
         <dependency>
             <groupId>org.opendaylight.odlparent</groupId>