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.groovy.maven</groupId>
384 <artifactId>gmaven-plugin</artifactId>
385 <version>1.0</version>
388 <phase>validate</phase>
394 def userAaiBaseImage = session.userProperties['aai.base.image']
395 def userAaiCommonVersion = session.userProperties['aai.base.image.version']
396 if (userAaiCommonVersion != null) {
397 project.properties['aai.base.image.version'] = userAaiCommonVersion
399 if (userAaiBaseImage != null) {
400 project.properties['aai.base.image'] = userAaiBaseImage
402 log.info 'Base image flavour: ' + project.properties['aai.base.image']
403 log.info 'Base image version: ' + project.properties['aai.base.image.version']
406 if (project.properties['aai.base.image.version'] != null) {
407 versionArray = project.properties['aai.base.image.version'].split('\\.');
410 project.properties["project.major.version"] = versionArray[0];
411 project.properties["project.minor.version"] = versionArray[1];
412 project.properties['project.docker.latesttag.version'] = versionArray[0] + '.' + versionArray[1] + '-STAGING-latest';
413 println 'New Tag for docker:' + project.properties['project.docker.latesttag.version'];
420 <groupId>io.fabric8</groupId>
421 <artifactId>docker-maven-plugin</artifactId>
422 <version>${docker.fabric.version}</version>
424 <verbose>true</verbose>
425 <apiVersion>1.23</apiVersion>
428 <name>${docker.push.registry}/${aai.docker.namespace}/${project.artifactId}:%l
434 <tag>${project.docker.latesttag.version}</tag>
435 <tag>${project.major.version}.${project.minor.version}-STAGING-${maven.build.timestamp}</tag>
437 <cleanup>try</cleanup>
438 <dockerFileDir>${project.basedir}/src/main/docker</dockerFileDir>
443 <directory>${aai.build.directory}</directory>
444 <outputDirectory>/${project.artifactId}</outputDirectory>
455 <id>clean-images</id>
456 <phase>pre-clean</phase>
461 <removeAll>true</removeAll>
465 <id>generate-images</id>
466 <phase>package</phase>
473 <phase>deploy</phase>
486 <finalName>${project.artifactId}</finalName>
489 Using https://code.revelc.net/formatter-maven-plugin/ for Eclipse formatter
490 Using https://github.com/diffplug/spotless/tree/master/plugin-maven for import order
491 Use in combination to rewrite code and imports, then checkstyle
493 mvn formatter:format spotless:apply process-sources
496 <groupId>net.revelc.code.formatter</groupId>
497 <artifactId>formatter-maven-plugin</artifactId>
498 <version>2.8.1</version>
500 <configFile>${project.basedir}/onap-java-formatter.xml</configFile>
502 <!-- https://code.revelc.net/formatter-maven-plugin/
503 use mvn formatter:format to rewrite source files
504 use mvn formatter:validate to validate source files -->
507 <groupId>com.diffplug.spotless</groupId>
508 <artifactId>spotless-maven-plugin</artifactId>
509 <version>1.18.0</version>
513 <order>com,java,javax,org</order>
517 <!-- https://github.com/diffplug/spotless/tree/master/plugin-maven
518 use mvn spotless:apply to rewrite source files
519 use mvn spotless:check to validate source files -->
521 <!-- license plugin -->
522 <!-- Uncomment this to add a license header to every source file -->
524 <groupId>com.mycila</groupId>
525 <artifactId>license-maven-plugin</artifactId>
526 <version>3.0</version>
528 <header>License.txt</header>
530 <include>src/main/java/**</include>
531 <include>src/test/java/**</include>
532 <include>pom.xml</include>
534 <skipExistingHeaders>true</skipExistingHeaders>
539 <!-- Set goal from "check" to "format" to auto update license headers -->
542 <phase>process-sources</phase>
548 <groupId>org.apache.maven.plugins</groupId>
549 <artifactId>maven-site-plugin</artifactId>
550 <version>3.3</version>
554 <groupId>org.apache.maven.plugins</groupId>
555 <artifactId>maven-checkstyle-plugin</artifactId>
556 <version>2.17</version>
560 <report>checkstyle</report>
569 <groupId>org.apache.maven.plugins</groupId>
570 <artifactId>maven-deploy-plugin</artifactId>
573 <groupId>org.springframework.boot</groupId>
574 <artifactId>spring-boot-maven-plugin</artifactId>
575 <version>2.0.1.RELEASE</version>
579 <goal>repackage</goal>
585 <artifactId>maven-assembly-plugin</artifactId>
588 <descriptor>src/main/assembly/descriptor.xml</descriptor>
593 <id>make-assembly</id>
594 <phase>package</phase>
602 <groupId>org.apache.maven.plugins</groupId>
603 <artifactId>maven-dependency-plugin</artifactId>
607 <phase>prepare-package</phase>
614 <groupId>org.onap.aai.schema-service</groupId>
615 <artifactId>aai-schema</artifactId>
616 <version>${version.org.onap.aai.aai-schema}</version>
618 <includes>onap/**/</includes>
619 <outputDirectory>${aai.build.directory}/bundleconfig/etc</outputDirectory>
627 <groupId>org.jacoco</groupId>
628 <artifactId>jacoco-maven-plugin</artifactId>
631 <id>default-check</id>
636 <dataFile>${jacoco.report.directory}/jacoco-ut.exec</dataFile>
638 <!-- implementation is needed only for Maven 2 -->
639 <rule implementation="org.jacoco.maven.RuleConfiguration">
640 <element>BUNDLE</element>
642 <limit implementation="org.jacoco.report.check.Limit">
643 <counter>LINE</counter>
644 <value>COVEREDRATIO</value>
645 <minimum>${jacoco.line.coverage.limit}</minimum>
655 <groupId>org.codehaus.mojo</groupId>
656 <artifactId>build-helper-maven-plugin</artifactId>
657 <version>3.0.0</version>
660 <id>parse-version</id>
662 <goal>parse-version</goal>
670 <distributionManagement>
672 <id>ecomp-javadoc</id>
673 <url>dav:https://ecomp-nexus:8443/repository/aai/gizmo-javadoc/${project.version}</url>
675 </distributionManagement>