xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.onap.oparent</groupId>
+ <artifactId>oparent</artifactId>
+ <version>1.2.1</version>
+ </parent>
+
<groupId>org.onap.pnfsimulator</groupId>
<artifactId>pnf-simulator</artifactId>
<version>2.0.0-SNAPSHOT</version>
<version>${junit.jupiter.version}</version>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.junit.vintage</groupId>
- <artifactId>junit-vintage-engine</artifactId>
- <version>${junit.vintage.version}</version>
- <scope>test</scope>
- </dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<build>
<plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <configuration>
+ <descriptor>src/assembly/resources.xml</descriptor>
+ <finalName>${project.artifactId}-${pom.version}</finalName>
+ </configuration>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<artifactId>docker-maven-plugin</artifactId>
<version>1.0.0</version>
<configuration>
- <serverId>${onap.nexus.dockerregistry.daily}</serverId>
- <imageName>${docker.image.name}</imageName>
+ <registryUrl>${onap.nexus.dockerregistry.daily}</registryUrl>
+ <imageName>${onap.nexus.dockerregistry.daily}/${docker.image.name}</imageName>
+ <forceTags>true</forceTags>
<imageTags>
<tag>latest</tag>
+ <tag>${project.version}</tag>
+ <tag>${project.version}-${maven.build.timestamp}</tag>
</imageTags>
<baseImage>openjdk:8-jre-alpine</baseImage>
<cmd>java -cp ${dependency.directory.name}/*:${project.build.finalName}.jar ${simulator.main.class}</cmd>
<include>${project.build.finalName}.jar</include>
</resource>
</resources>
+ <forceTags>true</forceTags>
</configuration>
- <executions>
- <execution>
- <id>build-image</id>
- <phase>package</phase>
- <goals>
- <goal>build</goal>
- </goals>
- </execution>
- <execution>
- <id>tag-and-push-image-latest</id>
- <phase>deploy</phase>
- <goals>
- <goal>tag</goal>
- </goals>
- <configuration>
- <image>${docker.image.name}:latest</image>
- <newName>${onap.nexus.dockerregistry.daily}/${docker.image.name}:latest</newName>
- <pushImage>true</pushImage>
- </configuration>
- </execution>
- <execution>
- <id>tag-and-push-image-with-version</id>
- <phase>deploy</phase>
- <goals>
- <goal>tag</goal>
- </goals>
- <configuration>
- <image>${docker.image.name}:latest</image>
- <newName>${onap.nexus.dockerregistry.daily}/${docker.image.name}:${project.version}</newName>
- <pushImage>true</pushImage>
- </configuration>
- </execution>
- <execution>
- <id>tag-and-push-image-with-version-and-date</id>
- <phase>deploy</phase>
- <goals>
- <goal>tag</goal>
- </goals>
- <configuration>
- <image>${docker.image.name}:latest</image>
- <newName>
- ${onap.nexus.dockerregistry.daily}/${docker.image.name}:${project.version}-${maven.build.timestamp}
- </newName>
- <pushImage>true</pushImage>
- </configuration>
- </execution>
- </executions>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
</plugin>
</plugins>
</build>
-</project>
\ No newline at end of file
+</project>