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