Merge "Fix vulnerability report"
[externalapi/nbi.git] / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3
4         Copyright (c) 2018 Orange
5
6         Licensed under the Apache License, Version 2.0 (the "License");
7         you may not use this file except in compliance with the License.
8         You may obtain a copy of the License at
9
10             http://www.apache.org/licenses/LICENSE-2.0
11
12         Unless required by applicable law or agreed to in writing, software
13         distributed under the License is distributed on an "AS IS" BASIS,
14         WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15         See the License for the specific language governing permissions and
16         limitations under the License.
17
18 -->
19 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
20                  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
21         <modelVersion>4.0.0</modelVersion>
22
23         <groupId>org.onap.externalapi-nbi</groupId>
24         <artifactId>nbi-rest-services</artifactId>
25         <version>1.0.0-SNAPSHOT</version>
26         <packaging>jar</packaging>
27
28         <name>externalapi-nbi</name>
29
30         <parent>
31                 <groupId>org.springframework.boot</groupId>
32                 <artifactId>spring-boot-starter-parent</artifactId>
33                 <version>1.5.10.RELEASE</version>
34                 <relativePath /> <!-- lookup parent from repository -->
35         </parent>
36
37         <properties>
38                 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
39                 <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
40                 <nexusproxy>https://nexus.onap.org</nexusproxy>
41                 <snapshotNexusPath>content/repositories/snapshots/</snapshotNexusPath>
42                 <releaseNexusPath>content/repositories/releases/</releaseNexusPath>
43                 <stagingNexusPath>content/repositories/staging/</stagingNexusPath>
44                 <java.version>1.8</java.version>
45                 <docker.pull.registry>nexus3.onap.org:10001</docker.pull.registry>
46                 <docker.push.registry>nexus3.onap.org:10003</docker.push.registry>
47                 <timestamp>${maven.build.timestamp}</timestamp>
48                 <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
49                 <!--docker -->
50                 <docker.tag>${project.version}-${timestamp}</docker.tag>
51                 <docker.latest.tag>${project.version}-latest</docker.latest.tag>
52                 <!--sonar -->
53              <sonar.language>java</sonar.language>
54              <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
55              <sonar.surefire.reportsPath>${project.build.directory}/surefire-reports</sonar.surefire.reportsPath>
56              <sonar.jacoco.reportPath>${project.build.directory}/coverage-reports/jacoco.exec</sonar.jacoco.reportPath>
57              <sonar.jacoco.itReportPath>${project.build.directory}/coverage-reports/jacoco-it.exec</sonar.jacoco.itReportPath>
58              <sonar.jacoco.reportMissing.force.zero>true</sonar.jacoco.reportMissing.force.zero>
59              <sonar.projectVersion>${project.version}</sonar.projectVersion>
60                 <sonar.coverage.exclusions>**/model/**/*</sonar.coverage.exclusions>
61         </properties>
62
63         <repositories>
64                 <repository>
65                         <id>maven2-repository.java.net</id>
66                         <name>Java.net Repository for Maven</name>
67                         <url>http://download.java.net/maven/2/</url>
68                         <layout>default</layout>
69                 </repository>
70                 <repository>
71                         <id>ecomp-snapshots</id>
72                         <name>Snapshot Repository</name>
73                         <url>https://nexus.onap.org/content/repositories/releases/</url>
74                 </repository>
75                 <repository>
76                         <id>ecomp-staging</id>
77                         <name>Staging Repository</name>
78                         <url>https://nexus.onap.org/content/repositories/staging/</url>
79                 </repository>
80         </repositories>
81
82         <distributionManagement>
83                 <repository>
84                         <id>ecomp-releases</id>
85                         <name>Release Repository</name>
86                         <url>${nexusproxy}/${releaseNexusPath}</url>
87                 </repository>
88                 <snapshotRepository>
89                         <id>ecomp-snapshots</id>
90                         <name>Snapshot Repository</name>
91                         <url>${nexusproxy}/${snapshotNexusPath}</url>
92                 </snapshotRepository>
93         </distributionManagement>
94
95         <licenses>
96                 <license>
97                         <name>Apache2</name>
98                         <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
99                 </license>
100         </licenses>
101
102         <dependencies>
103
104                 <dependency>
105                         <groupId>org.springframework.boot</groupId>
106                         <artifactId>spring-boot-starter-web</artifactId>
107                         <exclusions>
108                                 <exclusion>
109                                         <groupId>ch.qos.logback</groupId>
110                                         <artifactId>logback-classic</artifactId>
111                                 </exclusion>
112                         </exclusions>
113                 </dependency>
114
115                 <dependency>
116                         <groupId>ch.qos.logback</groupId>
117                         <artifactId>logback-classic</artifactId>
118                         <version>1.2.3</version>
119                 </dependency>
120
121                 <dependency>
122                         <groupId>org.springframework.boot</groupId>
123                         <artifactId>spring-boot-starter-data-jpa</artifactId>
124                 </dependency>
125
126                 <dependency>
127                         <groupId>org.apache.commons</groupId>
128                         <artifactId>commons-io</artifactId>
129                         <version>1.3.2</version>
130                 </dependency>
131
132                 <dependency>
133                         <groupId>commons-beanutils</groupId>
134                         <artifactId>commons-beanutils</artifactId>
135                         <version>1.9.3</version>
136                 </dependency>
137
138                 <dependency>
139                         <groupId>javax.validation</groupId>
140                         <artifactId>validation-api</artifactId>
141                         <version>2.0.1.Final</version>
142                 </dependency>
143
144                 <dependency>
145                         <groupId>org.apache.commons</groupId>
146                         <artifactId>commons-lang3</artifactId>
147                         <version>3.4</version>
148                 </dependency>
149
150                 <!-- mongo -->
151
152                 <dependency>
153                         <groupId>org.springframework.boot</groupId>
154                         <artifactId>spring-boot-starter-data-mongodb</artifactId>
155                 </dependency>
156
157                 <!-- mysql -->
158
159                 <dependency>
160                         <groupId>org.mariadb.jdbc</groupId>
161                         <artifactId>mariadb-java-client</artifactId>
162                         <version>1.1.7</version>
163                 </dependency>
164
165                 <!-- swagger -->
166
167                 <dependency>
168                         <groupId>io.swagger</groupId>
169                         <artifactId>swagger-annotations</artifactId>
170                         <version>1.5.18</version>
171                 </dependency>
172
173                 <!-- jackson -->
174
175                 <dependency>
176                         <groupId>com.fasterxml.jackson.dataformat</groupId>
177                         <artifactId>jackson-dataformat-yaml</artifactId>
178                         <version>2.8.0</version>
179                 </dependency>
180
181                 <!-- jolt -->
182
183                 <dependency>
184                         <groupId>com.bazaarvoice.jolt</groupId>
185                         <artifactId>jolt-core</artifactId>
186                         <version>0.1.0</version>
187                         <exclusions>
188                                 <exclusion>
189                                         <groupId>com.fasterxml.jackson.core</groupId>
190                                         <artifactId>jackson-databind</artifactId>
191                                 </exclusion>
192                         </exclusions>
193                 </dependency>
194
195                 <dependency>
196                         <groupId>com.bazaarvoice.jolt</groupId>
197                         <artifactId>json-utils</artifactId>
198                         <version>0.1.0</version>
199                 </dependency>
200
201                 <!-- test -->
202
203                 <dependency>
204                         <groupId>org.springframework.boot</groupId>
205                         <artifactId>spring-boot-starter-test</artifactId>
206                         <scope>test</scope>
207                 </dependency>
208
209                 <!-- test h2 -->
210
211                 <dependency>
212                         <groupId>com.h2database</groupId>
213                         <artifactId>h2</artifactId>
214                         <scope>test</scope>
215                 </dependency>
216
217                 <dependency>
218                         <groupId>de.flapdoodle.embed</groupId>
219                         <artifactId>de.flapdoodle.embed.mongo</artifactId>
220                         <version>${embedded-mongo.version}</version>
221                         <scope>test</scope>
222                 </dependency>
223
224                 <!-- test wiremock -->
225
226                 <dependency>
227                         <groupId>org.springframework.cloud</groupId>
228                         <artifactId>spring-cloud-contract-wiremock</artifactId>
229                         <version>1.0.0.RELEASE</version>
230                         <scope>test</scope>
231                 </dependency>
232
233                 <dependency>
234                         <groupId>org.eclipse.jetty</groupId>
235                         <artifactId>jetty-server</artifactId>
236                         <version>9.4.7.RC0</version>
237                         <scope>test</scope>
238                 </dependency>
239
240                 <dependency>
241                         <groupId>org.eclipse.jetty</groupId>
242                         <artifactId>jetty-servlet</artifactId>
243                         <scope>test</scope>
244                 </dependency>
245
246                 <dependency>
247                         <groupId>org.eclipse.jetty</groupId>
248                         <artifactId>jetty-servlets</artifactId>
249                         <scope>test</scope>
250                 </dependency>
251
252                 <!-- runtime dev -->
253
254                 <dependency>
255                         <groupId>org.springframework.boot</groupId>
256                         <artifactId>spring-boot-devtools</artifactId>
257                         <scope>runtime</scope>
258                 </dependency>
259
260         </dependencies>
261
262         <build>
263                 <plugins>
264                         <plugin>
265                                 <groupId>org.springframework.boot</groupId>
266                                 <artifactId>spring-boot-maven-plugin</artifactId>
267                         </plugin>
268                         <plugin>
269                                 <groupId>org.sonatype.plugins</groupId>
270                                 <artifactId>nexus-staging-maven-plugin</artifactId>
271                                 <version>1.6.7</version>
272                                 <extensions>true</extensions>
273                                 <configuration>
274                                         <nexusUrl>${nexusproxy}</nexusUrl>
275                                         <stagingProfileId>176c31dfe190a</stagingProfileId>
276                                         <serverId>ecomp-staging</serverId>
277                                 </configuration>
278                         </plugin>
279                         <plugin>
280                                 <groupId>org.apache.maven.plugins</groupId>
281                                 <artifactId>maven-site-plugin</artifactId>
282                                 <version>3.6</version>
283                                 <dependencies>
284                                         <dependency>
285                                                 <groupId>org.apache.maven.wagon</groupId>
286                                                 <artifactId>wagon-webdav-jackrabbit</artifactId>
287                                                 <version>2.10</version>
288                                         </dependency>
289                                 </dependencies>
290                         </plugin>
291                         <plugin>
292                                 <groupId>com.mycila</groupId>
293                                 <artifactId>license-maven-plugin</artifactId>
294                                 <version>3.0</version>
295                                 <configuration>
296                                         <header>LICENSE.TXT</header>
297                                         <includes>
298                                                 <include>restclient/**</include>
299                                                 <include>src/**</include>
300                                                 <include>pom.xml</include>
301                                         </includes>
302                                         <skipExistingHeaders>true</skipExistingHeaders>
303                                         <skip>false</skip>
304                                         <mapping>
305                                                 <http>SCRIPT_STYLE</http>
306                                         </mapping>
307                                 </configuration>
308                                 <executions>
309                                         <execution>
310                                                 <goals>
311                                                         <!-- Set goal to "format" to auto update license headers -->
312                                                         <goal>check</goal>
313                                                 </goals>
314                                                 <phase>process-sources</phase>
315                                         </execution>
316                                 </executions>
317                         </plugin>
318                         <plugin>
319                                 <groupId>org.codehaus.mojo</groupId>
320                                 <artifactId>sonar-maven-plugin</artifactId>
321                                 <version>3.2</version>
322                         </plugin>
323                         <plugin>
324                              <groupId>org.jacoco</groupId>
325                              <artifactId>jacoco-maven-plugin</artifactId>
326                              <version>0.8.1</version>
327                              <configuration>
328                                   <dumpOnExit>true</dumpOnExit>
329                                   <includes>
330                                         <include>org.onap.nbi.*</include>
331                                   </includes>
332                                   <excludes>
333                                         <exclude>**/model/**/*</exclude>
334                                   </excludes>        
335                              </configuration>
336                              <executions>
337                                   <execution>
338                                         <id>pre-unit-test</id>
339                                         <goals>
340                                              <goal>prepare-agent</goal>
341                                         </goals>
342                                         <configuration>
343                                              <destFile>${project.build.directory}/coverage-reports/jacoco.exec</destFile>
344                                              <!-- <append>true</append> -->
345                                         </configuration>
346                                   </execution>
347                                   <execution>
348                                         <id>pre-integration-test</id>
349                                         <phase>pre-integration-test</phase>
350                                         <goals>
351                                              <goal>prepare-agent</goal>
352                                         </goals>
353                                         <configuration>
354                                              <destFile>${project.build.directory}/coverage-reports/jacoco-it.exec</destFile>
355                                              <!-- <append>true</append> -->
356                                         </configuration>
357                                   </execution>
358                                   <execution>
359                                         <goals>
360                                              <goal>merge</goal>
361                                         </goals>
362                                         <phase>post-integration-test</phase>
363                                         <configuration>
364                                              <fileSets>
365                                                    <fileSet implementation="org.apache.maven.shared.model.fileset.FileSet">
366                                                        <directory>${project.build.directory}/coverage-reports</directory>
367                                                        <includes>
368                                                              <include>*.exec</include>
369                                                        </includes>
370                                                   </fileSet>
371                                              </fileSets>
372                                              <destFile>${project.build.directory}/jacoco-dev.exec</destFile>
373                                         </configuration>
374                                    </execution>
375                              </executions>
376                         </plugin>
377                         <plugin>
378                                 <artifactId>maven-source-plugin</artifactId>
379                                 <executions>
380                                         <execution>
381                                                 <id>attach-sources</id>
382                                                 <phase>deploy</phase>
383                                                 <goals>
384                                                         <goal>jar-no-fork</goal>
385                                                 </goals>
386                                         </execution>
387                                 </executions>
388                         </plugin>
389                 </plugins>
390         </build>
391
392
393
394         <profiles>
395                 <profile>
396                         <id>docker</id>
397                         <build>
398                                 <plugins>
399                                         <plugin>
400                                                 <groupId>io.fabric8</groupId>
401                                                 <artifactId>docker-maven-plugin</artifactId>
402                                                 <version>0.25.0</version>
403                                                 <configuration>
404                                                         <verbose>true</verbose>
405                                                         <apiVersion>1.23</apiVersion>
406                                                         <pullRegistry>${docker.pull.registry}</pullRegistry>
407                                                         <pushRegistry>${docker.push.registry}</pushRegistry>
408                                                         <images>
409                                                                 <image>
410                                                                         <name>onap/externalapi/nbi</name>
411                                                                         <alias>onap/externalapi/nbi</alias>
412                                                                         <build>
413                                                                                 <cleanup>true</cleanup>
414                                                                                 <tags>
415                                                                                         <tag>${docker.tag}</tag>
416                                                                                         <tag>${docker.latest.tag}</tag>
417                                                                                 </tags>
418                                                                                 <dockerFileDir>${project.basedir}</dockerFileDir>
419                                                                                 <args>
420                                                                                         <PKG_FILENAME>${project.build.finalName}.${project.packaging}</PKG_FILENAME>
421                                                                                 </args>
422                                                                         </build>
423                                                                 </image>
424                                                         </images>
425                                                 </configuration>
426                                                 <executions>
427                                                         <execution>
428                                                                 <id>clean-images</id>
429                                                                 <phase>pre-clean</phase>
430                                                                 <goals>
431                                                                         <goal>remove</goal>
432                                                                 </goals>
433                                                                 <configuration>
434                                                                         <removeMode>all</removeMode>
435                                                                 </configuration>
436                                                         </execution>
437                                                         <execution>
438                                                                 <id>generate-images</id>
439                                                                 <phase>package</phase>
440                                                                 <goals>
441                                                                         <goal>build</goal>
442                                                                 </goals>
443                                                         </execution>
444                                                         <execution>
445                                                                 <id>push-images</id>
446                                                                 <phase>deploy</phase>
447                                                                 <goals>
448                                                                         <goal>push</goal>
449                                                                 </goals>
450                                                         </execution>
451                                                 </executions>
452                                         </plugin>
453                                 </plugins>
454                         </build>
455                 </profile>
456         </profiles>
457
458 </project>