Improve license scan result
[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 <!-- Copyright (c) 2018 Orange Licensed under the Apache License, Version 
20         2.0 (the "License"); you may not use this file except in compliance with 
21         the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 
22         Unless required by applicable law or agreed to in writing, software distributed 
23         under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES 
24         OR CONDITIONS OF ANY KIND, either express or implied. See the License for 
25         the specific language governing permissions and limitations under the License. -->
26 <project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
27   xmlns="http://maven.apache.org/POM/4.0.0"
28   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
29   <modelVersion>4.0.0</modelVersion>
30
31   <groupId>org.onap.externalapi-nbi</groupId>
32   <artifactId>nbi-rest-services</artifactId>
33   <version>5.0.0-SNAPSHOT</version>
34   <packaging>jar</packaging>
35
36   <name>externalapi-nbi</name>
37
38   <parent>
39     <groupId>org.onap.oparent</groupId>
40     <artifactId>oparent</artifactId>
41     <version>2.0.0</version>
42   </parent>
43
44   <properties>
45     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
46     <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
47     <maven.compiler.target>1.8</maven.compiler.target>
48     <maven.compiler.source>1.8</maven.compiler.source>
49     <start-class>org.onap.nbi.Application</start-class>
50     <onap.nexus.url>https://nexus.onap.org</onap.nexus.url>
51     <nexusproxy>https://nexus.onap.org</nexusproxy>
52     <snapshotNexusPath>content/repositories/snapshots/</snapshotNexusPath>
53     <releaseNexusPath>content/repositories/releases/</releaseNexusPath>
54     <stagingNexusPath>content/repositories/staging/</stagingNexusPath>
55     <java.version>1.8</java.version>
56     <docker.pull.registry>nexus3.onap.org:10001</docker.pull.registry>
57     <docker.push.registry>nexus3.onap.org:10003</docker.push.registry>
58     <timestamp>${maven.build.timestamp}</timestamp>
59     <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
60     <!--docker -->
61     <docker.tag>${project.version}-${timestamp}</docker.tag>
62     <docker.latest.tag>${project.version}-latest</docker.latest.tag>
63     <!--sonar -->
64     <sonar.language>java</sonar.language>
65     <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
66     <sonar.surefire.reportsPath>${project.build.directory}/surefire-reports
67     </sonar.surefire.reportsPath>
68     <sonar.jacoco.reportPath>${project.build.directory}/coverage-reports/jacoco.exec
69     </sonar.jacoco.reportPath>
70     <sonar.jacoco.itReportPath>${project.build.directory}/coverage-reports/jacoco-it.exec
71     </sonar.jacoco.itReportPath>
72     <sonar.jacoco.reportMissing.force.zero>true</sonar.jacoco.reportMissing.force.zero>
73     <sonar.projectVersion>${project.version}</sonar.projectVersion>
74     <sonar.coverage.exclusions>**/model/**/*</sonar.coverage.exclusions>
75   </properties>
76
77   <!--<repositories>-->
78   <!--<repository>-->
79   <!--<id>maven2-repository.java.net</id>-->
80   <!--<name>Java.net Repository for Maven</name>-->
81   <!--<url>http://download.java.net/maven/2/</url>-->
82   <!--<layout>default</layout>-->
83   <!--</repository>-->
84   <!--<repository>-->
85   <!--<id>ecomp-release</id>-->
86   <!--<name>Snapshot Repository</name>-->
87   <!--<url>https://nexus.onap.org/content/repositories/releases/</url>-->
88   <!--</repository>-->
89   <!--<repository>-->
90   <!--<id>ecomp-staging</id>-->
91   <!--<name>Staging Repository</name>-->
92   <!--<url>https://nexus.onap.org/content/repositories/staging/</url>-->
93   <!--</repository>-->
94   <!--<repository>-->
95   <!--<id>ecomp-snapshots</id>-->
96   <!--<name>Snapshot Repository</name>-->
97   <!--<url>https://nexus.onap.org/content/repositories/snapshots/</url>-->
98   <!--</repository>-->
99   <!--</repositories>-->
100
101   <distributionManagement>
102     <repository>
103       <id>ecomp-releases</id>
104       <name>Release Repository</name>
105       <url>${nexusproxy}/${releaseNexusPath}</url>
106     </repository>
107     <snapshotRepository>
108       <id>ecomp-snapshots</id>
109       <name>Snapshot Repository</name>
110       <url>${nexusproxy}/${snapshotNexusPath}</url>
111     </snapshotRepository>
112   </distributionManagement>
113
114   <licenses>
115     <license>
116       <name>Apache2</name>
117       <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
118     </license>
119   </licenses>
120
121   <dependencyManagement>
122     <dependencies>
123       <dependency>
124         <groupId>org.springframework.boot</groupId>
125         <artifactId>spring-boot-dependencies</artifactId>
126         <version>2.1.7.RELEASE</version>
127         <type>pom</type>
128         <scope>import</scope>
129       </dependency>
130     </dependencies>
131   </dependencyManagement>
132
133   <dependencies>
134
135     <dependency>
136       <groupId>org.springframework.boot</groupId>
137       <artifactId>spring-boot-starter-web</artifactId>
138       <exclusions>
139         <exclusion>
140           <groupId>org.apache.tomcat.embed</groupId>
141           <artifactId>tomcat-embed-core</artifactId>
142         </exclusion>
143       </exclusions>
144     </dependency>
145
146     <dependency>
147       <groupId>org.apache.tomcat.embed</groupId>
148       <artifactId>tomcat-embed-core</artifactId>
149     </dependency>
150
151     <dependency>
152       <groupId>org.springframework.boot</groupId>
153       <artifactId>spring-boot-starter-data-jpa</artifactId>
154     </dependency>
155
156     <dependency>
157       <groupId>org.springframework.boot</groupId>
158       <artifactId>spring-boot-starter-aop</artifactId>
159     </dependency>
160
161     <dependency>
162       <groupId>org.apache.commons</groupId>
163       <artifactId>commons-io</artifactId>
164       <version>1.3.2</version>
165     </dependency>
166
167     <dependency>
168       <groupId>commons-beanutils</groupId>
169       <artifactId>commons-beanutils</artifactId>
170       <version>1.9.3</version>
171     </dependency>
172
173     <dependency>
174       <groupId>javax.validation</groupId>
175       <artifactId>validation-api</artifactId>
176     </dependency>
177
178     <dependency>
179       <groupId>org.apache.commons</groupId>
180       <artifactId>commons-lang3</artifactId>
181     </dependency>
182
183     <!-- mongo -->
184
185     <dependency>
186       <groupId>org.springframework.boot</groupId>
187       <artifactId>spring-boot-starter-data-mongodb</artifactId>
188     </dependency>
189
190     <!-- mysql -->
191
192     <dependency>
193       <groupId>org.mariadb.jdbc</groupId>
194       <artifactId>mariadb-java-client</artifactId>
195     </dependency>
196
197     <!-- swagger -->
198
199     <dependency>
200       <groupId>io.swagger</groupId>
201       <artifactId>swagger-annotations</artifactId>
202       <version>1.5.18</version>
203     </dependency>
204
205     <!-- swagger core -->
206     <dependency>
207       <groupId>io.swagger</groupId>
208       <artifactId>swagger-core</artifactId>
209       <version>1.5.18</version>
210     </dependency>
211
212     <!-- jackson -->
213
214     <dependency>
215       <groupId>com.fasterxml.jackson.dataformat</groupId>
216       <artifactId>jackson-dataformat-yaml</artifactId>
217     </dependency>
218
219     <!-- sdc tosca parser -->
220
221     <dependency>
222       <groupId>org.onap.sdc.sdc-tosca</groupId>
223       <artifactId>sdc-tosca</artifactId>
224       <version>1.6.0</version>
225       <exclusions>
226         <exclusion>
227           <groupId>com.google.guava</groupId>
228           <artifactId>guava</artifactId>
229         </exclusion>
230         <exclusion>
231           <groupId>commons-codec</groupId>
232           <artifactId>commons-codec</artifactId>
233         </exclusion>
234       </exclusions>
235     </dependency>
236
237     <dependency>
238       <groupId>commons-codec</groupId>
239       <artifactId>commons-codec</artifactId>
240       <version>1.13</version>
241     </dependency>
242
243     <!-- jolt -->
244
245     <dependency>
246       <groupId>com.bazaarvoice.jolt</groupId>
247       <artifactId>jolt-core</artifactId>
248       <version>0.1.0</version>
249       <exclusions>
250         <exclusion>
251           <groupId>com.fasterxml.jackson.core</groupId>
252           <artifactId>jackson-databind</artifactId>
253         </exclusion>
254       </exclusions>
255     </dependency>
256
257     <dependency>
258       <groupId>com.bazaarvoice.jolt</groupId>
259       <artifactId>json-utils</artifactId>
260       <version>0.1.0</version>
261       <exclusions>
262         <exclusion>
263           <groupId>com.fasterxml.jackson.core</groupId>
264           <artifactId>jackson-databind</artifactId>
265         </exclusion>
266       </exclusions>
267     </dependency>
268
269     <!-- test -->
270
271     <dependency>
272       <groupId>org.springframework.boot</groupId>
273       <artifactId>spring-boot-starter-test</artifactId>
274       <scope>test</scope>
275     </dependency>
276
277     <!-- test h2 -->
278
279     <dependency>
280       <groupId>com.h2database</groupId>
281       <artifactId>h2</artifactId>
282       <scope>test</scope>
283     </dependency>
284
285     <dependency>
286       <groupId>de.flapdoodle.embed</groupId>
287       <artifactId>de.flapdoodle.embed.mongo</artifactId>
288       <scope>test</scope>
289     </dependency>
290
291     <!-- test wiremock -->
292
293     <dependency>
294       <groupId>org.springframework.cloud</groupId>
295       <artifactId>spring-cloud-contract-wiremock</artifactId>
296       <version>1.2.6.RELEASE</version>
297       <scope>test</scope>
298       <exclusions>
299         <exclusion>
300           <groupId>com.fasterxml.jackson.core</groupId>
301           <artifactId>jackson-databind</artifactId>
302         </exclusion>
303         <exclusion>
304           <groupId>commons-codec</groupId>
305           <artifactId>commons-codec</artifactId>
306         </exclusion>
307       </exclusions>
308     </dependency>
309
310     <dependency>
311       <groupId>org.eclipse.jetty</groupId>
312       <artifactId>jetty-servlet</artifactId>
313       <scope>test</scope>
314     </dependency>
315
316     <dependency>
317       <groupId>org.eclipse.jetty</groupId>
318       <artifactId>jetty-servlets</artifactId>
319       <scope>test</scope>
320     </dependency>
321
322     <!-- runtime dev -->
323
324     <dependency>
325       <groupId>org.springframework.boot</groupId>
326       <artifactId>spring-boot-devtools</artifactId>
327       <scope>runtime</scope>
328     </dependency>
329
330     <!-- MSB SDK -->
331     <dependency>
332       <groupId>org.onap.msb.java-sdk</groupId>
333       <artifactId>msb-java-sdk</artifactId>
334       <version>1.1.1</version>
335       <exclusions>
336         <exclusion>
337           <groupId>com.google.guava</groupId>
338           <artifactId>guava</artifactId>
339         </exclusion>
340         <exclusion>
341           <groupId>com.squareup.okhttp3</groupId>
342           <artifactId>okhttp</artifactId>
343         </exclusion>
344       </exclusions>
345     </dependency>
346
347     <dependency>
348       <groupId>com.squareup.okhttp3</groupId>
349       <artifactId>okhttp</artifactId>
350       <version>3.14.1</version>
351     </dependency>
352
353     <dependency>
354       <groupId>com.google.guava</groupId>
355       <artifactId>guava</artifactId>
356     </dependency>
357
358     <!-- karate -->
359
360     <dependency>
361       <groupId>com.intuit.karate</groupId>
362       <artifactId>karate-junit4</artifactId>
363       <version>0.9.0</version>
364       <scope>test</scope>
365     </dependency>
366
367     <dependency>
368       <groupId>com.intuit.karate</groupId>
369       <artifactId>karate-apache</artifactId>
370       <version>0.9.0</version>
371       <scope>test</scope>
372     </dependency>
373
374   </dependencies>
375
376   <build>
377     <testResources>
378       <testResource>
379         <directory>src/test/java</directory>
380         <excludes>
381           <exclude>**/*.java</exclude>
382         </excludes>
383       </testResource>
384       <testResource>
385         <directory>src/test/resources</directory>
386       </testResource>
387     </testResources>
388     <plugins>
389       <plugin>
390         <groupId>org.springframework.boot</groupId>
391         <artifactId>spring-boot-maven-plugin</artifactId>
392         <executions>
393           <execution>
394             <goals>
395               <goal>repackage</goal>
396             </goals>
397             <configuration>
398               <mainClass>org.onap.nbi.Application</mainClass>
399             </configuration>
400           </execution>
401         </executions>
402       </plugin>
403       <plugin>
404         <groupId>org.apache.maven.plugins</groupId>
405         <artifactId>maven-surefire-plugin</artifactId>
406         <version>2.22.0</version>
407         <configuration>
408 <!--          <argLine>-->
409 <!--            &#45;&#45;illegal-access=permit-->
410 <!--          </argLine>-->
411           <includes>
412             <include>org/onap/nbi/test/KarateApiTest.java</include>
413             <include>org/onap/nbi/test/ExecutionTaskTest.java</include>
414             <include>org/onap/nbi/test/ServiceOrderRepositoryTest.java</include>
415             <include>org/onap/nbi/apis/servicecatalog/ToscaInfosProcessorTest.java</include>
416           </includes>
417         </configuration>
418       </plugin>
419       <plugin>
420         <groupId>org.apache.maven.plugins</groupId>
421         <artifactId>maven-site-plugin</artifactId>
422         <dependencies>
423           <dependency>
424             <groupId>org.apache.maven.wagon</groupId>
425             <artifactId>wagon-webdav-jackrabbit</artifactId>
426             <version>2.10</version>
427           </dependency>
428         </dependencies>
429       </plugin>
430       <plugin>
431         <groupId>com.mycila</groupId>
432         <artifactId>license-maven-plugin</artifactId>
433         <version>3.0</version>
434         <configuration>
435           <header>LICENSE.TXT</header>
436           <includes>
437             <include>restclient/**</include>
438             <include>src/**</include>
439             <include>**/*.xml</include>
440             <include>**/*.xsd</include>
441             <include>**/*.yml</include>
442             <include>**/*.yaml</include>
443             <include>**/*.plantuml</include>
444           </includes>
445           <excludes>
446             <!-- karate-config.js doesn't support comment, and is mandatory by
447               karate -->
448             <exclude>src/test/java/karate-config.js</exclude>
449             <exclude>releases/**/*.yaml</exclude>
450           </excludes>
451           <skipExistingHeaders>true</skipExistingHeaders>
452           <skip>false</skip>
453           <mapping>
454             <http>SCRIPT_STYLE</http>
455             <xsd>XML_STYLE</xsd>
456             <yaml>SCRIPT_STYLE</yaml>
457             <yml>SCRIPT_STYLE</yml>
458             <feature>SCRIPT_STYLE</feature>
459             <plantuml>SCRIPT_STYLE</plantuml>
460           </mapping>
461         </configuration>
462         <executions>
463           <execution>
464             <goals>
465               <!-- Set goal to "format" to auto update license headers -->
466               <goal>check</goal>
467             </goals>
468             <phase>process-sources</phase>
469           </execution>
470         </executions>
471       </plugin>
472       <plugin>
473         <groupId>org.codehaus.mojo</groupId>
474         <artifactId>sonar-maven-plugin</artifactId>
475         <version>3.2</version>
476       </plugin>
477       <plugin>
478         <groupId>org.jacoco</groupId>
479         <artifactId>jacoco-maven-plugin</artifactId>
480         <version>0.8.1</version>
481         <configuration>
482           <dumpOnExit>true</dumpOnExit>
483           <includes>
484             <include>org.onap.nbi.*</include>
485           </includes>
486           <excludes>
487             <exclude>**/model/**/*</exclude>
488           </excludes>
489         </configuration>
490         <executions>
491           <execution>
492             <id>pre-unit-test</id>
493             <goals>
494               <goal>prepare-agent</goal>
495             </goals>
496             <configuration>
497               <destFile>${project.build.directory}/coverage-reports/jacoco.exec</destFile>
498             </configuration>
499           </execution>
500           <execution>
501             <id>pre-integration-test</id>
502             <phase>pre-integration-test</phase>
503             <goals>
504               <goal>prepare-agent</goal>
505             </goals>
506             <configuration>
507               <destFile>${project.build.directory}/coverage-reports/jacoco-it.exec</destFile>
508             </configuration>
509           </execution>
510           <execution>
511             <goals>
512               <goal>merge</goal>
513             </goals>
514             <phase>post-integration-test</phase>
515             <configuration>
516               <fileSets>
517                 <fileSet
518                   implementation="org.apache.maven.shared.model.fileset.FileSet">
519                   <directory>${project.build.directory}/coverage-reports</directory>
520                   <includes>
521                     <include>*.exec</include>
522                   </includes>
523                 </fileSet>
524               </fileSets>
525               <destFile>${project.build.directory}/jacoco-dev.exec</destFile>
526             </configuration>
527           </execution>
528         </executions>
529       </plugin>
530       <plugin>
531         <artifactId>maven-source-plugin</artifactId>
532         <executions>
533           <execution>
534             <id>attach-sources</id>
535             <phase>deploy</phase>
536             <goals>
537               <goal>jar-no-fork</goal>
538             </goals>
539           </execution>
540         </executions>
541       </plugin>
542     </plugins>
543   </build>
544
545   <profiles>
546     <profile>
547       <id>docker</id>
548       <build>
549         <plugins>
550           <plugin>
551             <groupId>io.fabric8</groupId>
552             <artifactId>docker-maven-plugin</artifactId>
553             <version>0.28.0</version>
554             <configuration>
555               <verbose>true</verbose>
556               <apiVersion>1.23</apiVersion>
557               <pullRegistry>${docker.pull.registry}</pullRegistry>
558               <pushRegistry>${docker.push.registry}</pushRegistry>
559               <images>
560                 <image>
561                   <name>onap/externalapi/nbi:${docker.tag}</name>
562                   <build>
563                     <cleanup>true</cleanup>
564                     <tags>
565                       <tag>latest</tag>
566                       <tag>${docker.latest.tag}</tag>
567                     </tags>
568                     <dockerFileDir>${project.basedir}</dockerFileDir>
569                     <args>
570                       <PKG_FILENAME>${project.build.finalName}.${project.packaging}</PKG_FILENAME>
571                     </args>
572                   </build>
573                 </image>
574               </images>
575             </configuration>
576             <executions>
577               <execution>
578                 <id>clean-images</id>
579                 <phase>pre-clean</phase>
580                 <goals>
581                   <goal>remove</goal>
582                 </goals>
583                 <configuration>
584                   <removeMode>all</removeMode>
585                 </configuration>
586               </execution>
587               <execution>
588                 <id>generate-images</id>
589                 <phase>package</phase>
590                 <goals>
591                   <goal>build</goal>
592                 </goals>
593               </execution>
594               <execution>
595                 <id>push-images</id>
596                 <phase>deploy</phase>
597                 <goals>
598                   <goal>push</goal>
599                 </goals>
600               </execution>
601             </executions>
602           </plugin>
603         </plugins>
604       </build>
605     </profile>
606     <profile>
607       <id>onap-settings</id>
608       <properties>
609         <onap.nexus.url>https://nexus.onap.org</onap.nexus.url>
610         <onap.nexus.rawrepo.baseurl.upload>https://nexus.onap.org/content/sites/raw
611         </onap.nexus.rawrepo.baseurl.upload>
612         <onap.nexus.rawrepo.baseurl.download>
613           https://nexus.onap.org/service/local/repositories/raw/content
614         </onap.nexus.rawrepo.baseurl.download>
615         <onap.nexus.rawrepo.serverid>ecomp-raw</onap.nexus.rawrepo.serverid>
616
617         <!-- properties for Nexus Docker registry -->
618         <onap.nexus.dockerregistry.daily>nexus3.onap.org:10003</onap.nexus.dockerregistry.daily>
619         <onap.nexus.dockerregistry.release>nexus3.onap.org:10002</onap.nexus.dockerregistry.release>
620         <docker.pull.registry>nexus3.onap.org:10001</docker.pull.registry>
621         <docker.push.registry>nexus3.onap.org:10003</docker.push.registry>
622       </properties>
623     </profile>
624     <profile>
625       <id>onap-snapshots</id>
626       <repositories>
627         <repository>
628           <id>onap-snapshots</id>
629           <name>onap-snapshots</name>
630           <url>https://nexus.onap.org/content/repositories/snapshots/</url>
631           <releases>
632             <enabled>false</enabled>
633           </releases>
634           <snapshots>
635             <enabled>true</enabled>
636           </snapshots>
637         </repository>
638       </repositories>
639       <pluginRepositories>
640         <pluginRepository>
641           <id>onap-snapshots</id>
642           <name>onap-snapshots</name>
643           <url>https://nexus.onap.org/content/repositories/snapshots/</url>
644           <releases>
645             <enabled>false</enabled>
646           </releases>
647           <snapshots>
648             <enabled>true</enabled>
649           </snapshots>
650         </pluginRepository>
651       </pluginRepositories>
652     </profile>
653     <profile>
654       <id>onap-releases</id>
655       <repositories>
656         <repository>
657           <id>onap-releases</id>
658           <name>onap-releases</name>
659           <url>https://nexus.onap.org/content/repositories/releases/</url>
660           <releases>
661             <enabled>true</enabled>
662           </releases>
663           <snapshots>
664             <enabled>false</enabled>
665           </snapshots>
666         </repository>
667       </repositories>
668       <pluginRepositories>
669         <pluginRepository>
670           <id>onap-releases</id>
671           <name>onap-releases</name>
672           <url>https://nexus.onap.org/content/repositories/releases/</url>
673           <releases>
674             <enabled>true</enabled>
675           </releases>
676           <snapshots>
677             <enabled>false</enabled>
678           </snapshots>
679         </pluginRepository>
680       </pluginRepositories>
681     </profile>
682     <profile>
683       <id>onap-public</id>
684       <repositories>
685         <repository>
686           <id>central</id>
687           <url>http://repo1.maven.org/maven2/</url>
688         </repository>
689         <repository>
690           <id>onap-public</id>
691           <name>onap-public</name>
692           <url>https://nexus.onap.org/content/repositories/public/</url>
693           <releases>
694             <enabled>true</enabled>
695           </releases>
696           <snapshots>
697             <enabled>false</enabled>
698           </snapshots>
699         </repository>
700       </repositories>
701       <pluginRepositories>
702         <pluginRepository>
703           <id>central</id>
704           <url>http://repo1.maven.org/maven2/</url>
705         </pluginRepository>
706         <pluginRepository>
707           <id>onap-public</id>
708           <name>onap-public</name>
709           <url>https://nexus.onap.org/content/repositories/public/</url>
710           <releases>
711             <enabled>true</enabled>
712           </releases>
713           <snapshots>
714             <enabled>false</enabled>
715           </snapshots>
716         </pluginRepository>
717       </pluginRepositories>
718     </profile>
719   </profiles>
720
721 </project>