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