Updated Docker Image Version
[integration.git] / test / mocks / pnfsimulator / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2
3 <project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
4   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5   <modelVersion>4.0.0</modelVersion>
6
7
8   <parent>
9     <groupId>org.onap.oparent</groupId>
10     <artifactId>oparent</artifactId>
11     <version>1.2.1</version>
12   </parent>
13
14   <groupId>org.onap.pnfsimulator</groupId>
15   <artifactId>pnf-simulator</artifactId>
16   <version>2.0.0-SNAPSHOT</version>
17
18   <name>pnf-simulator</name>
19
20   <properties>
21     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
22     <maven.compiler.source>1.8</maven.compiler.source>
23     <maven.compiler.target>1.8</maven.compiler.target>
24     <maven.build.timestamp.format>yyyyMMdd'T'HHmmss</maven.build.timestamp.format>
25
26     <simulator.main.class>org.onap.pnfsimulator.Main</simulator.main.class>
27     <docker.image.tag>latest</docker.image.tag>
28     <junit.jupiter.version>5.1.0</junit.jupiter.version>
29     <junit.vintage.version>5.1.0</junit.vintage.version>
30     <docker.image.name>onap/${project.artifactId}</docker.image.name>
31
32     <dependency.directory.name>libs</dependency.directory.name>
33     <dependency.directory.location>${project.build.directory}/${dependency.directory.name}
34     </dependency.directory.location>
35
36     <onap.nexus.dockerregistry.daily>nexus3.onap.org:10003</onap.nexus.dockerregistry.daily>
37   </properties>
38
39   <dependencies>
40     <dependency>
41       <groupId>org.springframework.boot</groupId>
42       <artifactId>spring-boot-starter</artifactId>
43       <version>2.0.2.RELEASE</version>
44       <exclusions>
45         <exclusion>
46           <groupId>org.springframework.boot</groupId>
47           <artifactId>spring-boot-starter-logging</artifactId>
48         </exclusion>
49       </exclusions>
50     </dependency>
51     <dependency>
52       <groupId>org.springframework.boot</groupId>
53       <artifactId>spring-boot-starter-web</artifactId>
54       <version>2.0.2.RELEASE</version>
55     </dependency>
56     <dependency>
57       <groupId>ch.qos.logback</groupId>
58       <artifactId>logback-classic</artifactId>
59       <version>1.2.3</version>
60     </dependency>
61     <dependency>
62       <groupId>ch.qos.logback</groupId>
63       <artifactId>logback-core</artifactId>
64       <version>1.2.3</version>
65     </dependency>
66     <dependency>
67       <groupId>org.slf4j</groupId>
68       <artifactId>slf4j-api</artifactId>
69       <version>1.7.25</version>
70     </dependency>
71     <dependency>
72       <groupId>commons-io</groupId>
73       <artifactId>commons-io</artifactId>
74       <version>2.6</version>
75     </dependency>
76     <dependency>
77       <groupId>org.json</groupId>
78       <artifactId>json</artifactId>
79       <version>20180130</version>
80     </dependency>
81     <dependency>
82       <groupId>org.everit.json</groupId>
83       <artifactId>org.everit.json.schema</artifactId>
84       <version>1.3.0</version>
85     </dependency>
86     <dependency>
87       <groupId>com.github.fge</groupId>
88       <artifactId>json-schema-validator</artifactId>
89       <version>2.2.6</version>
90     </dependency>
91     <dependency>
92       <groupId>com.google.code.gson</groupId>
93       <artifactId>gson</artifactId>
94       <version>2.8.2</version>
95     </dependency>
96     <dependency>
97       <groupId>org.apache.httpcomponents</groupId>
98       <artifactId>httpclient</artifactId>
99       <version>4.5.5</version>
100     </dependency>
101     <dependency>
102       <groupId>com.google.guava</groupId>
103       <artifactId>guava</artifactId>
104       <version>21.0</version>
105     </dependency>
106     <dependency>
107       <groupId>commons-cli</groupId>
108       <artifactId>commons-cli</artifactId>
109       <version>1.4</version>
110     </dependency>
111     <dependency>
112       <groupId>org.apache.commons</groupId>
113       <artifactId>commons-lang3</artifactId>
114       <version>3.7</version>
115     </dependency>
116     <dependency>
117       <groupId>org.onosproject</groupId>
118       <artifactId>jnc</artifactId>
119       <version>1.0</version>
120     </dependency>
121
122     <dependency>
123       <groupId>org.junit.jupiter</groupId>
124       <artifactId>junit-jupiter-engine</artifactId>
125       <version>5.1.1</version>
126       <scope>test</scope>
127     </dependency>
128     <dependency>
129       <groupId>org.junit.jupiter</groupId>
130       <artifactId>junit-jupiter-migrationsupport</artifactId>
131       <version>${junit.jupiter.version}</version>
132       <scope>test</scope>
133     </dependency>
134     <dependency>
135       <groupId>org.assertj</groupId>
136       <artifactId>assertj-core</artifactId>
137       <version>3.9.1</version>
138       <scope>test</scope>
139     </dependency>
140     <dependency>
141       <groupId>org.apache.sshd</groupId>
142       <artifactId>sshd-core</artifactId>
143       <version>0.9.0</version>
144       <scope>test</scope>
145     </dependency>
146     <dependency>
147       <groupId>org.mockito</groupId>
148       <artifactId>mockito-core</artifactId>
149       <version>2.18.3</version>
150       <scope>test</scope>
151     </dependency>
152
153     <dependency>
154       <groupId>org.springframework</groupId>
155       <artifactId>spring-test</artifactId>
156       <version>5.0.4.RELEASE</version>
157       <scope>test</scope>
158     </dependency>
159     <dependency>
160       <groupId>org.springframework.boot</groupId>
161       <artifactId>spring-boot-starter-test</artifactId>
162       <version>2.0.1.RELEASE</version>
163       <scope>test</scope>
164     </dependency>
165   </dependencies>
166
167   <build>
168     <plugins>
169       <plugin>
170         <groupId>org.apache.maven.plugins</groupId>
171         <artifactId>maven-assembly-plugin</artifactId>
172         <configuration>
173           <descriptor>src/assembly/resources.xml</descriptor>
174           <finalName>${project.artifactId}-${pom.version}</finalName>
175         </configuration>
176         <executions>
177           <execution>
178             <phase>package</phase>
179             <goals>
180               <goal>single</goal>
181             </goals>
182           </execution>
183         </executions>
184       </plugin>
185       <plugin>
186         <groupId>org.apache.maven.plugins</groupId>
187         <artifactId>maven-compiler-plugin</artifactId>
188         <version>3.7.0</version>
189         <configuration>
190           <source>${maven.compiler.source}</source>
191           <target>${maven.compiler.target}</target>
192           <showWarnings>true</showWarnings>
193           <showDeprecation>true</showDeprecation>
194         </configuration>
195       </plugin>
196       <plugin>
197         <groupId>org.apache.maven.plugins</groupId>
198         <artifactId>maven-jar-plugin</artifactId>
199         <version>3.0.2</version>
200         <configuration>
201           <archive>
202             <manifestEntries>
203               <Main-Class>${simulator.main.class}</Main-Class>
204               <Build-Time>${maven.build.timestamp}</Build-Time>
205             </manifestEntries>
206           </archive>
207         </configuration>
208       </plugin>
209       <plugin>
210         <groupId>pl.project13.maven</groupId>
211         <artifactId>git-commit-id-plugin</artifactId>
212         <version>2.2.4</version>
213         <executions>
214           <execution>
215             <id>get-commit-info</id>
216             <goals>
217               <goal>revision</goal>
218             </goals>
219           </execution>
220         </executions>
221         <configuration>
222           <dotGitDirectory>${project.basedir}/.git</dotGitDirectory>
223           <generateGitPropertiesFile>true</generateGitPropertiesFile>
224           <includeOnlyProperties>git.commit.id.abbrev</includeOnlyProperties>
225         </configuration>
226       </plugin>
227       <plugin>
228         <artifactId>maven-surefire-plugin</artifactId>
229         <version>2.19</version>
230         <dependencies>
231           <dependency>
232             <groupId>org.junit.platform</groupId>
233             <artifactId>junit-platform-surefire-provider</artifactId>
234             <version>1.1.1</version>
235           </dependency>
236         </dependencies>
237         <configuration>
238           <detail>true</detail>
239           <printSummary>true</printSummary>
240         </configuration>
241       </plugin>
242       <plugin>
243         <groupId>org.apache.maven.plugins</groupId>
244         <artifactId>maven-dependency-plugin</artifactId>
245         <configuration>
246           <outputDirectory>${dependency.directory.location}</outputDirectory>
247           <includeScope>runtime</includeScope>
248           <silent>true</silent>
249         </configuration>
250         <executions>
251           <execution>
252             <id>copy-external-dependencies</id>
253             <phase>package</phase>
254             <goals>
255               <goal>copy-dependencies</goal>
256             </goals>
257           </execution>
258         </executions>
259       </plugin>
260       <plugin>
261         <groupId>com.spotify</groupId>
262         <artifactId>docker-maven-plugin</artifactId>
263         <version>1.0.0</version>
264         <configuration>
265           <registryUrl>${onap.nexus.dockerregistry.daily}</registryUrl>
266           <imageName>${onap.nexus.dockerregistry.daily}/${docker.image.name}</imageName>
267           <forceTags>true</forceTags>
268           <imageTags>
269             <tag>latest</tag>
270             <tag>${project.version}</tag>
271             <tag>${project.version}-${maven.build.timestamp}</tag>
272           </imageTags>
273           <baseImage>openjdk:8-jre-alpine</baseImage>
274           <cmd>java -cp ${dependency.directory.name}/*:${project.build.finalName}.jar ${simulator.main.class}</cmd>
275           <resources>
276             <resource>
277               <targetPath>${dependency.directory.name}</targetPath>
278               <directory>${dependency.directory.location}</directory>
279             </resource>
280             <resource>
281               <targetPath>/</targetPath>
282               <directory>${project.build.directory}</directory>
283               <include>${project.build.finalName}.jar</include>
284             </resource>
285           </resources>
286           <forceTags>true</forceTags>
287         </configuration>
288       </plugin>
289       <plugin>
290         <groupId>org.jacoco</groupId>
291         <artifactId>jacoco-maven-plugin</artifactId>
292         <version>0.8.1</version>
293         <configuration>
294           <excludes>
295             <exclude>org/onap/pnfsimulator/Main.class</exclude>
296           </excludes>
297         </configuration>
298         <executions>
299           <execution>
300             <id>default-prepare-agent</id>
301             <goals>
302               <goal>prepare-agent</goal>
303             </goals>
304           </execution>
305           <execution>
306             <id>report</id>
307             <phase>prepare-package</phase>
308             <goals>
309               <goal>report</goal>
310             </goals>
311           </execution>
312           <execution>
313             <id>check</id>
314             <goals>
315               <goal>check</goal>
316             </goals>
317             <configuration>
318               <rules>
319                 <rule>
320                   <element>CLASS</element>
321                   <limits>
322                     <limit>
323                       <value>COVEREDRATIO</value>
324                       <minimum>0.70</minimum>
325                     </limit>
326                     <limit>
327                       <counter>BRANCH</counter>
328                       <value>COVEREDRATIO</value>
329                       <minimum>0.75</minimum>
330                     </limit>
331                   </limits>
332                 </rule>
333               </rules>
334             </configuration>
335           </execution>
336         </executions>
337       </plugin>
338     </plugins>
339   </build>
340 </project>