blob: 442d3fcaa7ae95ad4c7a158579371662f9b38841 [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>
128 <groupId>org.junit.vintage</groupId>
129 <artifactId>junit-vintage-engine</artifactId>
130 <version>${junit.vintage.version}</version>
131 <scope>test</scope>
132 </dependency>
Marcin Migdalffd52662018-08-02 13:40:25 +0200133 <dependency>
134 <groupId>org.assertj</groupId>
135 <artifactId>assertj-core</artifactId>
136 <version>3.9.1</version>
137 <scope>test</scope>
138 </dependency>
Marcin Migdalffd52662018-08-02 13:40:25 +0200139 <dependency>
140 <groupId>org.apache.sshd</groupId>
141 <artifactId>sshd-core</artifactId>
142 <version>0.9.0</version>
143 <scope>test</scope>
144 </dependency>
Marcin Migdalffd52662018-08-02 13:40:25 +0200145 <dependency>
146 <groupId>org.mockito</groupId>
147 <artifactId>mockito-core</artifactId>
148 <version>2.18.3</version>
149 <scope>test</scope>
150 </dependency>
151
152 <dependency>
153 <groupId>org.springframework</groupId>
154 <artifactId>spring-test</artifactId>
155 <version>5.0.4.RELEASE</version>
156 <scope>test</scope>
157 </dependency>
158 <dependency>
159 <groupId>org.springframework.boot</groupId>
160 <artifactId>spring-boot-starter-test</artifactId>
161 <version>2.0.1.RELEASE</version>
162 <scope>test</scope>
163 </dependency>
164 </dependencies>
165
166 <build>
167 <plugins>
168 <plugin>
169 <groupId>org.apache.maven.plugins</groupId>
170 <artifactId>maven-compiler-plugin</artifactId>
Marcin Migdal38b0c5e2018-08-03 14:32:02 +0200171 <version>3.7.0</version>
Marcin Migdalffd52662018-08-02 13:40:25 +0200172 <configuration>
173 <source>${maven.compiler.source}</source>
174 <target>${maven.compiler.target}</target>
175 <showWarnings>true</showWarnings>
176 <showDeprecation>true</showDeprecation>
177 </configuration>
178 </plugin>
179 <plugin>
180 <groupId>org.apache.maven.plugins</groupId>
181 <artifactId>maven-jar-plugin</artifactId>
Marcin Migdal38b0c5e2018-08-03 14:32:02 +0200182 <version>3.0.2</version>
Marcin Migdalffd52662018-08-02 13:40:25 +0200183 <configuration>
184 <archive>
185 <manifestEntries>
186 <Main-Class>${simulator.main.class}</Main-Class>
187 <Build-Time>${maven.build.timestamp}</Build-Time>
188 </manifestEntries>
189 </archive>
190 </configuration>
191 </plugin>
192 <plugin>
193 <groupId>pl.project13.maven</groupId>
194 <artifactId>git-commit-id-plugin</artifactId>
195 <version>2.2.4</version>
196 <executions>
197 <execution>
198 <id>get-commit-info</id>
199 <goals>
200 <goal>revision</goal>
201 </goals>
202 </execution>
203 </executions>
204 <configuration>
205 <dotGitDirectory>${project.basedir}/.git</dotGitDirectory>
206 <generateGitPropertiesFile>true</generateGitPropertiesFile>
207 <includeOnlyProperties>git.commit.id.abbrev</includeOnlyProperties>
208 </configuration>
209 </plugin>
210 <plugin>
211 <artifactId>maven-surefire-plugin</artifactId>
212 <version>2.19</version>
213 <dependencies>
214 <dependency>
215 <groupId>org.junit.platform</groupId>
216 <artifactId>junit-platform-surefire-provider</artifactId>
217 <version>1.1.1</version>
218 </dependency>
219 </dependencies>
220 <configuration>
221 <detail>true</detail>
222 <printSummary>true</printSummary>
223 </configuration>
224 </plugin>
225 <plugin>
226 <groupId>org.apache.maven.plugins</groupId>
227 <artifactId>maven-dependency-plugin</artifactId>
228 <configuration>
229 <outputDirectory>${dependency.directory.location}</outputDirectory>
230 <includeScope>runtime</includeScope>
231 <silent>true</silent>
232 </configuration>
233 <executions>
234 <execution>
235 <id>copy-external-dependencies</id>
236 <phase>package</phase>
237 <goals>
238 <goal>copy-dependencies</goal>
239 </goals>
240 </execution>
241 </executions>
242 </plugin>
243 <plugin>
244 <groupId>com.spotify</groupId>
245 <artifactId>docker-maven-plugin</artifactId>
246 <version>1.0.0</version>
247 <configuration>
248 <serverId>${onap.nexus.dockerregistry.daily}</serverId>
249 <imageName>${docker.image.name}</imageName>
250 <imageTags>
251 <tag>latest</tag>
252 </imageTags>
253 <baseImage>openjdk:8-jre-alpine</baseImage>
254 <cmd>java -cp ${dependency.directory.name}/*:${project.build.finalName}.jar ${simulator.main.class}</cmd>
255 <resources>
256 <resource>
257 <targetPath>${dependency.directory.name}</targetPath>
258 <directory>${dependency.directory.location}</directory>
259 </resource>
260 <resource>
261 <targetPath>/</targetPath>
262 <directory>${project.build.directory}</directory>
263 <include>${project.build.finalName}.jar</include>
264 </resource>
265 </resources>
266 </configuration>
267 <executions>
268 <execution>
269 <id>build-image</id>
270 <phase>package</phase>
271 <goals>
272 <goal>build</goal>
273 </goals>
274 </execution>
275 <execution>
276 <id>tag-and-push-image-latest</id>
277 <phase>deploy</phase>
278 <goals>
279 <goal>tag</goal>
280 </goals>
281 <configuration>
282 <image>${docker.image.name}:latest</image>
283 <newName>${onap.nexus.dockerregistry.daily}/${docker.image.name}:latest</newName>
284 <pushImage>true</pushImage>
285 </configuration>
286 </execution>
287 <execution>
288 <id>tag-and-push-image-with-version</id>
289 <phase>deploy</phase>
290 <goals>
291 <goal>tag</goal>
292 </goals>
293 <configuration>
294 <image>${docker.image.name}:latest</image>
295 <newName>${onap.nexus.dockerregistry.daily}/${docker.image.name}:${project.version}</newName>
296 <pushImage>true</pushImage>
297 </configuration>
298 </execution>
299 <execution>
300 <id>tag-and-push-image-with-version-and-date</id>
301 <phase>deploy</phase>
302 <goals>
303 <goal>tag</goal>
304 </goals>
305 <configuration>
306 <image>${docker.image.name}:latest</image>
307 <newName>
308 ${onap.nexus.dockerregistry.daily}/${docker.image.name}:${project.version}-${maven.build.timestamp}
309 </newName>
310 <pushImage>true</pushImage>
311 </configuration>
312 </execution>
313 </executions>
314 </plugin>
315 <plugin>
316 <groupId>org.jacoco</groupId>
317 <artifactId>jacoco-maven-plugin</artifactId>
Marcin Migdal4e276342018-08-07 10:29:08 +0200318 <version>0.8.1</version>
Marcin Migdalffd52662018-08-02 13:40:25 +0200319 <configuration>
320 <excludes>
321 <exclude>org/onap/pnfsimulator/Main.class</exclude>
322 </excludes>
323 </configuration>
324 <executions>
325 <execution>
326 <id>default-prepare-agent</id>
327 <goals>
328 <goal>prepare-agent</goal>
329 </goals>
330 </execution>
331 <execution>
332 <id>report</id>
333 <phase>prepare-package</phase>
334 <goals>
335 <goal>report</goal>
336 </goals>
337 </execution>
338 <execution>
339 <id>check</id>
340 <goals>
341 <goal>check</goal>
342 </goals>
343 <configuration>
344 <rules>
345 <rule>
346 <element>CLASS</element>
347 <limits>
348 <limit>
349 <value>COVEREDRATIO</value>
350 <minimum>0.70</minimum>
351 </limit>
352 <limit>
353 <counter>BRANCH</counter>
354 <value>COVEREDRATIO</value>
355 <minimum>0.75</minimum>
356 </limit>
357 </limits>
358 </rule>
359 </rules>
360 </configuration>
361 </execution>
362 </executions>
363 </plugin>
364 </plugins>
365 </build>
366</project>