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