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