Handle odl-mdsal-common with Karaf 4.0.9 07/54607/1
authorStephen Kitt <skitt@redhat.com>
Mon, 10 Apr 2017 15:00:17 +0000 (17:00 +0200)
committerStephen Kitt <skitt@redhat.com>
Mon, 10 Apr 2017 15:00:17 +0000 (17:00 +0200)
Karaf 4.0.9 simplifies feature dependencies (so that dependencies
specified in feature.xml can be completed from the POM), but that
causes issues with odl-mdsal-common since features in Karaf are
identified by their name only:

* if both the controller odl-mdsal-common and the mdsal
  odl-mdsal-common are encountered in the dependency tree, whichever
  one came first (as dependencies are resolved) is the one that ends
  up being kept;
* in some circumstances, the mdsal repository replaces controller's
  even when the controller dependency is retained (this is a Karaf bug
  which I'll submit a patch for, but we can work around it).

Change-Id: I5400a829560ae96cb2f264e103020cccd1d225c3
Signed-off-by: Stephen Kitt <skitt@redhat.com>
features/mdsal/odl-mdsal-broker-local/pom.xml
features/mdsal/odl-mdsal-broker-local/src/main/feature/feature.xml

index 3ba139a950b7e5ea87c5f987b7861241818d3776..b947c7e0d8b7b94d5035e1cc6bd14fea3784210f 100644 (file)
     </dependencyManagement>
 
     <dependencies>
     </dependencyManagement>
 
     <dependencies>
+        <dependency>
+            <!-- This needs to come first, otherwise mdsal's odl-mdsal-common is picked instead -->
+            <groupId>org.opendaylight.controller</groupId>
+            <artifactId>odl-mdsal-common</artifactId>
+            <type>xml</type>
+            <classifier>features</classifier>
+        </dependency>
         <dependency>
             <groupId>org.opendaylight.yangtools</groupId>
             <artifactId>odl-yangtools-common</artifactId>
         <dependency>
             <groupId>org.opendaylight.yangtools</groupId>
             <artifactId>odl-yangtools-common</artifactId>
             <type>xml</type>
             <classifier>features</classifier>
         </dependency>
             <type>xml</type>
             <classifier>features</classifier>
         </dependency>
-        <dependency>
-            <groupId>org.opendaylight.controller</groupId>
-            <artifactId>odl-mdsal-common</artifactId>
-            <type>xml</type>
-            <classifier>features</classifier>
-        </dependency>
         <dependency>
             <groupId>org.opendaylight.controller</groupId>
             <artifactId>odl-config-startup</artifactId>
         <dependency>
             <groupId>org.opendaylight.controller</groupId>
             <artifactId>odl-config-startup</artifactId>
index ff4c8d4977e2a216eb55268505ad22cd1eb4028c..c808b4859bbaf37987a84518c13ad5eb38fd8379 100644 (file)
@@ -7,6 +7,8 @@
  and is available at http://www.eclipse.org/legal/epl-v10.html
  -->
 <features name="odl-mdsal-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.2.0">
  and is available at http://www.eclipse.org/legal/epl-v10.html
  -->
 <features name="odl-mdsal-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.2.0">
+    <!-- This needs to be added manually until we resolve the odl-mdsal-common situation -->
+    <repository>mvn:org.opendaylight.controller/odl-mdsal-common/${project.version}/xml/features</repository>
     <feature name="odl-mdsal-broker-local" version="${project.version}">
         <bundle start-level="70">mvn:org.opendaylight.controller/sal-schema-service/${project.version}</bundle>
         <bundle start-level="40">mvn:org.opendaylight.controller/blueprint/${blueprint.version}</bundle>
     <feature name="odl-mdsal-broker-local" version="${project.version}">
         <bundle start-level="70">mvn:org.opendaylight.controller/sal-schema-service/${project.version}</bundle>
         <bundle start-level="40">mvn:org.opendaylight.controller/blueprint/${blueprint.version}</bundle>