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