summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVenkata Harish K Kajur <vk250x@att.com>2017-02-20 15:03:27 +0000
committerVenkata Harish K Kajur <vk250x@att.com>2017-02-20 15:03:44 +0000
commit7611e1d4ae2b3406b29c37a2982da318744a5b8d (patch)
tree556ff3c7f5f9d9b339b4c6a71dc1b817a3534858
parent1d3a119024573301c33338ce072517b7b5d5f46c (diff)
Move docker plugins into profile
Change-Id: Ia2d08084551b1f9b881149396f542f64667a2116 Signed-off-by: Venkata Harish K Kajur <vk250x@att.com>
-rw-r--r--pom.xml93
1 files changed, 52 insertions, 41 deletions
diff --git a/pom.xml b/pom.xml
index eb35867..4facdd7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -233,47 +233,6 @@
<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. -->
@@ -354,5 +313,57 @@
</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>