2 ============LICENSE_START=======================================================
4 ================================================================================
5 Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
6 Copyright © 2017-2018 Amdocs
7 ================================================================================
8 Licensed under the Apache License, Version 2.0 (the "License");
9 you may not use this file except in compliance with the License.
10 You may obtain a copy of the License at
12 http://www.apache.org/licenses/LICENSE-2.0
14 Unless required by applicable law or agreed to in writing, software
15 distributed under the License is distributed on an "AS IS" BASIS,
16 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 See the License for the specific language governing permissions and
18 limitations under the License.
19 ============LICENSE_END=========================================================
21 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
22 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
23 <modelVersion>4.0.0</modelVersion>
26 <groupId>org.onap.oparent</groupId>
27 <artifactId>oparent</artifactId>
28 <version>2.0.0</version>
32 <groupId>org.onap.aai.gizmo</groupId>
33 <artifactId>gizmo</artifactId>
34 <version>1.6.0-SNAPSHOT</version>
35 <name>aai-gizmo</name>
38 <docker.location>${basedir}/target</docker.location>
39 <version.org.onap.aai.aai-schema-ingest>1.4.1</version.org.onap.aai.aai-schema-ingest>
40 <version.org.onap.aai.aai-schema>1.5.1</version.org.onap.aai.aai-schema>
41 <version.org.onap.aai.aai-utils>1.5.3</version.org.onap.aai.aai-utils>
42 <version.org.onap.aai.aai-auth>1.5.3</version.org.onap.aai.aai-auth>
43 <event.client.version>1.5.0</event.client.version>
44 <!-- Minimum code coverage percentage. Please update this figure as coverage increases to prevent any drops in
45 coverage caused by new changes. Note that this figure cannot be lower than the ONAP requirement of 0.55 -->
46 <jacoco.line.coverage.limit>0.60</jacoco.line.coverage.limit>
47 <jacoco.report.directory>${project.build.directory}/code-coverage</jacoco.report.directory>
48 <!-- docker related properties -->
49 <docker.fabric.version>0.28.0</docker.fabric.version>
50 <aai.docker.version>1.0.0</aai.docker.version>
51 <aai.build.directory>${project.build.directory}/${project.artifactId}-build/
52 </aai.build.directory>
53 <aai.docker.namespace>onap</aai.docker.namespace>
54 <aai.base.image>alpine</aai.base.image>
55 <aai.base.image.version>1.6.0</aai.base.image.version>
56 <!-- This will be used for the docker images as the default format of maven build has issues -->
57 <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
60 <dependencyManagement>
63 <!-- Import dependency management from Spring Boot -->
64 <groupId>org.springframework.boot</groupId>
65 <artifactId>spring-boot-dependencies</artifactId>
66 <version>1.5.21.RELEASE</version>
71 </dependencyManagement>
75 <groupId>org.springframework.boot</groupId>
76 <artifactId>spring-boot-starter-web</artifactId>
79 <groupId>org.springframework.boot</groupId>
80 <artifactId>spring-boot-starter-tomcat</artifactId>
85 <groupId>org.springframework.boot</groupId>
86 <artifactId>spring-boot-starter-jetty</artifactId>
89 <groupId>org.springframework.boot</groupId>
90 <artifactId>spring-boot-starter</artifactId>
93 <groupId>ch.qos.logback</groupId>
94 <artifactId>logback-classic</artifactId>
99 <groupId>org.springframework.boot</groupId>
100 <artifactId>spring-boot-starter-jersey</artifactId>
103 <groupId>org.springframework.boot</groupId>
104 <artifactId>spring-boot-starter-tomcat</artifactId>
109 <groupId>org.springframework.boot</groupId>
110 <artifactId>spring-boot-starter-actuator</artifactId>
113 <groupId>org.springframework.boot</groupId>
114 <artifactId>spring-boot-configuration-processor</artifactId>
115 <optional>true</optional>
118 <groupId>org.springframework.boot</groupId>
119 <artifactId>spring-boot-starter-test</artifactId>
123 <groupId>org.apache.cxf</groupId>
124 <artifactId>cxf-rt-frontend-jaxrs</artifactId>
125 <version>3.2.5</version>
130 <groupId>io.swagger</groupId>
131 <artifactId>swagger-jersey2-jaxrs</artifactId>
132 <version>1.5.8</version>
135 <groupId>io.springfox</groupId>
136 <artifactId>springfox-swagger2</artifactId>
137 <version>2.9.2</version>
140 <groupId>io.springfox</groupId>
141 <artifactId>springfox-swagger-ui</artifactId>
142 <version>2.9.2</version>
146 <!-- ONAP AAI-COMMON (incl. model) -->
148 <groupId>org.onap.aai.schema-service</groupId>
149 <artifactId>aai-schema</artifactId>
150 <version>${version.org.onap.aai.aai-schema}</version>
153 <groupId>org.onap.aai.aai-common</groupId>
154 <artifactId>aai-schema-ingest</artifactId>
155 <version>${version.org.onap.aai.aai-schema-ingest}</version>
158 <groupId>org.powermock</groupId>
159 <artifactId>*</artifactId>
164 <groupId>org.onap.aai.aai-common</groupId>
165 <artifactId>aai-utils</artifactId>
166 <version>${version.org.onap.aai.aai-utils}</version>
169 <groupId>org.onap.aai.aai-common</groupId>
170 <artifactId>aai-auth</artifactId>
171 <version>${version.org.onap.aai.aai-auth}</version>
174 <!-- ONAP EVENT CLIENT -->
176 <groupId>org.onap.aai.event-client</groupId>
177 <artifactId>event-client-dmaap</artifactId>
178 <version>${event.client.version}</version>
181 <groupId>org.slf4j</groupId>
182 <artifactId>slf4j-api</artifactId>
187 <groupId>org.onap.aai.event-client</groupId>
188 <artifactId>event-client-kafka</artifactId>
189 <version>${event.client.version}</version>
192 <groupId>org.slf4j</groupId>
193 <artifactId>slf4j-api</artifactId>
199 <groupId>org.onap.aai.event-client</groupId>
200 <artifactId>event-client-rabbitmq</artifactId>
201 <version>${event.client.version}</version>
204 <groupId>org.slf4j</groupId>
205 <artifactId>slf4j-api</artifactId>
210 <!-- ONAP COMMON LOGGING -->
212 <groupId>org.onap.aai.logging-service</groupId>
213 <artifactId>common-logging</artifactId>
214 <version>1.2.2</version>
217 <groupId>ch.qos.logback</groupId>
218 <artifactId>logback-classic</artifactId>
221 <groupId>ch.qos.logback</groupId>
222 <artifactId>logback-core</artifactId>
225 <groupId>org.slf4j</groupId>
226 <artifactId>slf4j-api</artifactId>
231 <!-- ONAP REST CLIENT -->
233 <groupId>org.onap.aai</groupId>
234 <artifactId>rest-client</artifactId>
235 <version>1.5.0</version>
239 <groupId>ch.qos.logback</groupId>
240 <artifactId>logback-classic</artifactId>
241 <version>1.2.3</version>
244 <groupId>ch.qos.logback</groupId>
245 <artifactId>logback-core</artifactId>
246 <version>1.2.3</version>
249 <groupId>ch.qos.logback</groupId>
250 <artifactId>logback-classic</artifactId>
255 <groupId>ch.qos.logback</groupId>
256 <artifactId>logback-access</artifactId>
257 <version>1.2.3</version>
260 <groupId>com.google.guava</groupId>
261 <artifactId>guava</artifactId>
264 <groupId>radeox</groupId>
265 <artifactId>radeox</artifactId>
266 <version>1.0-b2</version>
269 <groupId>org.codehaus.jackson</groupId>
270 <artifactId>jackson-mapper-asl</artifactId>
271 <version>1.4.5</version>
274 <groupId>commons-io</groupId>
275 <artifactId>commons-io</artifactId>
276 <version>2.4</version>
279 <groupId>org.apache.commons</groupId>
280 <artifactId>commons-lang3</artifactId>
281 <version>3.3.1</version>
284 <groupId>com.google.code.gson</groupId>
285 <artifactId>gson</artifactId>
286 <version>2.6.2</version>
289 <groupId>org.eclipse.persistence</groupId>
290 <artifactId>eclipselink</artifactId>
291 <version>2.6.2</version>
294 <groupId>net.dongliu</groupId>
295 <artifactId>gson-java8-datatype</artifactId>
296 <version>1.0.3</version>
299 <groupId>com.jayway.jsonpath</groupId>
300 <artifactId>json-path</artifactId>
301 <version>2.2.0</version>
304 <groupId>org.slf4j</groupId>
305 <artifactId>slf4j-api</artifactId>
310 <groupId>org.apache.tinkerpop</groupId>
311 <artifactId>gremlin-core</artifactId>
312 <version>3.2.3</version>
313 <scope>provided</scope>
316 <groupId>org.slf4j</groupId>
317 <artifactId>slf4j-log4j12</artifactId>
320 <groupId>org.slf4j</groupId>
321 <artifactId>jcl-over-slf4j</artifactId>
324 <groupId>org.slf4j</groupId>
325 <artifactId>slf4j-api</artifactId>
330 <groupId>org.apache.tinkerpop</groupId>
331 <artifactId>tinkergraph-gremlin</artifactId>
332 <version>3.2.3</version>
333 <scope>provided</scope>
336 <groupId>org.json</groupId>
337 <artifactId>json</artifactId>
338 <version>20160212</version>
341 <groupId>org.apache.httpcomponents</groupId>
342 <artifactId>httpclient</artifactId>
343 <version>4.5.3</version>
346 <groupId>org.apache.httpcomponents</groupId>
347 <artifactId>httpcore</artifactId>
348 <version>4.4.1</version>
351 <!-- TEST DEPENDENCIES -->
353 <groupId>junit</groupId>
354 <artifactId>junit</artifactId>
357 <groupId>org.skyscreamer</groupId>
358 <artifactId>jsonassert</artifactId>
359 <version>1.5.0</version>
363 <groupId>org.mockito</groupId>
364 <artifactId>mockito-core</artifactId>
365 <version>2.15.0</version>
369 <groupId>org.hamcrest</groupId>
370 <artifactId>hamcrest-library</artifactId>
377 <!-- Docker profile to be used for building docker image and pushing to nexus -->
383 <groupId>org.codehaus.mojo</groupId>
384 <artifactId>build-helper-maven-plugin</artifactId>
385 <version>3.0.0</version>
388 <phase>pre-clean</phase>
389 <id>parse-version</id>
391 <goal>parse-version</goal>
397 <groupId>org.codehaus.groovy.maven</groupId>
398 <artifactId>gmaven-plugin</artifactId>
399 <version>1.0</version>
402 <phase>pre-clean</phase>
408 def userAaiBaseImage = session.userProperties['aai.base.image']
409 def userAaiCommonVersion = session.userProperties['aai.base.image.version']
410 if (userAaiCommonVersion != null) {
411 project.properties['aai.base.image.version'] = userAaiCommonVersion
413 if (userAaiBaseImage != null) {
414 project.properties['aai.base.image'] = userAaiBaseImage
416 log.info 'Base image flavour: ' + project.properties['aai.base.image']
417 log.info 'Base image version: ' + project.properties['aai.base.image.version']
424 <groupId>io.fabric8</groupId>
425 <artifactId>docker-maven-plugin</artifactId>
426 <version>${docker.fabric.version}</version>
428 <verbose>true</verbose>
429 <apiVersion>1.23</apiVersion>
432 <name>${docker.push.registry}/${aai.docker.namespace}/${project.artifactId}:%l
438 <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest</tag>
439 <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-${maven.build.timestamp}</tag>
441 <cleanup>try</cleanup>
442 <dockerFileDir>${project.basedir}/src/main/docker</dockerFileDir>
447 <directory>${aai.build.directory}</directory>
448 <outputDirectory>/${project.artifactId}</outputDirectory>
459 <id>clean-images</id>
460 <phase>pre-clean</phase>
465 <removeAll>true</removeAll>
469 <id>generate-images</id>
470 <phase>package</phase>
477 <phase>deploy</phase>
490 <finalName>${project.artifactId}</finalName>
492 Using https://code.revelc.net/formatter-maven-plugin/ for Eclipse formatter
493 Using https://github.com/diffplug/spotless/tree/master/plugin-maven for import order
494 Use in combination to rewrite code and imports, then checkstyle
496 mvn formatter:format spotless:apply process-sources
500 <groupId>net.revelc.code.formatter</groupId>
501 <artifactId>formatter-maven-plugin</artifactId>
502 <version>2.8.1</version>
504 <configFile>${project.basedir}/onap-java-formatter.xml</configFile>
506 <!-- https://code.revelc.net/formatter-maven-plugin/
507 use mvn formatter:format to rewrite source files
508 use mvn formatter:validate to validate source files -->
511 <groupId>org.codehaus.groovy.maven</groupId>
512 <artifactId>gmaven-plugin</artifactId>
515 <groupId>com.diffplug.spotless</groupId>
516 <artifactId>spotless-maven-plugin</artifactId>
517 <version>1.18.0</version>
521 <order>com,java,javax,org</order>
525 <!-- https://github.com/diffplug/spotless/tree/master/plugin-maven
526 use mvn spotless:apply to rewrite source files
527 use mvn spotless:check to validate source files -->
529 <!-- license plugin -->
530 <!-- Uncomment this to add a license header to every source file -->
532 <groupId>com.mycila</groupId>
533 <artifactId>license-maven-plugin</artifactId>
534 <version>3.0</version>
536 <header>License.txt</header>
538 <include>src/main/java/**</include>
539 <include>src/test/java/**</include>
540 <include>pom.xml</include>
542 <skipExistingHeaders>true</skipExistingHeaders>
547 <!-- Set goal from "check" to "format" to auto update license headers -->
550 <phase>process-sources</phase>
556 <groupId>org.apache.maven.plugins</groupId>
557 <artifactId>maven-site-plugin</artifactId>
558 <version>3.3</version>
562 <groupId>org.apache.maven.plugins</groupId>
563 <artifactId>maven-checkstyle-plugin</artifactId>
564 <version>2.17</version>
568 <report>checkstyle</report>
577 <groupId>org.apache.maven.plugins</groupId>
578 <artifactId>maven-deploy-plugin</artifactId>
581 <groupId>org.springframework.boot</groupId>
582 <artifactId>spring-boot-maven-plugin</artifactId>
583 <version>2.0.1.RELEASE</version>
587 <goal>repackage</goal>
593 <artifactId>maven-assembly-plugin</artifactId>
596 <descriptor>src/main/assembly/descriptor.xml</descriptor>
601 <id>make-assembly</id>
602 <phase>package</phase>
610 <groupId>org.apache.maven.plugins</groupId>
611 <artifactId>maven-dependency-plugin</artifactId>
615 <phase>prepare-package</phase>
622 <groupId>org.onap.aai.schema-service</groupId>
623 <artifactId>aai-schema</artifactId>
624 <version>${version.org.onap.aai.aai-schema}</version>
626 <includes>onap/**/</includes>
627 <excludes>onap/*swagger**/</excludes>
628 <outputDirectory>${aai.build.directory}/bundleconfig/etc</outputDirectory>
636 <groupId>org.jacoco</groupId>
637 <artifactId>jacoco-maven-plugin</artifactId>
640 <id>default-check</id>
645 <dataFile>${jacoco.report.directory}/jacoco-ut.exec</dataFile>
647 <!-- implementation is needed only for Maven 2 -->
648 <rule implementation="org.jacoco.maven.RuleConfiguration">
649 <element>BUNDLE</element>
651 <limit implementation="org.jacoco.report.check.Limit">
652 <counter>LINE</counter>
653 <value>COVEREDRATIO</value>
654 <minimum>${jacoco.line.coverage.limit}</minimum>
667 <distributionManagement>
669 <id>ecomp-javadoc</id>
670 <url>dav:https://ecomp-nexus:8443/repository/aai/gizmo-javadoc/${project.version}</url>
672 </distributionManagement>