Remove 'All rights reserved.' on apache 2 license
[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>1.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.10.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                 </dependency>
108
109                 <dependency>
110                         <groupId>org.springframework.boot</groupId>
111                         <artifactId>spring-boot-starter-data-jpa</artifactId>
112                 </dependency>
113
114                 <dependency>
115                         <groupId>org.apache.commons</groupId>
116                         <artifactId>commons-io</artifactId>
117                         <version>1.3.2</version>
118                 </dependency>
119
120                 <dependency>
121                         <groupId>commons-beanutils</groupId>
122                         <artifactId>commons-beanutils</artifactId>
123                         <version>1.9.3</version>
124                 </dependency>
125
126                 <dependency>
127                         <groupId>javax.validation</groupId>
128                         <artifactId>validation-api</artifactId>
129                         <version>2.0.1.Final</version>
130                 </dependency>
131
132                 <dependency>
133                         <groupId>org.apache.commons</groupId>
134                         <artifactId>commons-lang3</artifactId>
135                         <version>3.4</version>
136                 </dependency>
137
138                 <!-- mongo -->
139
140                 <dependency>
141                         <groupId>org.springframework.boot</groupId>
142                         <artifactId>spring-boot-starter-data-mongodb</artifactId>
143                 </dependency>
144
145                 <!-- mysql -->
146
147                 <dependency>
148                         <groupId>org.mariadb.jdbc</groupId>
149                         <artifactId>mariadb-java-client</artifactId>
150                         <version>1.1.7</version>
151                 </dependency>
152
153                 <!-- swagger -->
154
155                 <dependency>
156                         <groupId>io.swagger</groupId>
157                         <artifactId>swagger-annotations</artifactId>
158                         <version>1.5.18</version>
159                 </dependency>
160
161                 <!-- jackson -->
162
163                 <dependency>
164                         <groupId>com.fasterxml.jackson.dataformat</groupId>
165                         <artifactId>jackson-dataformat-yaml</artifactId>
166                         <version>2.8.0</version>
167                 </dependency>
168
169                 <!-- jolt -->
170
171                 <dependency>
172                         <groupId>com.bazaarvoice.jolt</groupId>
173                         <artifactId>jolt-core</artifactId>
174                         <version>0.1.0</version>
175                         <exclusions>
176                                 <exclusion>
177                                         <groupId>com.fasterxml.jackson.core</groupId>
178                                         <artifactId>jackson-databind</artifactId>
179                                 </exclusion>
180                         </exclusions>
181                 </dependency>
182
183                 <dependency>
184                         <groupId>com.bazaarvoice.jolt</groupId>
185                         <artifactId>json-utils</artifactId>
186                         <version>0.1.0</version>
187                 </dependency>
188
189                 <!-- test -->
190
191                 <dependency>
192                         <groupId>org.springframework.boot</groupId>
193                         <artifactId>spring-boot-starter-test</artifactId>
194                         <scope>test</scope>
195                 </dependency>
196
197                 <!-- test h2 -->
198
199                 <dependency>
200                         <groupId>com.h2database</groupId>
201                         <artifactId>h2</artifactId>
202                         <scope>test</scope>
203                 </dependency>
204
205                 <dependency>
206                         <groupId>de.flapdoodle.embed</groupId>
207                         <artifactId>de.flapdoodle.embed.mongo</artifactId>
208                         <version>${embedded-mongo.version}</version>
209                         <scope>test</scope>
210                 </dependency>
211
212                 <!-- test wiremock -->
213
214                 <dependency>
215                         <groupId>org.springframework.cloud</groupId>
216                         <artifactId>spring-cloud-contract-wiremock</artifactId>
217                         <version>1.0.0.RELEASE</version>
218                         <scope>test</scope>
219                 </dependency>
220
221                 <dependency>
222                         <groupId>org.eclipse.jetty</groupId>
223                         <artifactId>jetty-server</artifactId>
224                         <version>9.4.7.RC0</version>
225                         <scope>test</scope>
226                 </dependency>
227
228                 <dependency>
229                         <groupId>org.eclipse.jetty</groupId>
230                         <artifactId>jetty-servlet</artifactId>
231                         <scope>test</scope>
232                 </dependency>
233
234                 <dependency>
235                         <groupId>org.eclipse.jetty</groupId>
236                         <artifactId>jetty-servlets</artifactId>
237                         <scope>test</scope>
238                 </dependency>
239
240                 <!-- runtime dev -->
241
242                 <dependency>
243                         <groupId>org.springframework.boot</groupId>
244                         <artifactId>spring-boot-devtools</artifactId>
245                         <scope>runtime</scope>
246                 </dependency>
247
248         </dependencies>
249
250         <build>
251                 <plugins>
252                         <plugin>
253                                 <groupId>org.springframework.boot</groupId>
254                                 <artifactId>spring-boot-maven-plugin</artifactId>
255                         </plugin>
256                         <plugin>
257                                 <groupId>org.sonatype.plugins</groupId>
258                                 <artifactId>nexus-staging-maven-plugin</artifactId>
259                                 <version>1.6.7</version>
260                                 <extensions>true</extensions>
261                                 <configuration>
262                                         <nexusUrl>${nexusproxy}</nexusUrl>
263                                         <stagingProfileId>176c31dfe190a</stagingProfileId>
264                                         <serverId>ecomp-staging</serverId>
265                                 </configuration>
266                         </plugin>
267                         <plugin>
268                                 <groupId>org.apache.maven.plugins</groupId>
269                                 <artifactId>maven-site-plugin</artifactId>
270                                 <version>3.6</version>
271                                 <dependencies>
272                                         <dependency>
273                                                 <groupId>org.apache.maven.wagon</groupId>
274                                                 <artifactId>wagon-webdav-jackrabbit</artifactId>
275                                                 <version>2.10</version>
276                                         </dependency>
277                                 </dependencies>
278                         </plugin>
279                         <plugin>
280                                 <groupId>com.mycila</groupId>
281                                 <artifactId>license-maven-plugin</artifactId>
282                                 <version>3.0</version>
283                                 <configuration>
284                                         <header>LICENSE.TXT</header>
285                                         <includes>
286                                                 <include>restclient/**</include>
287                                                 <include>src/**</include>
288                                                 <include>pom.xml</include>
289                                         </includes>
290                                         <skipExistingHeaders>true</skipExistingHeaders>
291                                         <skip>false</skip>
292                                         <mapping>
293                                                 <http>SCRIPT_STYLE</http>
294                                         </mapping>
295                                 </configuration>
296                                 <executions>
297                                         <execution>
298                                                 <goals>
299                                                         <!-- Set goal to "format" to auto update license headers -->
300                                                         <goal>check</goal>
301                                                 </goals>
302                                                 <phase>process-sources</phase>
303                                         </execution>
304                                 </executions>
305                         </plugin>
306                         <plugin>
307                                 <groupId>org.codehaus.mojo</groupId>
308                                 <artifactId>sonar-maven-plugin</artifactId>
309                                 <version>3.2</version>
310                         </plugin>
311                         <plugin>
312                              <groupId>org.jacoco</groupId>
313                              <artifactId>jacoco-maven-plugin</artifactId>
314                              <version>0.8.1</version>
315                              <configuration>
316                                   <dumpOnExit>true</dumpOnExit>
317                                   <includes>
318                                         <include>org.onap.nbi.*</include>
319                                   </includes>
320                                   <excludes>
321                                         <exclude>**/model/**/*</exclude>
322                                   </excludes>        
323                              </configuration>
324                              <executions>
325                                   <execution>
326                                         <id>pre-unit-test</id>
327                                         <goals>
328                                              <goal>prepare-agent</goal>
329                                         </goals>
330                                         <configuration>
331                                              <destFile>${project.build.directory}/coverage-reports/jacoco.exec</destFile>
332                                              <!-- <append>true</append> -->
333                                         </configuration>
334                                   </execution>
335                                   <execution>
336                                         <id>pre-integration-test</id>
337                                         <phase>pre-integration-test</phase>
338                                         <goals>
339                                              <goal>prepare-agent</goal>
340                                         </goals>
341                                         <configuration>
342                                              <destFile>${project.build.directory}/coverage-reports/jacoco-it.exec</destFile>
343                                              <!-- <append>true</append> -->
344                                         </configuration>
345                                   </execution>
346                                   <execution>
347                                         <goals>
348                                              <goal>merge</goal>
349                                         </goals>
350                                         <phase>post-integration-test</phase>
351                                         <configuration>
352                                              <fileSets>
353                                                    <fileSet implementation="org.apache.maven.shared.model.fileset.FileSet">
354                                                        <directory>${project.build.directory}/coverage-reports</directory>
355                                                        <includes>
356                                                              <include>*.exec</include>
357                                                        </includes>
358                                                   </fileSet>
359                                              </fileSets>
360                                              <destFile>${project.build.directory}/jacoco-dev.exec</destFile>
361                                         </configuration>
362                                    </execution>
363                              </executions>
364                         </plugin>
365                         <plugin>
366                                 <artifactId>maven-source-plugin</artifactId>
367                                 <executions>
368                                         <execution>
369                                                 <id>attach-sources</id>
370                                                 <phase>deploy</phase>
371                                                 <goals>
372                                                         <goal>jar-no-fork</goal>
373                                                 </goals>
374                                         </execution>
375                                 </executions>
376                         </plugin>
377                 </plugins>
378         </build>
379
380
381
382         <profiles>
383                 <profile>
384                         <id>docker</id>
385                         <build>
386                                 <plugins>
387                                         <plugin>
388                                                 <groupId>io.fabric8</groupId>
389                                                 <artifactId>docker-maven-plugin</artifactId>
390                                                 <version>0.25.0</version>
391                                                 <configuration>
392                                                         <verbose>true</verbose>
393                                                         <apiVersion>1.23</apiVersion>
394                                                         <pullRegistry>${docker.pull.registry}</pullRegistry>
395                                                         <pushRegistry>${docker.push.registry}</pushRegistry>
396                                                         <images>
397                                                                 <image>
398                                                                         <name>onap/externalapi/nbi</name>
399                                                                         <alias>onap/externalapi/nbi</alias>
400                                                                         <build>
401                                                                                 <cleanup>true</cleanup>
402                                                                                 <tags>
403                                                                                         <tag>${docker.tag}</tag>
404                                                                                         <tag>${docker.latest.tag}</tag>
405                                                                                 </tags>
406                                                                                 <dockerFileDir>${project.basedir}</dockerFileDir>
407                                                                                 <args>
408                                                                                         <PKG_FILENAME>${project.build.finalName}.${project.packaging}</PKG_FILENAME>
409                                                                                 </args>
410                                                                         </build>
411                                                                 </image>
412                                                         </images>
413                                                 </configuration>
414                                                 <executions>
415                                                         <execution>
416                                                                 <id>clean-images</id>
417                                                                 <phase>pre-clean</phase>
418                                                                 <goals>
419                                                                         <goal>remove</goal>
420                                                                 </goals>
421                                                                 <configuration>
422                                                                         <removeMode>all</removeMode>
423                                                                 </configuration>
424                                                         </execution>
425                                                         <execution>
426                                                                 <id>generate-images</id>
427                                                                 <phase>package</phase>
428                                                                 <goals>
429                                                                         <goal>build</goal>
430                                                                 </goals>
431                                                         </execution>
432                                                         <execution>
433                                                                 <id>push-images</id>
434                                                                 <phase>deploy</phase>
435                                                                 <goals>
436                                                                         <goal>push</goal>
437                                                                 </goals>
438                                                         </execution>
439                                                 </executions>
440                                         </plugin>
441                                 </plugins>
442                         </build>
443                 </profile>
444         </profiles>
445
446 </project>