blob: e68ca8b2fcd38fc61a5a2fcdcb65f68918c583c3 [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 Migdal86fc2ff2018-08-10 15:09:31 +0200243 <!--
Marcin Migdalffd52662018-08-02 13:40:25 +0200244 <serverId>${onap.nexus.dockerregistry.daily}</serverId>
Marcin Migdal86fc2ff2018-08-10 15:09:31 +0200245 -->
246 <imageName>${onap.nexus.dockerregistry.daily}/${docker.image.name}</imageName>
Marcin Migdalffd52662018-08-02 13:40:25 +0200247 <imageTags>
248 <tag>latest</tag>
Marcin Migdal86fc2ff2018-08-10 15:09:31 +0200249 <tag>${project.version}</tag>
250 <tag>${project.version}-${maven.build.timestamp}</tag>
Marcin Migdalffd52662018-08-02 13:40:25 +0200251 </imageTags>
252 <baseImage>openjdk:8-jre-alpine</baseImage>
253 <cmd>java -cp ${dependency.directory.name}/*:${project.build.finalName}.jar ${simulator.main.class}</cmd>
254 <resources>
255 <resource>
256 <targetPath>${dependency.directory.name}</targetPath>
257 <directory>${dependency.directory.location}</directory>
258 </resource>
259 <resource>
260 <targetPath>/</targetPath>
261 <directory>${project.build.directory}</directory>
262 <include>${project.build.finalName}.jar</include>
263 </resource>
264 </resources>
Marcin Migdal86fc2ff2018-08-10 15:09:31 +0200265 <forceTags>true</forceTags>
Marcin Migdalffd52662018-08-02 13:40:25 +0200266 </configuration>
Marcin Migdal86fc2ff2018-08-10 15:09:31 +0200267 <!--
Marcin Migdalffd52662018-08-02 13:40:25 +0200268 <executions>
269 <execution>
270 <id>build-image</id>
271 <phase>package</phase>
272 <goals>
273 <goal>build</goal>
274 </goals>
275 </execution>
276 <execution>
Marcin Migdal6720a7f2018-08-08 15:38:11 +0200277 <id>tag-image-latest</id>
278 <phase>package</phase>
Marcin Migdalffd52662018-08-02 13:40:25 +0200279 <goals>
280 <goal>tag</goal>
281 </goals>
282 <configuration>
283 <image>${docker.image.name}:latest</image>
284 <newName>${onap.nexus.dockerregistry.daily}/${docker.image.name}:latest</newName>
Marcin Migdal86fc2ff2018-08-10 15:09:31 +0200285 -->
Marcin Migdald852d2a2018-08-09 10:46:19 +0200286 <!-- WA in case push does not work at second job - to remove
Marcin Migdalffd52662018-08-02 13:40:25 +0200287 <pushImage>true</pushImage>
Marcin Migdal6720a7f2018-08-08 15:38:11 +0200288 -->
Marcin Migdal86fc2ff2018-08-10 15:09:31 +0200289 <!--
Marcin Migdalffd52662018-08-02 13:40:25 +0200290 </configuration>
291 </execution>
292 <execution>
Marcin Migdal6720a7f2018-08-08 15:38:11 +0200293 <id>tag-image-with-version</id>
294 <phase>package</phase>
Marcin Migdalffd52662018-08-02 13:40:25 +0200295 <goals>
296 <goal>tag</goal>
297 </goals>
298 <configuration>
299 <image>${docker.image.name}:latest</image>
300 <newName>${onap.nexus.dockerregistry.daily}/${docker.image.name}:${project.version}</newName>
Marcin Migdalffd52662018-08-02 13:40:25 +0200301 </configuration>
302 </execution>
303 <execution>
Marcin Migdal6720a7f2018-08-08 15:38:11 +0200304 <id>tag-image-with-version-and-date</id>
305 <phase>package</phase>
Marcin Migdalffd52662018-08-02 13:40:25 +0200306 <goals>
307 <goal>tag</goal>
308 </goals>
309 <configuration>
310 <image>${docker.image.name}:latest</image>
Marcin Migdal6720a7f2018-08-08 15:38:11 +0200311 <newName>${onap.nexus.dockerregistry.daily}/${docker.image.name}:${project.version}-${maven.build.timestamp}</newName>
312 </configuration>
313 </execution>
Marcin Migdal86fc2ff2018-08-10 15:09:31 +0200314 -->
Marcin Migdal5d089582018-08-09 15:22:37 +0200315 <!-- testing pushing default imgae-->
Marcin Migdal86fc2ff2018-08-10 15:09:31 +0200316 <!--
Marcin Migdal5d089582018-08-09 15:22:37 +0200317 <execution>
318 <id>default</id>
319 <goals>
320 <goal>push</goal>
321 </goals>
322 <configuration>
323 <registryUrl>${onap.nexus.dockerregistry.daily}</registryUrl>
324 <imageName>${onap.nexus.dockerregistry.daily}/${docker.image.name}:latest</imageName>
325 </configuration>
326 </execution>
327
328 <execution>
329 <id>push-image-latest</id>
330 <phase>none</phase>
331 <goals>
332 <goal>push</goal>
333 </goals>
334 <configuration>
335 <imageName>${onap.nexus.dockerregistry.daily}/${docker.image.name}:latest</imageName>
336 </configuration>
337 </execution>
338 <execution>
339 <id>push-image-with-version</id>
340 <phase>none</phase>
341 <goals>
342 <goal>push</goal>
343 </goals>
344 <configuration>
345 <imageName>${onap.nexus.dockerregistry.daily}/${docker.image.name}:${project.version}</imageName>
346 </configuration>
347 </execution>
Marcin Migdal6720a7f2018-08-08 15:38:11 +0200348 <execution>
349 <id>push-image-with-version-and-date</id>
350 <phase>none</phase>
351 <goals>
352 <goal>push</goal>
353 </goals>
354 <configuration>
355 <imageName>${onap.nexus.dockerregistry.daily}/${docker.image.name}:${project.version}-${maven.build.timestamp}</imageName>
Marcin Migdalffd52662018-08-02 13:40:25 +0200356 </configuration>
357 </execution>
358 </executions>
Marcin Migdal86fc2ff2018-08-10 15:09:31 +0200359 -->
Marcin Migdalffd52662018-08-02 13:40:25 +0200360 </plugin>
361 <plugin>
362 <groupId>org.jacoco</groupId>
363 <artifactId>jacoco-maven-plugin</artifactId>
Marcin Migdal4e276342018-08-07 10:29:08 +0200364 <version>0.8.1</version>
Marcin Migdalffd52662018-08-02 13:40:25 +0200365 <configuration>
366 <excludes>
367 <exclude>org/onap/pnfsimulator/Main.class</exclude>
368 </excludes>
369 </configuration>
370 <executions>
371 <execution>
372 <id>default-prepare-agent</id>
373 <goals>
374 <goal>prepare-agent</goal>
375 </goals>
376 </execution>
377 <execution>
378 <id>report</id>
379 <phase>prepare-package</phase>
380 <goals>
381 <goal>report</goal>
382 </goals>
383 </execution>
384 <execution>
385 <id>check</id>
386 <goals>
387 <goal>check</goal>
388 </goals>
389 <configuration>
390 <rules>
391 <rule>
392 <element>CLASS</element>
393 <limits>
394 <limit>
395 <value>COVEREDRATIO</value>
396 <minimum>0.70</minimum>
397 </limit>
398 <limit>
399 <counter>BRANCH</counter>
400 <value>COVEREDRATIO</value>
401 <minimum>0.75</minimum>
402 </limit>
403 </limits>
404 </rule>
405 </rules>
406 </configuration>
407 </execution>
408 </executions>
409 </plugin>
410 </plugins>
411 </build>
412</project>