Update to latest msb-java-sdk
[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>3.0.1</version>
17   <packaging>jar</packaging>
18
19   <name>externalapi-nbi</name>
20
21   <parent>
22     <groupId>org.springframework.boot</groupId>
23     <artifactId>spring-boot-starter-parent</artifactId>
24     <version>2.1.2.RELEASE</version>
25     <relativePath/> <!-- lookup parent from repository -->
26   </parent>
27
28   <properties>
29     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
30     <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
31     <nexusproxy>https://nexus.onap.org</nexusproxy>
32     <snapshotNexusPath>content/repositories/snapshots/</snapshotNexusPath>
33     <releaseNexusPath>content/repositories/releases/</releaseNexusPath>
34     <stagingNexusPath>content/repositories/staging/</stagingNexusPath>
35     <java.version>1.8</java.version>
36     <docker.pull.registry>nexus3.onap.org:10001</docker.pull.registry>
37     <docker.push.registry>nexus3.onap.org:10003</docker.push.registry>
38     <timestamp>${maven.build.timestamp}</timestamp>
39     <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
40     <!--docker -->
41     <docker.tag>${project.version}-${timestamp}</docker.tag>
42     <docker.latest.tag>${project.version}-latest</docker.latest.tag>
43     <!--sonar -->
44     <sonar.language>java</sonar.language>
45     <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
46     <sonar.surefire.reportsPath>${project.build.directory}/surefire-reports
47     </sonar.surefire.reportsPath>
48     <sonar.jacoco.reportPath>${project.build.directory}/coverage-reports/jacoco.exec
49     </sonar.jacoco.reportPath>
50     <sonar.jacoco.itReportPath>${project.build.directory}/coverage-reports/jacoco-it.exec
51     </sonar.jacoco.itReportPath>
52     <sonar.jacoco.reportMissing.force.zero>true</sonar.jacoco.reportMissing.force.zero>
53     <sonar.projectVersion>${project.version}</sonar.projectVersion>
54     <sonar.coverage.exclusions>**/model/**/*</sonar.coverage.exclusions>
55   </properties>
56
57   <repositories>
58     <repository>
59       <id>maven2-repository.java.net</id>
60       <name>Java.net Repository for Maven</name>
61       <url>http://download.java.net/maven/2/</url>
62       <layout>default</layout>
63     </repository>
64     <repository>
65       <id>ecomp-snapshots</id>
66       <name>Snapshot Repository</name>
67       <url>https://nexus.onap.org/content/repositories/releases/</url>
68     </repository>
69     <repository>
70       <id>ecomp-staging</id>
71       <name>Staging Repository</name>
72       <url>https://nexus.onap.org/content/repositories/staging/</url>
73     </repository>
74   </repositories>
75
76   <distributionManagement>
77     <repository>
78       <id>ecomp-releases</id>
79       <name>Release Repository</name>
80       <url>${nexusproxy}/${releaseNexusPath}</url>
81     </repository>
82     <snapshotRepository>
83       <id>ecomp-snapshots</id>
84       <name>Snapshot Repository</name>
85       <url>${nexusproxy}/${snapshotNexusPath}</url>
86     </snapshotRepository>
87   </distributionManagement>
88
89   <licenses>
90     <license>
91       <name>Apache2</name>
92       <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
93     </license>
94   </licenses>
95
96   <dependencies>
97
98     <dependency>
99       <groupId>org.springframework.boot</groupId>
100       <artifactId>spring-boot-starter-web</artifactId>
101       <exclusions>
102         <exclusion>
103           <groupId>ch.qos.logback</groupId>
104           <artifactId>logback-classic</artifactId>
105         </exclusion>
106         <exclusion>
107           <groupId>com.fasterxml.jackson.core</groupId>
108           <artifactId>jackson-databind</artifactId>
109         </exclusion>
110       </exclusions>
111     </dependency>
112
113     <dependency>
114       <groupId>com.fasterxml.jackson.core</groupId>
115       <artifactId>jackson-databind</artifactId>
116       <version>2.9.4</version>
117     </dependency>
118
119     <dependency>
120       <groupId>ch.qos.logback</groupId>
121       <artifactId>logback-classic</artifactId>
122       <version>1.2.3</version>
123     </dependency>
124
125     <dependency>
126       <groupId>org.springframework.boot</groupId>
127       <artifactId>spring-boot-starter-data-jpa</artifactId>
128       <exclusions>
129         <exclusion>
130           <groupId>org.springframework.data</groupId>
131           <artifactId>spring-data-commons</artifactId>
132         </exclusion>
133       </exclusions>
134     </dependency>
135
136     <dependency>
137       <groupId>org.springframework.data</groupId>
138       <artifactId>spring-data-commons</artifactId>
139       <version>2.1.4.RELEASE</version>
140     </dependency>
141
142     <dependency>
143       <groupId>org.springframework.boot</groupId>
144       <artifactId>spring-boot-starter-aop</artifactId>
145     </dependency>
146
147     <dependency>
148       <groupId>org.apache.commons</groupId>
149       <artifactId>commons-io</artifactId>
150       <version>1.3.2</version>
151     </dependency>
152
153     <dependency>
154       <groupId>commons-beanutils</groupId>
155       <artifactId>commons-beanutils</artifactId>
156       <version>1.9.3</version>
157     </dependency>
158
159     <dependency>
160       <groupId>javax.validation</groupId>
161       <artifactId>validation-api</artifactId>
162       <version>2.0.1.Final</version>
163     </dependency>
164
165     <dependency>
166       <groupId>org.apache.commons</groupId>
167       <artifactId>commons-lang3</artifactId>
168       <version>3.4</version>
169     </dependency>
170
171     <!-- mongo -->
172
173     <dependency>
174       <groupId>org.springframework.boot</groupId>
175       <artifactId>spring-boot-starter-data-mongodb</artifactId>
176     </dependency>
177
178     <!-- mysql -->
179
180     <dependency>
181       <groupId>org.mariadb.jdbc</groupId>
182       <artifactId>mariadb-java-client</artifactId>
183       <version>1.1.7</version>
184     </dependency>
185
186     <!-- swagger -->
187
188     <dependency>
189       <groupId>io.swagger</groupId>
190       <artifactId>swagger-annotations</artifactId>
191       <version>1.5.18</version>
192     </dependency>
193
194     <!-- jackson -->
195
196     <dependency>
197       <groupId>com.fasterxml.jackson.dataformat</groupId>
198       <artifactId>jackson-dataformat-yaml</artifactId>
199       <version>2.9.6</version>
200     </dependency>
201
202     <!-- sdc tosca parser -->
203
204     <dependency>
205       <groupId>org.onap.sdc.sdc-tosca</groupId>
206       <artifactId>sdc-tosca</artifactId>
207       <version>1.4.6</version>
208     </dependency>
209
210     <!-- jolt -->
211
212     <dependency>
213       <groupId>com.bazaarvoice.jolt</groupId>
214       <artifactId>jolt-core</artifactId>
215       <version>0.1.0</version>
216       <exclusions>
217         <exclusion>
218           <groupId>com.fasterxml.jackson.core</groupId>
219           <artifactId>jackson-databind</artifactId>
220         </exclusion>
221       </exclusions>
222     </dependency>
223
224     <dependency>
225       <groupId>com.bazaarvoice.jolt</groupId>
226       <artifactId>json-utils</artifactId>
227       <version>0.1.0</version>
228       <exclusions>
229         <exclusion>
230           <groupId>com.fasterxml.jackson.core</groupId>
231           <artifactId>jackson-databind</artifactId>
232         </exclusion>
233       </exclusions>
234     </dependency>
235
236     <!-- test -->
237
238     <dependency>
239       <groupId>org.springframework.boot</groupId>
240       <artifactId>spring-boot-starter-test</artifactId>
241       <scope>test</scope>     
242     </dependency>
243
244     <!-- test h2 -->
245
246     <dependency>
247       <groupId>com.h2database</groupId>
248       <artifactId>h2</artifactId>
249       <scope>test</scope>
250     </dependency>
251
252     <dependency>
253       <groupId>de.flapdoodle.embed</groupId>
254       <artifactId>de.flapdoodle.embed.mongo</artifactId>
255       <version>${embedded-mongo.version}</version>
256       <scope>test</scope>
257     </dependency>
258
259     <!-- test wiremock -->
260
261     <dependency>
262       <groupId>org.springframework.cloud</groupId>
263       <artifactId>spring-cloud-contract-wiremock</artifactId>
264       <version>1.2.6.RELEASE</version>
265       <scope>test</scope>
266       <exclusions>
267         <exclusion>
268           <groupId>com.fasterxml.jackson.core</groupId>
269           <artifactId>jackson-databind</artifactId>
270         </exclusion>
271       </exclusions>
272     </dependency>
273
274     <dependency>
275       <groupId>org.eclipse.jetty</groupId>
276       <artifactId>jetty-servlet</artifactId>
277       <scope>test</scope>
278     </dependency>
279
280     <dependency>
281       <groupId>org.eclipse.jetty</groupId>
282       <artifactId>jetty-servlets</artifactId>
283       <scope>test</scope>
284     </dependency>
285
286     <!-- runtime dev -->
287
288     <dependency>
289       <groupId>org.springframework.boot</groupId>
290       <artifactId>spring-boot-devtools</artifactId>
291       <scope>runtime</scope>
292     </dependency>
293
294     <!-- MSB SDK -->
295     <dependency>
296       <groupId>org.onap.msb.java-sdk</groupId>
297       <artifactId>msb-java-sdk</artifactId>
298       <version>1.2.0</version>
299       <exclusions>
300         <exclusion>
301           <groupId>com.fasterxml.jackson.core</groupId>
302           <artifactId>jackson-databind</artifactId>
303         </exclusion>
304       </exclusions>
305     </dependency>
306
307     <!-- karate -->
308
309     <dependency>
310       <groupId>com.intuit.karate</groupId>
311       <artifactId>karate-junit4</artifactId>
312       <version>0.9.0</version>
313       <scope>test</scope>
314     </dependency>
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
323   </dependencies>
324
325   <build>
326     <testResources>
327       <testResource>
328         <directory>src/test/java</directory>
329         <excludes>
330           <exclude>**/*.java</exclude>
331         </excludes>
332       </testResource>
333       <testResource>
334         <directory>src/test/resources</directory>
335       </testResource>
336     </testResources>
337     <plugins>
338       <plugin>
339         <groupId>org.springframework.boot</groupId>
340         <artifactId>spring-boot-maven-plugin</artifactId>
341       </plugin>
342       <plugin>
343         <groupId>org.apache.maven.plugins</groupId>
344         <artifactId>maven-surefire-plugin</artifactId>
345         <configuration>
346           <includes>
347             <include>org/onap/nbi/test/KarateApiTest.java</include>
348              <include>org/onap/nbi/test/ExecutionTaskTest.java</include>
349             <include>org/onap/nbi/test/ServiceOrderRepositoryTest.java</include>
350             <include>org/onap/nbi/apis/servicecatalog/ToscaInfosProcessorTest.java</include>
351           </includes>
352         </configuration>
353       </plugin>
354       <plugin>
355         <groupId>org.sonatype.plugins</groupId>
356         <artifactId>nexus-staging-maven-plugin</artifactId>
357         <version>1.6.7</version>
358         <extensions>true</extensions>
359         <configuration>
360           <nexusUrl>${nexusproxy}</nexusUrl>
361           <stagingProfileId>176c31dfe190a</stagingProfileId>
362           <serverId>ecomp-staging</serverId>
363         </configuration>
364       </plugin>
365       <plugin>
366         <groupId>org.apache.maven.plugins</groupId>
367         <artifactId>maven-site-plugin</artifactId>
368         <version>3.6</version>
369         <dependencies>
370           <dependency>
371             <groupId>org.apache.maven.wagon</groupId>
372             <artifactId>wagon-webdav-jackrabbit</artifactId>
373             <version>2.10</version>
374           </dependency>
375         </dependencies>
376       </plugin>
377       <plugin>
378         <groupId>com.mycila</groupId>
379         <artifactId>license-maven-plugin</artifactId>
380         <version>3.0</version>
381         <configuration>
382           <header>LICENSE.TXT</header>
383           <includes>
384             <include>restclient/**</include>
385             <include>src/**</include>
386             <include>./**/*.xml</include>
387             <include>./**/*.xml</include>
388             <include>./**/*.yml</include>
389             <include>./**/*.yaml</include>
390           </includes>
391           <excludes>
392             <!-- karate-config.js doesn't support comment, and is mandatory by
393               karate -->
394             <exclude>src/test/java/karate-config.js</exclude>
395           </excludes>
396           <skipExistingHeaders>true</skipExistingHeaders>
397           <skip>false</skip>
398           <mapping>
399             <http>SCRIPT_STYLE</http>
400           </mapping>
401         </configuration>
402         <executions>
403           <execution>
404             <goals>
405               <!-- Set goal to "format" to auto update license headers -->
406               <goal>check</goal>
407             </goals>
408             <phase>process-sources</phase>
409           </execution>
410         </executions>
411       </plugin>
412       <plugin>
413         <groupId>org.codehaus.mojo</groupId>
414         <artifactId>sonar-maven-plugin</artifactId>
415         <version>3.2</version>
416       </plugin>
417 <!--       <plugin> -->
418 <!--         <groupId>org.jacoco</groupId> -->
419 <!--         <artifactId>jacoco-maven-plugin</artifactId> -->
420 <!--         <version>0.8.1</version> -->
421 <!--         <configuration> -->
422 <!--           <dumpOnExit>true</dumpOnExit> -->
423 <!--           <includes> -->
424 <!--             <include>org.onap.nbi.*</include> -->
425 <!--           </includes> -->
426 <!--           <excludes> -->
427 <!--             <exclude>**/model/**/*</exclude> -->
428 <!--           </excludes> -->
429 <!--         </configuration> -->
430 <!--         <executions> -->
431 <!--           <execution> -->
432 <!--             <id>pre-unit-test</id> -->
433 <!--             <goals> -->
434 <!--               <goal>prepare-agent</goal> -->
435 <!--             </goals> -->
436 <!--             <configuration> -->
437 <!--               <destFile>${project.build.directory}/coverage-reports/jacoco.exec</destFile> -->
438 <!--               <append>true</append> -->
439 <!--             </configuration> -->
440 <!--           </execution> -->
441 <!--           <execution> -->
442 <!--             <id>pre-integration-test</id> -->
443 <!--             <phase>pre-integration-test</phase> -->
444 <!--             <goals> -->
445 <!--               <goal>prepare-agent</goal> -->
446 <!--             </goals> -->
447 <!--             <configuration> -->
448 <!--               <destFile>${project.build.directory}/coverage-reports/jacoco-it.exec</destFile> -->
449 <!--               <append>true</append> -->
450 <!--             </configuration> -->
451 <!--           </execution> -->
452 <!--           <execution> -->
453 <!--             <goals> -->
454 <!--               <goal>merge</goal> -->
455 <!--             </goals> -->
456 <!--             <phase>post-integration-test</phase> -->
457 <!--             <configuration> -->
458 <!--               <fileSets> -->
459 <!--                 <fileSet -->
460 <!--                   implementation="org.apache.maven.shared.model.fileset.FileSet"> -->
461 <!--                   <directory>${project.build.directory}/coverage-reports</directory> -->
462 <!--                   <includes> -->
463 <!--                     <include>*.exec</include> -->
464 <!--                   </includes> -->
465 <!--                 </fileSet> -->
466 <!--               </fileSets> -->
467 <!--               <destFile>${project.build.directory}/jacoco-dev.exec</destFile> -->
468 <!--             </configuration> -->
469 <!--           </execution> -->
470 <!--         </executions> -->
471 <!--       </plugin> -->
472       <plugin>
473         <artifactId>maven-source-plugin</artifactId>
474         <executions>
475           <execution>
476             <id>attach-sources</id>
477             <phase>deploy</phase>
478             <goals>
479               <goal>jar-no-fork</goal>
480             </goals>
481           </execution>
482         </executions>
483       </plugin>
484     </plugins>
485   </build>
486
487
488   <profiles>
489     <profile>
490       <id>docker</id>
491       <build>
492         <plugins>
493           <plugin>
494             <groupId>io.fabric8</groupId>
495             <artifactId>docker-maven-plugin</artifactId>
496             <version>0.26.1</version>
497             <configuration>
498               <verbose>true</verbose>
499               <apiVersion>1.23</apiVersion>
500               <pullRegistry>${docker.pull.registry}</pullRegistry>
501               <pushRegistry>${docker.push.registry}</pushRegistry>
502               <images>
503                 <image>
504                   <name>onap/externalapi/nbi:${docker.tag}</name>
505                   <build>
506                     <cleanup>true</cleanup>
507                     <tags>
508                       <tag>latest</tag>
509                       <tag>${docker.latest.tag}</tag>
510                     </tags>
511                     <dockerFileDir>${project.basedir}</dockerFileDir>
512                     <args>
513                       <PKG_FILENAME>${project.build.finalName}.${project.packaging}</PKG_FILENAME>
514                     </args>
515                   </build>
516                 </image>
517               </images>
518             </configuration>
519             <executions>
520               <execution>
521                 <id>clean-images</id>
522                 <phase>pre-clean</phase>
523                 <goals>
524                   <goal>remove</goal>
525                 </goals>
526                 <configuration>
527                   <removeMode>all</removeMode>
528                 </configuration>
529               </execution>
530               <execution>
531                 <id>generate-images</id>
532                 <phase>package</phase>
533                 <goals>
534                   <goal>build</goal>
535                 </goals>
536               </execution>
537               <execution>
538                 <id>push-images</id>
539                 <phase>deploy</phase>
540                 <goals>
541                   <goal>push</goal>
542                 </goals>
543               </execution>
544             </executions>
545           </plugin>
546         </plugins>
547       </build>
548     </profile>
549   </profiles>
550
551 </project>