blob: bbb91ea8e3cb59d1f18a3cea5466f25495dcdcef [file] [log] [blame]
Pawel Kadlubanski8d0066e2018-05-11 14:35:43 +02001<?xml version="1.0" encoding="UTF-8"?>
2
Marcin Migdalffd52662018-08-02 13:40:25 +02003<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>
Pawel Kadlubanski8d0066e2018-05-11 14:35:43 +02006
Marcin Migdalffd52662018-08-02 13:40:25 +02007 <groupId>org.onap.pnfsimulator</groupId>
8 <artifactId>pnf-simulator</artifactId>
9 <version>2.0.0-SNAPSHOT</version>
Pawel Kadlubanski8d0066e2018-05-11 14:35:43 +020010
Marcin Migdalffd52662018-08-02 13:40:25 +020011 <name>pnf-simulator</name>
Pawel Kadlubanski8d0066e2018-05-11 14:35:43 +020012
Marcin Migdalffd52662018-08-02 13:40:25 +020013 <properties>
14 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
15 <maven.compiler.source>1.8</maven.compiler.source>
16 <maven.compiler.target>1.8</maven.compiler.target>
17 <maven.build.timestamp.format>yyyyMMdd'T'HHmmss</maven.build.timestamp.format>
Pawel Kadlubanski8d0066e2018-05-11 14:35:43 +020018
Marcin Migdalffd52662018-08-02 13:40:25 +020019 <simulator.main.class>org.onap.pnfsimulator.Main</simulator.main.class>
20 <docker.image.tag>latest</docker.image.tag>
21 <junit.jupiter.version>5.1.0</junit.jupiter.version>
22 <junit.vintage.version>5.1.0</junit.vintage.version>
23 <docker.image.name>onap/${project.artifactId}</docker.image.name>
24
25 <dependency.directory.name>libs</dependency.directory.name>
26 <dependency.directory.location>${project.build.directory}/${dependency.directory.name}
27 </dependency.directory.location>
28
29 <onap.nexus.dockerregistry.daily>nexus3.onap.org:10003</onap.nexus.dockerregistry.daily>
30 </properties>
31
32 <dependencies>
33 <dependency>
34 <groupId>org.springframework.boot</groupId>
35 <artifactId>spring-boot-starter</artifactId>
36 <version>2.0.2.RELEASE</version>
37 <exclusions>
38 <exclusion>
39 <groupId>org.springframework.boot</groupId>
40 <artifactId>spring-boot-starter-logging</artifactId>
41 </exclusion>
42 </exclusions>
43 </dependency>
44 <dependency>
45 <groupId>org.springframework.boot</groupId>
46 <artifactId>spring-boot-starter-web</artifactId>
47 <version>2.0.2.RELEASE</version>
48 </dependency>
49 <dependency>
50 <groupId>ch.qos.logback</groupId>
51 <artifactId>logback-classic</artifactId>
52 <version>1.2.3</version>
53 </dependency>
54 <dependency>
55 <groupId>ch.qos.logback</groupId>
56 <artifactId>logback-core</artifactId>
57 <version>1.2.3</version>
58 </dependency>
59 <dependency>
60 <groupId>org.slf4j</groupId>
61 <artifactId>slf4j-api</artifactId>
62 <version>1.7.25</version>
63 </dependency>
64 <dependency>
65 <groupId>commons-io</groupId>
66 <artifactId>commons-io</artifactId>
67 <version>2.6</version>
68 </dependency>
69 <dependency>
70 <groupId>org.json</groupId>
71 <artifactId>json</artifactId>
72 <version>20180130</version>
73 </dependency>
74 <dependency>
75 <groupId>org.everit.json</groupId>
76 <artifactId>org.everit.json.schema</artifactId>
77 <version>1.3.0</version>
78 </dependency>
79 <dependency>
80 <groupId>com.github.fge</groupId>
81 <artifactId>json-schema-validator</artifactId>
82 <version>2.2.6</version>
83 </dependency>
84 <dependency>
85 <groupId>com.google.code.gson</groupId>
86 <artifactId>gson</artifactId>
87 <version>2.8.2</version>
88 </dependency>
89 <dependency>
90 <groupId>org.apache.httpcomponents</groupId>
91 <artifactId>httpclient</artifactId>
92 <version>4.5.5</version>
93 </dependency>
94 <dependency>
95 <groupId>com.google.guava</groupId>
96 <artifactId>guava</artifactId>
97 <version>21.0</version>
98 </dependency>
99 <dependency>
100 <groupId>commons-cli</groupId>
101 <artifactId>commons-cli</artifactId>
102 <version>1.4</version>
103 </dependency>
104 <dependency>
105 <groupId>org.apache.commons</groupId>
106 <artifactId>commons-lang3</artifactId>
107 <version>3.7</version>
108 </dependency>
109 <dependency>
110 <groupId>org.onosproject</groupId>
111 <artifactId>jnc</artifactId>
112 <version>1.0</version>
113 </dependency>
Marcin Migdalffd52662018-08-02 13:40:25 +0200114
115 <dependency>
116 <groupId>org.junit.jupiter</groupId>
Marcin Migdalffd52662018-08-02 13:40:25 +0200117 <artifactId>junit-jupiter-engine</artifactId>
118 <version>5.1.1</version>
119 <scope>test</scope>
120 </dependency>
121 <dependency>
122 <groupId>org.junit.jupiter</groupId>
123 <artifactId>junit-jupiter-migrationsupport</artifactId>
124 <version>${junit.jupiter.version}</version>
125 <scope>test</scope>
126 </dependency>
127 <dependency>
Marcin Migdalffd52662018-08-02 13:40:25 +0200128 <groupId>org.assertj</groupId>
129 <artifactId>assertj-core</artifactId>
130 <version>3.9.1</version>
131 <scope>test</scope>
132 </dependency>
Marcin Migdalffd52662018-08-02 13:40:25 +0200133 <dependency>
134 <groupId>org.apache.sshd</groupId>
135 <artifactId>sshd-core</artifactId>
136 <version>0.9.0</version>
137 <scope>test</scope>
138 </dependency>
Marcin Migdalffd52662018-08-02 13:40:25 +0200139 <dependency>
140 <groupId>org.mockito</groupId>
141 <artifactId>mockito-core</artifactId>
142 <version>2.18.3</version>
143 <scope>test</scope>
144 </dependency>
145
146 <dependency>
147 <groupId>org.springframework</groupId>
148 <artifactId>spring-test</artifactId>
149 <version>5.0.4.RELEASE</version>
150 <scope>test</scope>
151 </dependency>
152 <dependency>
153 <groupId>org.springframework.boot</groupId>
154 <artifactId>spring-boot-starter-test</artifactId>
155 <version>2.0.1.RELEASE</version>
156 <scope>test</scope>
157 </dependency>
158 </dependencies>
159
160 <build>
161 <plugins>
162 <plugin>
163 <groupId>org.apache.maven.plugins</groupId>
164 <artifactId>maven-compiler-plugin</artifactId>
Marcin Migdal38b0c5e2018-08-03 14:32:02 +0200165 <version>3.7.0</version>
Marcin Migdalffd52662018-08-02 13:40:25 +0200166 <configuration>
167 <source>${maven.compiler.source}</source>
168 <target>${maven.compiler.target}</target>
169 <showWarnings>true</showWarnings>
170 <showDeprecation>true</showDeprecation>
171 </configuration>
172 </plugin>
173 <plugin>
174 <groupId>org.apache.maven.plugins</groupId>
175 <artifactId>maven-jar-plugin</artifactId>
Marcin Migdal38b0c5e2018-08-03 14:32:02 +0200176 <version>3.0.2</version>
Marcin Migdalffd52662018-08-02 13:40:25 +0200177 <configuration>
178 <archive>
179 <manifestEntries>
180 <Main-Class>${simulator.main.class}</Main-Class>
181 <Build-Time>${maven.build.timestamp}</Build-Time>
182 </manifestEntries>
183 </archive>
184 </configuration>
185 </plugin>
186 <plugin>
187 <groupId>pl.project13.maven</groupId>
188 <artifactId>git-commit-id-plugin</artifactId>
189 <version>2.2.4</version>
190 <executions>
191 <execution>
192 <id>get-commit-info</id>
193 <goals>
194 <goal>revision</goal>
195 </goals>
196 </execution>
197 </executions>
198 <configuration>
199 <dotGitDirectory>${project.basedir}/.git</dotGitDirectory>
200 <generateGitPropertiesFile>true</generateGitPropertiesFile>
201 <includeOnlyProperties>git.commit.id.abbrev</includeOnlyProperties>
202 </configuration>
203 </plugin>
204 <plugin>
205 <artifactId>maven-surefire-plugin</artifactId>
206 <version>2.19</version>
207 <dependencies>
208 <dependency>
209 <groupId>org.junit.platform</groupId>
210 <artifactId>junit-platform-surefire-provider</artifactId>
211 <version>1.1.1</version>
212 </dependency>
213 </dependencies>
214 <configuration>
215 <detail>true</detail>
216 <printSummary>true</printSummary>
217 </configuration>
218 </plugin>
219 <plugin>
220 <groupId>org.apache.maven.plugins</groupId>
221 <artifactId>maven-dependency-plugin</artifactId>
222 <configuration>
223 <outputDirectory>${dependency.directory.location}</outputDirectory>
224 <includeScope>runtime</includeScope>
225 <silent>true</silent>
226 </configuration>
227 <executions>
228 <execution>
229 <id>copy-external-dependencies</id>
230 <phase>package</phase>
231 <goals>
232 <goal>copy-dependencies</goal>
233 </goals>
234 </execution>
235 </executions>
236 </plugin>
237 <plugin>
238 <groupId>com.spotify</groupId>
239 <artifactId>docker-maven-plugin</artifactId>
240 <version>1.0.0</version>
241 <configuration>
Marcin Migdald852d2a2018-08-09 10:46:19 +0200242 <registryUrl>${onap.nexus.dockerregistry.daily}</registryUrl>
Marcin Migdalffd52662018-08-02 13:40:25 +0200243 <serverId>${onap.nexus.dockerregistry.daily}</serverId>
244 <imageName>${docker.image.name}</imageName>
245 <imageTags>
246 <tag>latest</tag>
247 </imageTags>
248 <baseImage>openjdk:8-jre-alpine</baseImage>
249 <cmd>java -cp ${dependency.directory.name}/*:${project.build.finalName}.jar ${simulator.main.class}</cmd>
250 <resources>
251 <resource>
252 <targetPath>${dependency.directory.name}</targetPath>
253 <directory>${dependency.directory.location}</directory>
254 </resource>
255 <resource>
256 <targetPath>/</targetPath>
257 <directory>${project.build.directory}</directory>
258 <include>${project.build.finalName}.jar</include>
259 </resource>
260 </resources>
261 </configuration>
262 <executions>
263 <execution>
264 <id>build-image</id>
265 <phase>package</phase>
266 <goals>
267 <goal>build</goal>
268 </goals>
269 </execution>
270 <execution>
Marcin Migdal6720a7f2018-08-08 15:38:11 +0200271 <id>tag-image-latest</id>
272 <phase>package</phase>
Marcin Migdalffd52662018-08-02 13:40:25 +0200273 <goals>
274 <goal>tag</goal>
275 </goals>
276 <configuration>
277 <image>${docker.image.name}:latest</image>
278 <newName>${onap.nexus.dockerregistry.daily}/${docker.image.name}:latest</newName>
Marcin Migdald852d2a2018-08-09 10:46:19 +0200279 <!-- WA in case push does not work at second job - to remove
Marcin Migdalffd52662018-08-02 13:40:25 +0200280 <pushImage>true</pushImage>
Marcin Migdal6720a7f2018-08-08 15:38:11 +0200281 -->
Marcin Migdalffd52662018-08-02 13:40:25 +0200282 </configuration>
283 </execution>
284 <execution>
Marcin Migdal6720a7f2018-08-08 15:38:11 +0200285 <id>push-image-latest</id>
286 <phase>none</phase>
287 <goals>
288 <goal>push</goal>
289 </goals>
290 <configuration>
291 <imageName>${onap.nexus.dockerregistry.daily}/${docker.image.name}:latest</imageName>
292 </configuration>
293 </execution>
294 <execution>
295 <id>tag-image-with-version</id>
296 <phase>package</phase>
Marcin Migdalffd52662018-08-02 13:40:25 +0200297 <goals>
298 <goal>tag</goal>
299 </goals>
300 <configuration>
301 <image>${docker.image.name}:latest</image>
302 <newName>${onap.nexus.dockerregistry.daily}/${docker.image.name}:${project.version}</newName>
Marcin Migdalffd52662018-08-02 13:40:25 +0200303 </configuration>
304 </execution>
305 <execution>
Marcin Migdal6720a7f2018-08-08 15:38:11 +0200306 <id>push-image-with-version</id>
307 <phase>none</phase>
308 <goals>
309 <goal>push</goal>
310 </goals>
311 <configuration>
312 <imageName>${onap.nexus.dockerregistry.daily}/${docker.image.name}:${project.version}</imageName>
313 </configuration>
314 </execution>
315 <execution>
316 <id>tag-image-with-version-and-date</id>
317 <phase>package</phase>
Marcin Migdalffd52662018-08-02 13:40:25 +0200318 <goals>
319 <goal>tag</goal>
320 </goals>
321 <configuration>
322 <image>${docker.image.name}:latest</image>
Marcin Migdal6720a7f2018-08-08 15:38:11 +0200323 <newName>${onap.nexus.dockerregistry.daily}/${docker.image.name}:${project.version}-${maven.build.timestamp}</newName>
324 </configuration>
325 </execution>
326 <execution>
327 <id>push-image-with-version-and-date</id>
328 <phase>none</phase>
329 <goals>
330 <goal>push</goal>
331 </goals>
332 <configuration>
333 <imageName>${onap.nexus.dockerregistry.daily}/${docker.image.name}:${project.version}-${maven.build.timestamp}</imageName>
Marcin Migdalffd52662018-08-02 13:40:25 +0200334 </configuration>
335 </execution>
336 </executions>
337 </plugin>
338 <plugin>
339 <groupId>org.jacoco</groupId>
340 <artifactId>jacoco-maven-plugin</artifactId>
Marcin Migdal4e276342018-08-07 10:29:08 +0200341 <version>0.8.1</version>
Marcin Migdalffd52662018-08-02 13:40:25 +0200342 <configuration>
343 <excludes>
344 <exclude>org/onap/pnfsimulator/Main.class</exclude>
345 </excludes>
346 </configuration>
347 <executions>
348 <execution>
349 <id>default-prepare-agent</id>
350 <goals>
351 <goal>prepare-agent</goal>
352 </goals>
353 </execution>
354 <execution>
355 <id>report</id>
356 <phase>prepare-package</phase>
357 <goals>
358 <goal>report</goal>
359 </goals>
360 </execution>
361 <execution>
362 <id>check</id>
363 <goals>
364 <goal>check</goal>
365 </goals>
366 <configuration>
367 <rules>
368 <rule>
369 <element>CLASS</element>
370 <limits>
371 <limit>
372 <value>COVEREDRATIO</value>
373 <minimum>0.70</minimum>
374 </limit>
375 <limit>
376 <counter>BRANCH</counter>
377 <value>COVEREDRATIO</value>
378 <minimum>0.75</minimum>
379 </limit>
380 </limits>
381 </rule>
382 </rules>
383 </configuration>
384 </execution>
385 </executions>
386 </plugin>
387 </plugins>
388 </build>
389</project>