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