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