summaryrefslogtreecommitdiffstats
path: root/datacollector/pom.xml
diff options
context:
space:
mode:
Diffstat (limited to 'datacollector/pom.xml')
-rw-r--r--datacollector/pom.xml54
1 files changed, 50 insertions, 4 deletions
diff --git a/datacollector/pom.xml b/datacollector/pom.xml
index 141d212..db59334 100644
--- a/datacollector/pom.xml
+++ b/datacollector/pom.xml
@@ -28,10 +28,6 @@
<version>0.0.1-SNAPSHOT</version>
</parent>
- <properties>
- <docker-image.name.prefix>org.onap.rapp.datacollector</docker-image.name.prefix>
- </properties>
-
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
@@ -90,6 +86,56 @@
<build>
<plugins>
<plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.8</version>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <configuration>
+ <target>
+ <copy file="target/${project.artifactId}-${project.version}.jar" tofile="./docker/${project.artifactId}-${project.version}.jar"/>
+ </target>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>io.fabric8</groupId>
+ <artifactId>docker-maven-plugin</artifactId>
+ <version>${docker-maven-plugin.version}</version>
+ <executions>
+ <execution>
+ <id>docker-build-image</id>
+ <phase>install</phase>
+ <goals>
+ <goal>build</goal>
+ <goal>push</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <skipPush>${skipDockerPush}</skipPush>
+ <verbose>true</verbose>
+ <imagePullPolicy>IfNotPresent</imagePullPolicy>
+ <images>
+ <image>
+ <name>${docker-image.namespace}/${docker-image.name.prefix}/${project.artifactId}</name>
+ <registry>${docker.registry}</registry>
+ <build>
+ <dockerFileDir>${project.basedir}/docker</dockerFileDir>
+ <tags>
+ <tag>${project.version}-${maven.build.timestamp}Z</tag>
+ </tags>
+ </build>
+ </image>
+ </images>
+ </configuration>
+ </plugin>
+ <plugin>
<groupId>com.github.kongchen</groupId>
<artifactId>swagger-maven-plugin</artifactId>
<version>${swagger.maven.plugin.version}</version>