- <groupId>com.spotify</groupId>
- <artifactId>docker-maven-plugin</artifactId>
- <configuration>
- <skipDocker>false</skipDocker>
- <imageName>${docker.repository}/onap/${project.groupId}.${project.artifactId}</imageName>
- <dockerDirectory>${project.basedir}</dockerDirectory>
- <resources>
- <resource>
- <targetPath>${project.basedir}</targetPath>
- <directory>${project.build.directory}</directory>
- <include>${project.build.finalName}.jar</include>
- </resource>
- </resources>
- <imageTags>
- <imageTag>${project.version}</imageTag>
- <imageTag>latest</imageTag>
- </imageTags>
- </configuration>
- </plugin>
+ <groupId>com.spotify</groupId>
+ <artifactId>dockerfile-maven-plugin</artifactId>
+ <version>1.4.3</version>
+ <configuration>
+ <contextDirectory>${project.basedir}</contextDirectory>
+ <repository>${docker.repository}/${docker.image.name}</repository>
+ <imageTags>
+ <tag>${project.version}</tag>
+ <tag>latest</tag>
+ <tag>${project.version}-${maven.build.timestamp}Z</tag>
+ </imageTags>
+ <useMavenSettingsForAuth>true</useMavenSettingsForAuth>
+ <buildArgs>
+ <PROJECT_BUILD_DIR_NAME>target</PROJECT_BUILD_DIR_NAME>
+ <DEPENDENCIES_DIR>${dependency.dir.name}</DEPENDENCIES_DIR>
+ <DOCKER_ARTIFACT_DIR>/opt</DOCKER_ARTIFACT_DIR>
+ <FINAL_JAR>${project.build.finalName}.jar</FINAL_JAR>
+ </buildArgs>
+ </configuration>
+ <executions>
+ <execution>
+ <id>default</id>
+ <phase>install</phase>
+ <goals>
+ <goal>build</goal>
+ <goal>push</goal>
+ </goals>
+ </execution>
+ </executions>
+
+ </plugin>