Fix for snmp4sdn Karaf 4 migration 53/60553/1
authorylhsieh <ylhsieh@itri.org.tw>
Wed, 19 Jul 2017 07:50:35 +0000 (15:50 +0800)
committerylhsieh <ylhsieh@itri.org.tw>
Wed, 19 Jul 2017 08:54:48 +0000 (16:54 +0800)
Change-Id: I9b4bc5e32fa80971b5d95517d71814a30e949475
Signed-off-by: ylhsieh <ylhsieh@itri.org.tw>
distribution-karaf/pom.xml
features/features-snmp4sdn/pom.xml
features/features-snmp4sdn/src/main/features/features.xml [moved from features/features-snmp4sdn/src/main/resources/features.xml with 100% similarity]
features/features4-snmp4sdn/pom.xml
plugin-shell/src/main/resources/org/opendaylight/blueprint/blueprint/blueprint.xml [moved from plugin-shell/src/main/resources/OSGI-INF/blueprint/blueprint.xml with 100% similarity]

index d98fee83c633ce3f19cb76f2a8a5da3d14c41836..2c6430a2dc9b0c34d163e10be77f49452fdf0205 100644 (file)
@@ -3,7 +3,7 @@
   <modelVersion>4.0.0</modelVersion>
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
-    <artifactId>karaf-parent</artifactId>
+    <artifactId>karaf4-parent</artifactId>
     <version>1.9.0-SNAPSHOT</version>
     <relativePath/>
   </parent>
@@ -12,7 +12,7 @@
   <version>0.6.0-SNAPSHOT</version>
   <packaging>pom</packaging>
 
-  <name>Karaf distribution</name>
+  <name>snmp4sdn Karaf distribution</name>
   <description>distribution with Karaf</description>
   <url>https://wiki.opendaylight.org/view/SNMP4SDN:Main</url>
   
index 27ee716970819b938959fe964e2b49c7e72d6957..ed75fd5936723c23497985b711592378a6dbee95 100755 (executable)
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">\r
     <modelVersion>4.0.0</modelVersion>\r
 \r
-    <!--ODL suggests this\r
     <parent>\r
       <groupId>org.opendaylight.odlparent</groupId>\r
       <artifactId>features-parent</artifactId>\r
       <version>1.8.0-SNAPSHOT</version>\r
       <relativePath />\r
-    </parent>-->\r
-\r
-    <parent>\r
-        <groupId>org.opendaylight.snmp4sdn</groupId>\r
-        <artifactId>commons.snmp4sdn</artifactId>\r
-        <version>0.6.0-SNAPSHOT</version>\r
-        <relativePath>../../commons/snmp4sdn</relativePath>\r
     </parent>\r
 \r
     <artifactId>features-snmp4sdn</artifactId>\r
     <groupId>org.opendaylight.snmp4sdn</groupId>\r
     <version>0.6.0-SNAPSHOT</version>\r
-    <!--<packaging>jar</packaging>--><!--TODO: whether given this tag or not, doesn't seem harm. Other project seems not to put this tag, so we ignore it too-->\r
 \r
     <!--<name>snmp4sdn features</name>-->\r
     <description>features of snmp4sdn</description>\r
@@ -65,6 +56,9 @@
         <feature.test.version>1.9.0-SNAPSHOT</feature.test.version><!--referencing to other projects, usually is 1.8.0-SNAPSHOT after version bump for Lithium-->\r
         <karaf.empty.version>1.9.0-SNAPSHOT</karaf.empty.version>\r
         <surefire.version>2.16</surefire.version>\r
+        <!--the following yangtools.version and mdsal.version are copied from ../../commons/snmp4sdn/pom.xml-->\r
+        <yangtools.version>1.1.0-SNAPSHOT</yangtools.version>\r
+        <mdsal.version>1.5.0-SNAPSHOT</mdsal.version>\r
         <restconf.version>1.6.0-SNAPSHOT</restconf.version>\r
         <mdsal.model.version>0.11.0-SNAPSHOT</mdsal.model.version>\r
         <openflowplugin.version>0.5.0-SNAPSHOT</openflowplugin.version>\r
         </dependency>\r
     </dependencies>\r
 \r
-    <build>\r
-        <resources>\r
-            <resource>\r
-                <directory>src/main/resources</directory>\r
-                <filtering>true</filtering>\r
-            </resource>\r
-            </resources>\r
-            <plugins>\r
-                <plugin>\r
-                    <groupId>org.apache.maven.plugins</groupId>\r
-                    <artifactId>maven-resources-plugin</artifactId>\r
-                    <version>2.7</version>\r
-                    <executions>\r
-                         <execution>\r
-                             <id>filter</id>\r
-                             <phase>generate-resources</phase>\r
-                             <goals>\r
-                                 <goal>resources</goal>\r
-                             </goals>\r
-                        </execution>\r
-                    </executions>\r
-               </plugin>\r
-               <plugin>\r
-                    <groupId>org.codehaus.mojo</groupId>\r
-                    <artifactId>build-helper-maven-plugin</artifactId>\r
-                    <version>1.9.1</version>\r
-                    <executions>\r
-                        <execution>\r
-                        <id>attach-artifacts</id>\r
-                        <phase>package</phase>\r
-                        <goals>\r
-                            <goal>attach-artifact</goal>\r
-                        </goals>\r
-                        <configuration>\r
-                            <artifacts>\r
-                                <artifact>\r
-                                   <file>${project.build.directory}/classes/${features.file}</file>\r
-                                   <type>xml</type>\r
-                                   <classifier>features</classifier>\r
-                                </artifact>\r
-                            </artifacts>\r
-                        </configuration>\r
-                    </execution>\r
-                </executions>\r
-            </plugin>\r
-            <!--\r
-            TODO: with the plugin below, build code fail as the error shown in the link below (but the code could be built successfully earlier)\r
-            https://jenkins.opendaylight.org/releng/job/snmp4sdn-verify-boron/jdk=openjdk7,nodes=dynamic_verify/15/consoleFull\r
-            We don't know why but other projects seems no such code (even, no <build> section in pom), so we skip the code here.\r
-            -->\r
-            <!--<plugin>\r
-                <groupId>org.apache.maven.plugins</groupId>\r
-                <artifactId>maven-surefire-plugin</artifactId>\r
-                <version>${surefire.version}</version>\r
-                <configuration>\r
-                    <systemPropertyVariables>\r
-                        <karaf.distro.groupId>org.opendaylight.controller</karaf.distro.groupId>\r
-                        <karaf.distro.artifactId>opendaylight-karaf-empty</karaf.distro.artifactId>\r
-                        <karaf.distro.version>${karaf.empty.version}</karaf.distro.version>\r
-                    </systemPropertyVariables>\r
-                    <dependenciesToScan>\r
-                        <dependency>org.opendaylight.odlparent:features-test</dependency>< ! - -modify "yangtools" to "odlparent", as gerrit 16240 - - >\r
-                    </dependenciesToScan>\r
-                </configuration>\r
-            </plugin>-->\r
-        </plugins>\r
-    </build>\r
 </project>\r
index 743a82da0f69cbfe19a9f3602e8c64e13baa42bd..84f0d969b78e859498c9ef06e6c19c6d2458a922 100755 (executable)
       <url>${nexus.site.url}/${project.artifactId}/</url>\r
     </site>\r
   </distributionManagement>\r
-\r
-  <!--This feature build fails due to SingleFeatureTest error, so far can't solve-->\r
-  <!--workaround: just copy the maven-surefire-plugin settings from the parent pom, as below, then the SingleFeatureTest is omitted-->\r
-  <build>\r
-    <plugins>\r
-      <plugin>\r
-        <groupId>org.apache.maven.plugins</groupId>\r
-        <artifactId>maven-surefire-plugin</artifactId>\r
-        <configuration>\r
-          <!--<skipTests>true</skipTests>--><!--I think using skipTests can cover the following, not yet try-->\r
-          <skip>false</skip>\r
-          <dependenciesToScan>\r
-            <dependency>org.opendaylight.odlparent:feature4-test</dependency>\r
-          </dependenciesToScan>\r
-        </configuration>\r
-      </plugin>\r
-    </plugins>\r
-  </build>\r
 </project>\r
-\r