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