Move docker plugins into profile 19/919/1
authorVenkata Harish K Kajur <vk250x@att.com>
Mon, 20 Feb 2017 15:03:27 +0000 (15:03 +0000)
committerVenkata Harish K Kajur <vk250x@att.com>
Mon, 20 Feb 2017 15:03:44 +0000 (15:03 +0000)
Change-Id: Ia2d08084551b1f9b881149396f542f64667a2116
Signed-off-by: Venkata Harish K Kajur <vk250x@att.com>
pom.xml

diff --git a/pom.xml b/pom.xml
index eb35867..4facdd7 100644 (file)
--- a/pom.xml
+++ b/pom.xml
                                <artifactId>maven-compiler-plugin</artifactId>
                                <version>3.1</version>
                        </plugin>
-                       <plugin>
-                               <groupId>org.apache.maven.plugins</groupId>
-                               <artifactId>maven-resources-plugin</artifactId>
-                               <version>2.7</version>
-                               <executions>
-                                       <execution>
-                                               <id>copy-docker-file</id>
-                                               <phase>package</phase>
-                                               <goals>
-                                                       <goal>copy-resources</goal>
-                                               </goals>
-                                               <configuration>
-                                                       <outputDirectory>target</outputDirectory>
-                                                       <overwrite>true</overwrite>
-                                                       <resources>
-                                                               <resource>
-                                                                       <directory>${basedir}/src/main/docker</directory>
-                                                                       <filtering>true</filtering>
-                                                                       <includes>
-                                                                               <include>**/*</include>
-                                                                       </includes>
-                                                               </resource>
-                                                       </resources>
-                                               </configuration>
-                                       </execution>
-                               </executions>
-                       </plugin>
-                       <plugin>
-                               <groupId>com.spotify</groupId>
-                               <artifactId>docker-maven-plugin</artifactId>
-                               <version>0.4.11</version>
-                               <configuration>         
-                                       <serverId>nexus3.openecomp.org:10003</serverId>
-                                       <imageName>${docker.registry}/ecomp/${project.artifactId}</imageName>                                   
-                                       <imageTags>
-                                               <imageTag>${docker.imagetag}</imageTag>
-                                               <imageTag>latest</imageTag>
-                                       </imageTags>
-                                       <forceTags>true</forceTags>
-                               </configuration>
-                       </plugin>
                
                        <!-- Checkstyle plugin - used to report on compliance with -->
                        <!-- the Google style guide. -->
                </plugins>              
        </build>
        
+       <profiles>
+          <profile>
+             <id>docker</id>
+             <build>
+              <defaultGoal>docker:build</defaultGoal>
+                <plugins>
+                       <plugin>
+                               <groupId>org.apache.maven.plugins</groupId>
+                               <artifactId>maven-resources-plugin</artifactId>
+                               <version>2.7</version>
+                               <executions>
+                                       <execution>
+                                               <id>copy-docker-file</id>
+                                               <phase>package</phase>
+                                               <goals>
+                                                       <goal>copy-resources</goal>
+                                               </goals>
+                                               <configuration>
+                                                       <outputDirectory>target</outputDirectory>
+                                                       <overwrite>true</overwrite>
+                                                       <resources>
+                                                               <resource>
+                                                                       <directory>${basedir}/src/main/docker</directory>
+                                                                       <filtering>true</filtering>
+                                                                       <includes>
+                                                                               <include>**/*</include>
+                                                                       </includes>
+                                                               </resource>
+                                                       </resources>
+                                               </configuration>
+                                       </execution>
+                               </executions>
+                       </plugin>
+                       <plugin>
+                               <groupId>com.spotify</groupId>
+                               <artifactId>docker-maven-plugin</artifactId>
+                               <version>0.4.11</version>
+                               <configuration>         
+                                       <serverId>nexus3.openecomp.org:10003</serverId>
+                                       <imageName>${docker.registry}/ecomp/${project.artifactId}</imageName>                                   
+                                       <dockerDirectory>${docker.location}</dockerDirectory>
+                                       <imageTags>
+                                               <imageTag>${docker.imagetag}</imageTag>
+                                               <imageTag>latest</imageTag>
+                                       </imageTags>
+                                       <forceTags>true</forceTags>
+                               </configuration>
+                       </plugin>
+                </plugins>
+             </build>
+          </profile>
+       </profiles>
        
 </project>