Merge "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     <!-- swagger core -->
172     <dependency>
173       <groupId>io.swagger</groupId>
174       <artifactId>swagger-core</artifactId>
175       <version>1.5.18</version>
176     </dependency>
177
178     <!-- jackson -->
179
180     <dependency>
181       <groupId>com.fasterxml.jackson.dataformat</groupId>
182       <artifactId>jackson-dataformat-yaml</artifactId>
183     </dependency>
184
185     <!-- sdc tosca parser -->
186
187     <dependency>
188       <groupId>org.onap.sdc.sdc-tosca</groupId>
189       <artifactId>sdc-tosca</artifactId>
190       <version>1.4.6</version>
191       <exclusions>
192         <exclusion>
193           <groupId>com.google.guava</groupId>
194           <artifactId>guava</artifactId>
195         </exclusion>
196       </exclusions>     
197     </dependency>
198
199     <!-- jolt -->
200
201     <dependency>
202       <groupId>com.bazaarvoice.jolt</groupId>
203       <artifactId>jolt-core</artifactId>
204       <version>0.1.0</version>
205       <exclusions>
206         <exclusion>
207           <groupId>com.fasterxml.jackson.core</groupId>
208           <artifactId>jackson-databind</artifactId>
209         </exclusion>
210       </exclusions>
211     </dependency>
212
213     <dependency>
214       <groupId>com.bazaarvoice.jolt</groupId>
215       <artifactId>json-utils</artifactId>
216       <version>0.1.0</version>
217       <exclusions>
218         <exclusion>
219           <groupId>com.fasterxml.jackson.core</groupId>
220           <artifactId>jackson-databind</artifactId>
221         </exclusion>
222       </exclusions>
223     </dependency>
224
225     <!-- test -->
226
227     <dependency>
228       <groupId>org.springframework.boot</groupId>
229       <artifactId>spring-boot-starter-test</artifactId>
230       <scope>test</scope>
231     </dependency>
232
233     <!-- test h2 -->
234
235     <dependency>
236       <groupId>com.h2database</groupId>
237       <artifactId>h2</artifactId>
238       <scope>test</scope>
239     </dependency>
240
241     <dependency>
242       <groupId>de.flapdoodle.embed</groupId>
243       <artifactId>de.flapdoodle.embed.mongo</artifactId>
244       <scope>test</scope>
245     </dependency>
246
247     <!-- test wiremock -->
248
249     <dependency>
250       <groupId>org.springframework.cloud</groupId>
251       <artifactId>spring-cloud-contract-wiremock</artifactId>
252       <version>1.2.6.RELEASE</version>
253       <scope>test</scope>
254       <exclusions>
255         <exclusion>
256           <groupId>com.fasterxml.jackson.core</groupId>
257           <artifactId>jackson-databind</artifactId>
258         </exclusion>
259       </exclusions>
260     </dependency>
261
262     <dependency>
263       <groupId>org.eclipse.jetty</groupId>
264       <artifactId>jetty-servlet</artifactId>
265       <scope>test</scope>
266     </dependency>
267
268     <dependency>
269       <groupId>org.eclipse.jetty</groupId>
270       <artifactId>jetty-servlets</artifactId>
271       <scope>test</scope>
272     </dependency>
273
274     <!-- runtime dev -->
275
276     <dependency>
277       <groupId>org.springframework.boot</groupId>
278       <artifactId>spring-boot-devtools</artifactId>
279       <scope>runtime</scope>
280     </dependency>
281
282     <!-- MSB SDK -->
283     <dependency>
284       <groupId>org.onap.msb.java-sdk</groupId>
285       <artifactId>msb-java-sdk</artifactId>
286       <version>1.2.0</version>
287       <exclusions>
288         <exclusion>
289           <groupId>com.google.guava</groupId>
290           <artifactId>guava</artifactId>
291         </exclusion>
292       </exclusions>        
293     </dependency>
294     
295     <dependency>
296          <groupId>com.google.guava</groupId>
297          <artifactId>guava</artifactId>
298     </dependency>
299
300     <!-- karate -->
301
302     <dependency>
303       <groupId>com.intuit.karate</groupId>
304       <artifactId>karate-junit4</artifactId>
305       <version>0.9.0</version>
306       <scope>test</scope>
307     </dependency>
308
309     <dependency>
310       <groupId>com.intuit.karate</groupId>
311       <artifactId>karate-apache</artifactId>
312       <version>0.9.0</version>
313       <scope>test</scope>
314     </dependency>
315
316   </dependencies>
317
318   <build>
319     <testResources>
320       <testResource>
321         <directory>src/test/java</directory>
322         <excludes>
323           <exclude>**/*.java</exclude>
324         </excludes>
325       </testResource>
326       <testResource>
327         <directory>src/test/resources</directory>
328       </testResource>
329     </testResources>
330     <plugins>
331       <plugin>
332         <groupId>org.springframework.boot</groupId>
333         <artifactId>spring-boot-maven-plugin</artifactId>
334         <executions>
335           <execution>
336             <goals>
337               <goal>repackage</goal>
338             </goals>
339             <configuration>
340               <mainClass>org.onap.nbi.Application</mainClass>
341             </configuration>
342           </execution>
343         </executions>
344       </plugin>
345       <plugin>
346         <groupId>org.apache.maven.plugins</groupId>
347         <artifactId>maven-surefire-plugin</artifactId>
348         <configuration>
349           <includes>
350             <include>org/onap/nbi/test/KarateApiTest.java</include>
351             <include>org/onap/nbi/test/ExecutionTaskTest.java</include>
352             <include>org/onap/nbi/test/ServiceOrderRepositoryTest.java</include>
353             <include>org/onap/nbi/apis/servicecatalog/ToscaInfosProcessorTest.java</include>
354           </includes>
355         </configuration>
356       </plugin>
357       <plugin>
358         <groupId>org.sonatype.plugins</groupId>
359         <artifactId>nexus-staging-maven-plugin</artifactId>
360         <extensions>true</extensions>
361         <configuration>
362           <nexusUrl>${nexusproxy}</nexusUrl>
363           <stagingProfileId>176c31dfe190a</stagingProfileId>
364           <serverId>ecomp-staging</serverId>
365         </configuration>
366       </plugin>
367       <plugin>
368         <groupId>org.apache.maven.plugins</groupId>
369         <artifactId>maven-site-plugin</artifactId>
370         <dependencies>
371           <dependency>
372             <groupId>org.apache.maven.wagon</groupId>
373             <artifactId>wagon-webdav-jackrabbit</artifactId>
374             <version>2.10</version>
375           </dependency>
376         </dependencies>
377       </plugin>
378       <plugin>
379         <groupId>com.mycila</groupId>
380         <artifactId>license-maven-plugin</artifactId>
381         <version>3.0</version>
382         <configuration>
383           <header>LICENSE.TXT</header>
384           <includes>
385             <include>restclient/**</include>
386             <include>src/**</include>
387             <include>./**/*.xml</include>
388             <include>./**/*.xml</include>
389             <include>./**/*.yml</include>
390             <include>./**/*.yaml</include>
391           </includes>
392           <excludes>
393             <!-- karate-config.js doesn't support comment, and is mandatory by
394               karate -->
395             <exclude>src/test/java/karate-config.js</exclude>
396           </excludes>
397           <skipExistingHeaders>true</skipExistingHeaders>
398           <skip>false</skip>
399           <mapping>
400             <http>SCRIPT_STYLE</http>
401           </mapping>
402         </configuration>
403         <executions>
404           <execution>
405             <goals>
406               <!-- Set goal to "format" to auto update license headers -->
407               <goal>check</goal>
408             </goals>
409             <phase>process-sources</phase>
410           </execution>
411         </executions>
412       </plugin>
413       <plugin>
414         <groupId>org.codehaus.mojo</groupId>
415         <artifactId>sonar-maven-plugin</artifactId>
416         <version>3.2</version>
417       </plugin>
418       <!--       <plugin> -->
419       <!--         <groupId>org.jacoco</groupId> -->
420       <!--         <artifactId>jacoco-maven-plugin</artifactId> -->
421       <!--         <version>0.8.1</version> -->
422       <!--         <configuration> -->
423       <!--           <dumpOnExit>true</dumpOnExit> -->
424       <!--           <includes> -->
425       <!--             <include>org.onap.nbi.*</include> -->
426       <!--           </includes> -->
427       <!--           <excludes> -->
428       <!--             <exclude>**/model/**/*</exclude> -->
429       <!--           </excludes> -->
430       <!--         </configuration> -->
431       <!--         <executions> -->
432       <!--           <execution> -->
433       <!--             <id>pre-unit-test</id> -->
434       <!--             <goals> -->
435       <!--               <goal>prepare-agent</goal> -->
436       <!--             </goals> -->
437       <!--             <configuration> -->
438       <!--               <destFile>${project.build.directory}/coverage-reports/jacoco.exec</destFile> -->
439       <!--               <append>true</append> -->
440       <!--             </configuration> -->
441       <!--           </execution> -->
442       <!--           <execution> -->
443       <!--             <id>pre-integration-test</id> -->
444       <!--             <phase>pre-integration-test</phase> -->
445       <!--             <goals> -->
446       <!--               <goal>prepare-agent</goal> -->
447       <!--             </goals> -->
448       <!--             <configuration> -->
449       <!--               <destFile>${project.build.directory}/coverage-reports/jacoco-it.exec</destFile> -->
450       <!--               <append>true</append> -->
451       <!--             </configuration> -->
452       <!--           </execution> -->
453       <!--           <execution> -->
454       <!--             <goals> -->
455       <!--               <goal>merge</goal> -->
456       <!--             </goals> -->
457       <!--             <phase>post-integration-test</phase> -->
458       <!--             <configuration> -->
459       <!--               <fileSets> -->
460       <!--                 <fileSet -->
461       <!--                   implementation="org.apache.maven.shared.model.fileset.FileSet"> -->
462       <!--                   <directory>${project.build.directory}/coverage-reports</directory> -->
463       <!--                   <includes> -->
464       <!--                     <include>*.exec</include> -->
465       <!--                   </includes> -->
466       <!--                 </fileSet> -->
467       <!--               </fileSets> -->
468       <!--               <destFile>${project.build.directory}/jacoco-dev.exec</destFile> -->
469       <!--             </configuration> -->
470       <!--           </execution> -->
471       <!--         </executions> -->
472       <!--       </plugin> -->
473       <plugin>
474         <artifactId>maven-source-plugin</artifactId>
475         <executions>
476           <execution>
477             <id>attach-sources</id>
478             <phase>deploy</phase>
479             <goals>
480               <goal>jar-no-fork</goal>
481             </goals>
482           </execution>
483         </executions>
484       </plugin>
485     </plugins>
486   </build>
487
488
489   <profiles>
490     <profile>
491       <id>docker</id>
492       <build>
493         <plugins>
494           <plugin>
495             <groupId>io.fabric8</groupId>
496             <artifactId>docker-maven-plugin</artifactId>
497             <version>0.28.0</version>
498             <configuration>
499               <verbose>true</verbose>
500               <apiVersion>1.23</apiVersion>
501               <pullRegistry>${docker.pull.registry}</pullRegistry>
502               <pushRegistry>${docker.push.registry}</pushRegistry>
503               <images>
504                 <image>
505                   <name>onap/externalapi/nbi:${docker.tag}</name>
506                   <build>
507                     <cleanup>true</cleanup>
508                     <tags>
509                       <tag>latest</tag>
510                       <tag>${docker.latest.tag}</tag>
511                     </tags>
512                     <dockerFileDir>${project.basedir}</dockerFileDir>
513                     <args>
514                       <PKG_FILENAME>${project.build.finalName}.${project.packaging}</PKG_FILENAME>
515                     </args>
516                   </build>
517                 </image>
518               </images>
519             </configuration>
520             <executions>
521               <execution>
522                 <id>clean-images</id>
523                 <phase>pre-clean</phase>
524                 <goals>
525                   <goal>remove</goal>
526                 </goals>
527                 <configuration>
528                   <removeMode>all</removeMode>
529                 </configuration>
530               </execution>
531               <execution>
532                 <id>generate-images</id>
533                 <phase>package</phase>
534                 <goals>
535                   <goal>build</goal>
536                 </goals>
537               </execution>
538               <execution>
539                 <id>push-images</id>
540                 <phase>deploy</phase>
541                 <goals>
542                   <goal>push</goal>
543                 </goals>
544               </execution>
545             </executions>
546           </plugin>
547         </plugins>
548       </build>
549     </profile>
550   </profiles>
551
552 </project>