Refactoring docker POM 67/119567/1
authorSingal, Kapil (ks220y) <ks220y@att.com>
Mon, 22 Mar 2021 00:43:03 +0000 (20:43 -0400)
committerSingal, Kapil (ks220y) <ks220y@att.com>
Mon, 22 Mar 2021 00:43:03 +0000 (20:43 -0400)
Relacing maven-exec-plugin with maven-antrun-plugin to make it platform independent and now maven build can be run on Windows system

Adding docker.skip.run property with default value as false which can be set to true withih maven build arguments to skip image start

Issue-ID: CCSDK-3226
Signed-off-by: Singal, Kapil (ks220y) <ks220y@att.com>
Change-Id: I0009bdaf0754381c831098c493de047f80b56d65

odlsli/odlsli-alpine/pom.xml
pom.xml

index 79bd643..aff94dd 100644 (file)
         <opendaylight.root>opt/opendaylight</opendaylight.root>
 
         <ansible.gpg.key>93C4A3FD7BB9C367</ansible.gpg.key>
-        <odl.features.extra>odl-restconf-all,odl-mdsal-all,odl-mdsal-apidocs, odl-daexim-all, odl-restconf-nb-rfc8040</odl.features.extra>
+        <odl.features.extra>odl-restconf-all,odl-mdsal-all,odl-mdsal-apidocs,odl-daexim-all,odl-restconf-nb-rfc8040</odl.features.extra>
         <ccsdk.odl.features>
             ccsdk-sli-core-all,ccsdk-sli-adaptors-all,ccsdk-sli-northbound-all,ccsdk-sli-plugins-all,ccsdk-features-all
         </ccsdk.odl.features>
         <odl.boot.features.extra>${odl.features.extra},${ccsdk.odl.features}</odl.boot.features.extra>
-       <ccsdk.features.version>1.1.1</ccsdk.features.version>
-       <ccsdk.sli.core.version>1.2.0</ccsdk.sli.core.version>
+       <ccsdk.features.version>1.1.1</ccsdk.features.version>
+       <ccsdk.sli.core.version>1.2.0</ccsdk.sli.core.version>
         <ccsdk.sli.adaptors.version>1.2.0</ccsdk.sli.adaptors.version>
         <ccsdk.sli.northbound.version>1.2.0</ccsdk.sli.northbound.version>
-       <ccsdk.sli.plugins.version>1.2.0</ccsdk.sli.plugins.version>
+           <ccsdk.sli.plugins.version>1.2.0</ccsdk.sli.plugins.version>
         <ccsdk.oran.a1adapter.version>1.1.1</ccsdk.oran.a1adapter.version>
         <docker.autoCreateCustomNetworks>true</docker.autoCreateCustomNetworks>
     </properties>
                     </execution>
                 </executions>
             </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-antrun-plugin</artifactId>
+                <version>1.8</version>
+                <executions>
+                    <execution>
+                        <id>change shell permissions</id>
+                        <phase>process-sources</phase>
+                        <configuration>
+                            <target>
+                                <chmod dir="${basedir}/target/docker-stage/opt/onap/ccsdk" perm="+x" includes="**/*.sh"/>
+                            </target>
+                        </configuration>
+                        <goals>
+                            <goal>run</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <!--
             <plugin>
                 <groupId>org.codehaus.mojo</groupId>
                 <artifactId>exec-maven-plugin</artifactId>
                     </execution>
                 </executions>
             </plugin>
+            -->
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-failsafe-plugin</artifactId>
                                 </image>
                             </images>
                             <verbose>${docker.verbose}</verbose>
+                            <skipRun>${docker.skip.run}</skipRun>
                             <skipPush>${docker.skip.push}</skipPush>
                         </configuration>
                         <executions>
diff --git a/pom.xml b/pom.xml
index 5bd74ab..8be61a7 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -38,6 +38,7 @@
         <ccsdk.build.timestamp>${maven.build.timestamp}</ccsdk.build.timestamp>
         <build.number>${maven.build.timestamp}</build.number>
 
+        <docker.skip.run>false</docker.skip.run>
         <docker.skip.push>false</docker.skip.push>
         <docker.verbose>true</docker.verbose>
 
@@ -49,7 +50,7 @@
         <plugins>
             <!-- Override enforcer rule to allow compile -->
             <!-- with snapshot version of ccsdk libs     -->
-            
+
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-enforcer-plugin</artifactId>