Merge "Copy files for docker image in packages/docker/pom"
authorPamela Dragosh <pdragosh@research.att.com>
Wed, 7 Mar 2018 17:08:22 +0000 (17:08 +0000)
committerGerrit Code Review <gerrit@onap.org>
Wed, 7 Mar 2018 17:08:22 +0000 (17:08 +0000)
docker_build.sh
docker_merge.sh
docker_verify.sh
packages/docker/pom.xml

index 1548ead..d7794bf 100644 (file)
@@ -42,9 +42,6 @@ fi
 echo $MVN_MAJMIN_VERSION
 
 echo "Building $IMAGE"
-mkdir -p packages/docker/target/$IMAGE
-cp packages/docker/src/main/docker/* packages/docker/target/$IMAGE
-cp packages/install/target/install-$MVN_VERSION.zip packages/docker/target/$IMAGE/install.zip
 
 #
 # This is the local latest tagged image. The Dockerfile's need this to build images
index c87dace..c8bde37 100644 (file)
@@ -42,9 +42,6 @@ fi
 echo $MVN_MAJMIN_VERSION
 
 echo "Building $IMAGE"
-mkdir -p packages/docker/target/$IMAGE
-cp packages/docker/src/main/docker/* packages/docker/target/$IMAGE
-cp packages/install/target/install-$MVN_VERSION.zip packages/docker/target/$IMAGE/install.zip
 
 #
 # This is the local latest tagged image. The Dockerfile's need this to build images
index a6dd00a..dc40513 100644 (file)
@@ -45,9 +45,6 @@ fi
 echo $MVN_MAJMIN_VERSION
 
 echo "Building $IMAGE"
-mkdir -p packages/docker/target/$IMAGE
-cp packages/docker/src/main/docker/* packages/docker/target/$IMAGE
-cp packages/install/target/install-$MVN_VERSION.zip packages/docker/target/$IMAGE/install.zip
 
 #
 # This is the local latest tagged image. The Dockerfile's need this to build images
index 02b1d87..68b4d92 100644 (file)
@@ -29,9 +29,7 @@
                 <version>1.2.0-SNAPSHOT</version>
        </parent>
 
-       <groupId>org.onap.policy.engine</groupId>
        <artifactId>docker</artifactId>
-       <version>1.2.0-SNAPSHOT</version>
        <packaging>pom</packaging>
        <name>Policy Engine - Docker build</name>
        <description>ONAP Policy Docker Build</description>
 
        <build>
                <plugins>
+                       <plugin>
+                               <groupId>org.apache.maven.plugins</groupId>
+                               <artifactId>maven-dependency-plugin</artifactId>
+                               <executions>
+                                       <execution>
+                                               <id>copy-pe-zip</id>
+                                               <phase>prepare-package</phase>
+                                               <goals>
+                                                       <goal>copy</goal>
+                                               </goals>
+                                               <configuration>
+                                                       <outputDirectory>${project.build.directory}/policy-pe</outputDirectory>
+                                                       <overWriteReleases>false</overWriteReleases>
+                                                       <overWriteSnapshots>true</overWriteSnapshots>
+                                                       <artifactItems>
+                                                               <artifactItem>
+                                                                       <groupId>org.onap.policy.engine</groupId>
+                                                                       <artifactId>install</artifactId>
+                                                                       <version>${project.version}</version>
+                                                                       <type>zip</type>
+                                                                       <destFileName>install.zip</destFileName>
+                                                               </artifactItem>
+                                                       </artifactItems>
+                                               </configuration>
+                                       </execution>
+                               </executions>
+                       </plugin>
+                       <plugin>
+                               <artifactId>maven-resources-plugin</artifactId>
+                               <version>3.0.2</version>
+                               <executions>
+                                       <execution>
+                                               <id>copy-resources</id>
+                                               <phase>prepare-package</phase>
+                                               <goals>
+                                                       <goal>copy-resources</goal>
+                                               </goals>
+                                               <configuration>
+                                                       <outputDirectory>${project.build.directory}/policy-pe</outputDirectory>
+                                                       <resources>          
+                                                               <resource>
+                                                                       <directory>src/main/docker</directory>
+                                                                       <filtering>true</filtering>
+                                                               </resource>
+                                                       </resources>              
+                                               </configuration>            
+                                       </execution>
+                               </executions>
+                       </plugin>
       <plugin>
         <groupId>org.codehaus.mojo</groupId>
         <artifactId>exec-maven-plugin</artifactId>