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