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