Fix critical security issues
[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.12.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                                 <exclusion>
113                                         <groupId>org.apache.tomcat.embed</groupId>
114                                         <artifactId>tomcat-embed-core</artifactId>
115                                 </exclusion>
116                         </exclusions>
117                 </dependency>
118
119                 <dependency>
120                         <groupId>org.apache.tomcat.embed</groupId>
121                         <artifactId>tomcat-embed-core</artifactId>
122                         <version>8.5.33</version>
123                 </dependency>
124
125                 <dependency>
126                         <groupId>ch.qos.logback</groupId>
127                         <artifactId>logback-classic</artifactId>
128                         <version>1.2.3</version>
129                 </dependency>
130
131                 <dependency>
132                         <groupId>org.springframework.boot</groupId>
133                         <artifactId>spring-boot-starter-data-jpa</artifactId>
134       <exclusions>
135         <exclusion>
136                                         <groupId>org.springframework.data</groupId>
137                                         <artifactId>spring-data-commons</artifactId>
138         </exclusion>
139       </exclusions>
140                 </dependency>
141
142                 <dependency>
143                         <groupId>org.springframework.data</groupId>
144                         <artifactId>spring-data-commons</artifactId>
145                         <version>1.13.14.RELEASE</version>
146                 </dependency>
147
148                 <dependency>
149                                 <groupId>org.springframework.boot</groupId>
150                                 <artifactId>spring-boot-starter-aop</artifactId>
151                 </dependency>
152
153                 <dependency>
154                         <groupId>org.apache.commons</groupId>
155                         <artifactId>commons-io</artifactId>
156                         <version>1.3.2</version>
157                 </dependency>
158
159                 <dependency>
160                         <groupId>commons-beanutils</groupId>
161                         <artifactId>commons-beanutils</artifactId>
162                         <version>1.9.0</version>
163                 </dependency>
164
165                 <dependency>
166                         <groupId>javax.validation</groupId>
167                         <artifactId>validation-api</artifactId>
168                         <version>2.0.1.Final</version>
169                 </dependency>
170
171                 <dependency>
172                         <groupId>org.apache.commons</groupId>
173                         <artifactId>commons-lang3</artifactId>
174                         <version>3.4</version>
175                 </dependency>
176
177                 <!-- mongo -->
178
179                 <dependency>
180                         <groupId>org.springframework.boot</groupId>
181                         <artifactId>spring-boot-starter-data-mongodb</artifactId>
182                 </dependency>
183
184                 <!-- mysql -->
185
186                 <dependency>
187                         <groupId>org.mariadb.jdbc</groupId>
188                         <artifactId>mariadb-java-client</artifactId>
189                         <version>1.1.7</version>
190                 </dependency>
191
192                 <!-- swagger -->
193
194                 <dependency>
195                         <groupId>io.swagger</groupId>
196                         <artifactId>swagger-annotations</artifactId>
197                         <version>1.5.18</version>
198                 </dependency>
199
200                 <!-- jackson -->
201
202                 <dependency>
203                         <groupId>com.fasterxml.jackson.dataformat</groupId>
204                         <artifactId>jackson-dataformat-yaml</artifactId>
205                         <version>2.9.6</version>
206                 </dependency>
207
208                 <!-- jolt -->
209
210                 <dependency>
211                         <groupId>com.bazaarvoice.jolt</groupId>
212                         <artifactId>jolt-core</artifactId>
213                         <version>0.1.0</version>
214                         <exclusions>
215                                 <exclusion>
216                                         <groupId>com.fasterxml.jackson.core</groupId>
217                                         <artifactId>jackson-databind</artifactId>
218                                 </exclusion>
219                         </exclusions>
220                 </dependency>
221
222                 <dependency>
223                         <groupId>com.bazaarvoice.jolt</groupId>
224                         <artifactId>json-utils</artifactId>
225                         <version>0.1.0</version>
226                 </dependency>
227
228                 <!-- test -->
229
230                 <dependency>
231                         <groupId>org.springframework.boot</groupId>
232                         <artifactId>spring-boot-starter-test</artifactId>
233                         <scope>test</scope>
234                 </dependency>
235
236                 <!-- test h2 -->
237
238                 <dependency>
239                         <groupId>com.h2database</groupId>
240                         <artifactId>h2</artifactId>
241                         <scope>test</scope>
242                 </dependency>
243
244                 <dependency>
245                         <groupId>de.flapdoodle.embed</groupId>
246                         <artifactId>de.flapdoodle.embed.mongo</artifactId>
247                         <version>${embedded-mongo.version}</version>
248                         <scope>test</scope>
249                 </dependency>
250
251                 <!-- test wiremock -->
252
253                 <dependency>
254                         <groupId>org.springframework.cloud</groupId>
255                         <artifactId>spring-cloud-contract-wiremock</artifactId>
256                         <version>1.0.0.RELEASE</version>
257                         <scope>test</scope>
258                 </dependency>
259
260                 <dependency>
261                         <groupId>org.eclipse.jetty</groupId>
262                         <artifactId>jetty-server</artifactId>
263                         <version>9.4.7.RC0</version>
264                         <scope>test</scope>
265                 </dependency>
266
267                 <dependency>
268                         <groupId>org.eclipse.jetty</groupId>
269                         <artifactId>jetty-servlet</artifactId>
270                         <scope>test</scope>
271                 </dependency>
272
273                 <dependency>
274                         <groupId>org.eclipse.jetty</groupId>
275                         <artifactId>jetty-servlets</artifactId>
276                         <scope>test</scope>
277                 </dependency>
278
279                 <!-- runtime dev -->
280
281                 <dependency>
282                         <groupId>org.springframework.boot</groupId>
283                         <artifactId>spring-boot-devtools</artifactId>
284                         <scope>runtime</scope>
285                 </dependency>
286
287                 <!-- MSB SDK-->
288                 <dependency>
289                         <groupId>org.onap.msb.java-sdk</groupId>
290                         <artifactId>msb-java-sdk</artifactId>
291                         <version>1.1.1</version>
292                 </dependency>
293
294         </dependencies>
295
296         <build>
297                 <plugins>
298                         <plugin>
299                                 <groupId>org.springframework.boot</groupId>
300                                 <artifactId>spring-boot-maven-plugin</artifactId>
301                         </plugin>
302                         <plugin>
303                                 <groupId>org.sonatype.plugins</groupId>
304                                 <artifactId>nexus-staging-maven-plugin</artifactId>
305                                 <version>1.6.7</version>
306                                 <extensions>true</extensions>
307                                 <configuration>
308                                         <nexusUrl>${nexusproxy}</nexusUrl>
309                                         <stagingProfileId>176c31dfe190a</stagingProfileId>
310                                         <serverId>ecomp-staging</serverId>
311                                 </configuration>
312                         </plugin>
313                         <plugin>
314                                 <groupId>org.apache.maven.plugins</groupId>
315                                 <artifactId>maven-site-plugin</artifactId>
316                                 <version>3.6</version>
317                                 <dependencies>
318                                         <dependency>
319                                                 <groupId>org.apache.maven.wagon</groupId>
320                                                 <artifactId>wagon-webdav-jackrabbit</artifactId>
321                                                 <version>2.10</version>
322                                         </dependency>
323                                 </dependencies>
324                         </plugin>
325                         <plugin>
326                                 <groupId>com.mycila</groupId>
327                                 <artifactId>license-maven-plugin</artifactId>
328                                 <version>3.0</version>
329                                 <configuration>
330                                         <header>LICENSE.TXT</header>
331                                         <includes>
332                                                 <include>restclient/**</include>
333                                                 <include>src/**</include>
334                                                 <include>./**/*.xml</include>
335                                                 <include>./**/*.xml</include>
336                                                 <include>./**/*.yml</include>
337                                                 <include>./**/*.yaml</include>
338                                         </includes>
339                                         <skipExistingHeaders>true</skipExistingHeaders>
340                                         <skip>false</skip>
341                                         <mapping>
342                                                 <http>SCRIPT_STYLE</http>
343                                         </mapping>
344                                 </configuration>
345                                 <executions>
346                                         <execution>
347                                                 <goals>
348                                                         <!-- Set goal to "format" to auto update license headers -->
349                                                         <goal>check</goal>
350                                                 </goals>
351                                                 <phase>process-sources</phase>
352                                         </execution>
353                                 </executions>
354                         </plugin>
355                         <plugin>
356                                 <groupId>org.codehaus.mojo</groupId>
357                                 <artifactId>sonar-maven-plugin</artifactId>
358                                 <version>3.2</version>
359                         </plugin>
360                         <plugin>
361                              <groupId>org.jacoco</groupId>
362                              <artifactId>jacoco-maven-plugin</artifactId>
363                              <version>0.8.1</version>
364                              <configuration>
365                                   <dumpOnExit>true</dumpOnExit>
366                                   <includes>
367                                         <include>org.onap.nbi.*</include>
368                                   </includes>
369                                   <excludes>
370                                         <exclude>**/model/**/*</exclude>
371                                   </excludes>        
372                              </configuration>
373                              <executions>
374                                   <execution>
375                                         <id>pre-unit-test</id>
376                                         <goals>
377                                              <goal>prepare-agent</goal>
378                                         </goals>
379                                         <configuration>
380                                              <destFile>${project.build.directory}/coverage-reports/jacoco.exec</destFile>
381                                              <!-- <append>true</append> -->
382                                         </configuration>
383                                   </execution>
384                                   <execution>
385                                         <id>pre-integration-test</id>
386                                         <phase>pre-integration-test</phase>
387                                         <goals>
388                                              <goal>prepare-agent</goal>
389                                         </goals>
390                                         <configuration>
391                                              <destFile>${project.build.directory}/coverage-reports/jacoco-it.exec</destFile>
392                                              <!-- <append>true</append> -->
393                                         </configuration>
394                                   </execution>
395                                   <execution>
396                                         <goals>
397                                              <goal>merge</goal>
398                                         </goals>
399                                         <phase>post-integration-test</phase>
400                                         <configuration>
401                                              <fileSets>
402                                                    <fileSet implementation="org.apache.maven.shared.model.fileset.FileSet">
403                                                        <directory>${project.build.directory}/coverage-reports</directory>
404                                                        <includes>
405                                                              <include>*.exec</include>
406                                                        </includes>
407                                                   </fileSet>
408                                              </fileSets>
409                                              <destFile>${project.build.directory}/jacoco-dev.exec</destFile>
410                                         </configuration>
411                                    </execution>
412                              </executions>
413                         </plugin>
414                         <plugin>
415                                 <artifactId>maven-source-plugin</artifactId>
416                                 <executions>
417                                         <execution>
418                                                 <id>attach-sources</id>
419                                                 <phase>deploy</phase>
420                                                 <goals>
421                                                         <goal>jar-no-fork</goal>
422                                                 </goals>
423                                         </execution>
424                                 </executions>
425                         </plugin>
426                 </plugins>
427         </build>
428
429
430
431         <profiles>
432                 <profile>
433                         <id>docker</id>
434                         <build>
435                                 <plugins>
436                                         <plugin>
437                                                 <groupId>io.fabric8</groupId>
438                                                 <artifactId>docker-maven-plugin</artifactId>
439                                                 <version>0.25.0</version>
440                                                 <configuration>
441                                                         <verbose>true</verbose>
442                                                         <apiVersion>1.23</apiVersion>
443                                                         <pullRegistry>${docker.pull.registry}</pullRegistry>
444                                                         <pushRegistry>${docker.push.registry}</pushRegistry>
445                                                         <images>
446                                                                 <image>
447                                                                         <name>onap/externalapi/nbi</name>
448                                                                         <alias>onap/externalapi/nbi</alias>
449                                                                         <build>
450                                                                                 <cleanup>true</cleanup>
451                                                                                 <tags>
452                                                                                         <tag>${docker.tag}</tag>
453                                                                                         <tag>${docker.latest.tag}</tag>
454                                                                                 </tags>
455                                                                                 <dockerFileDir>${project.basedir}</dockerFileDir>
456                                                                                 <args>
457                                                                                         <PKG_FILENAME>${project.build.finalName}.${project.packaging}</PKG_FILENAME>
458                                                                                 </args>
459                                                                         </build>
460                                                                 </image>
461                                                         </images>
462                                                 </configuration>
463                                                 <executions>
464                                                         <execution>
465                                                                 <id>clean-images</id>
466                                                                 <phase>pre-clean</phase>
467                                                                 <goals>
468                                                                         <goal>remove</goal>
469                                                                 </goals>
470                                                                 <configuration>
471                                                                         <removeMode>all</removeMode>
472                                                                 </configuration>
473                                                         </execution>
474                                                         <execution>
475                                                                 <id>generate-images</id>
476                                                                 <phase>package</phase>
477                                                                 <goals>
478                                                                         <goal>build</goal>
479                                                                 </goals>
480                                                         </execution>
481                                                         <execution>
482                                                                 <id>push-images</id>
483                                                                 <phase>deploy</phase>
484                                                                 <goals>
485                                                                         <goal>push</goal>
486                                                                 </goals>
487                                                         </execution>
488                                                 </executions>
489                                         </plugin>
490                                 </plugins>
491                         </build>
492                 </profile>
493         </profiles>
494
495 </project>