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>
58 <dependencyManagement>
61 <!-- Import dependency management from Spring Boot -->
62 <groupId>org.springframework.boot</groupId>
63 <artifactId>spring-boot-dependencies</artifactId>
64 <version>1.5.21.RELEASE</version>
69 </dependencyManagement>
73 <groupId>org.springframework.boot</groupId>
74 <artifactId>spring-boot-starter-web</artifactId>
77 <groupId>org.springframework.boot</groupId>
78 <artifactId>spring-boot-starter-tomcat</artifactId>
83 <groupId>org.springframework.boot</groupId>
84 <artifactId>spring-boot-starter-jetty</artifactId>
87 <groupId>org.springframework.boot</groupId>
88 <artifactId>spring-boot-starter</artifactId>
91 <groupId>ch.qos.logback</groupId>
92 <artifactId>logback-classic</artifactId>
97 <groupId>org.springframework.boot</groupId>
98 <artifactId>spring-boot-starter-jersey</artifactId>
101 <groupId>org.springframework.boot</groupId>
102 <artifactId>spring-boot-starter-tomcat</artifactId>
107 <groupId>org.springframework.boot</groupId>
108 <artifactId>spring-boot-starter-actuator</artifactId>
111 <groupId>org.springframework.boot</groupId>
112 <artifactId>spring-boot-configuration-processor</artifactId>
113 <optional>true</optional>
116 <groupId>org.springframework.boot</groupId>
117 <artifactId>spring-boot-starter-test</artifactId>
121 <groupId>org.apache.cxf</groupId>
122 <artifactId>cxf-rt-frontend-jaxrs</artifactId>
123 <version>3.2.5</version>
128 <groupId>io.swagger</groupId>
129 <artifactId>swagger-jersey2-jaxrs</artifactId>
130 <version>1.5.8</version>
133 <groupId>io.springfox</groupId>
134 <artifactId>springfox-swagger2</artifactId>
135 <version>2.9.2</version>
138 <groupId>io.springfox</groupId>
139 <artifactId>springfox-swagger-ui</artifactId>
140 <version>2.9.2</version>
144 <!-- ONAP AAI-COMMON (incl. model) -->
146 <groupId>org.onap.aai.schema-service</groupId>
147 <artifactId>aai-schema</artifactId>
148 <version>${version.org.onap.aai.aai-schema}</version>
151 <groupId>org.onap.aai.aai-common</groupId>
152 <artifactId>aai-schema-ingest</artifactId>
153 <version>${version.org.onap.aai.aai-schema-ingest}</version>
156 <groupId>org.powermock</groupId>
157 <artifactId>*</artifactId>
162 <groupId>org.onap.aai.aai-common</groupId>
163 <artifactId>aai-utils</artifactId>
164 <version>${version.org.onap.aai.aai-utils}</version>
167 <groupId>org.onap.aai.aai-common</groupId>
168 <artifactId>aai-auth</artifactId>
169 <version>${version.org.onap.aai.aai-auth}</version>
172 <!-- ONAP EVENT CLIENT -->
174 <groupId>org.onap.aai.event-client</groupId>
175 <artifactId>event-client-dmaap</artifactId>
176 <version>${event.client.version}</version>
179 <groupId>org.slf4j</groupId>
180 <artifactId>slf4j-api</artifactId>
185 <groupId>org.onap.aai.event-client</groupId>
186 <artifactId>event-client-kafka</artifactId>
187 <version>${event.client.version}</version>
190 <groupId>org.slf4j</groupId>
191 <artifactId>slf4j-api</artifactId>
197 <groupId>org.onap.aai.event-client</groupId>
198 <artifactId>event-client-rabbitmq</artifactId>
199 <version>${event.client.version}</version>
202 <groupId>org.slf4j</groupId>
203 <artifactId>slf4j-api</artifactId>
208 <!-- ONAP COMMON LOGGING -->
210 <groupId>org.onap.aai.logging-service</groupId>
211 <artifactId>common-logging</artifactId>
212 <version>1.2.2</version>
215 <groupId>ch.qos.logback</groupId>
216 <artifactId>logback-classic</artifactId>
219 <groupId>ch.qos.logback</groupId>
220 <artifactId>logback-core</artifactId>
223 <groupId>org.slf4j</groupId>
224 <artifactId>slf4j-api</artifactId>
229 <!-- ONAP REST CLIENT -->
231 <groupId>org.onap.aai</groupId>
232 <artifactId>rest-client</artifactId>
233 <version>1.5.0</version>
237 <groupId>ch.qos.logback</groupId>
238 <artifactId>logback-classic</artifactId>
239 <version>1.2.3</version>
242 <groupId>ch.qos.logback</groupId>
243 <artifactId>logback-core</artifactId>
244 <version>1.2.3</version>
247 <groupId>ch.qos.logback</groupId>
248 <artifactId>logback-classic</artifactId>
253 <groupId>ch.qos.logback</groupId>
254 <artifactId>logback-access</artifactId>
255 <version>1.2.3</version>
258 <groupId>com.google.guava</groupId>
259 <artifactId>guava</artifactId>
262 <groupId>radeox</groupId>
263 <artifactId>radeox</artifactId>
264 <version>1.0-b2</version>
267 <groupId>org.codehaus.jackson</groupId>
268 <artifactId>jackson-mapper-asl</artifactId>
269 <version>1.4.5</version>
272 <groupId>commons-io</groupId>
273 <artifactId>commons-io</artifactId>
274 <version>2.4</version>
277 <groupId>org.apache.commons</groupId>
278 <artifactId>commons-lang3</artifactId>
279 <version>3.3.1</version>
282 <groupId>com.google.code.gson</groupId>
283 <artifactId>gson</artifactId>
284 <version>2.6.2</version>
287 <groupId>org.eclipse.persistence</groupId>
288 <artifactId>eclipselink</artifactId>
289 <version>2.6.2</version>
292 <groupId>net.dongliu</groupId>
293 <artifactId>gson-java8-datatype</artifactId>
294 <version>1.0.3</version>
297 <groupId>com.jayway.jsonpath</groupId>
298 <artifactId>json-path</artifactId>
299 <version>2.2.0</version>
302 <groupId>org.slf4j</groupId>
303 <artifactId>slf4j-api</artifactId>
308 <groupId>org.apache.tinkerpop</groupId>
309 <artifactId>gremlin-core</artifactId>
310 <version>3.2.3</version>
311 <scope>provided</scope>
314 <groupId>org.slf4j</groupId>
315 <artifactId>slf4j-log4j12</artifactId>
318 <groupId>org.slf4j</groupId>
319 <artifactId>jcl-over-slf4j</artifactId>
322 <groupId>org.slf4j</groupId>
323 <artifactId>slf4j-api</artifactId>
328 <groupId>org.apache.tinkerpop</groupId>
329 <artifactId>tinkergraph-gremlin</artifactId>
330 <version>3.2.3</version>
331 <scope>provided</scope>
334 <groupId>org.json</groupId>
335 <artifactId>json</artifactId>
336 <version>20160212</version>
339 <groupId>org.apache.httpcomponents</groupId>
340 <artifactId>httpclient</artifactId>
341 <version>4.5.3</version>
344 <groupId>org.apache.httpcomponents</groupId>
345 <artifactId>httpcore</artifactId>
346 <version>4.4.1</version>
349 <!-- TEST DEPENDENCIES -->
351 <groupId>junit</groupId>
352 <artifactId>junit</artifactId>
355 <groupId>org.skyscreamer</groupId>
356 <artifactId>jsonassert</artifactId>
357 <version>1.5.0</version>
361 <groupId>org.mockito</groupId>
362 <artifactId>mockito-core</artifactId>
363 <version>2.15.0</version>
367 <groupId>org.hamcrest</groupId>
368 <artifactId>hamcrest-library</artifactId>
375 <!-- Docker profile to be used for building docker image and pushing to nexus -->
381 <groupId>org.codehaus.groovy.maven</groupId>
382 <artifactId>gmaven-plugin</artifactId>
383 <version>1.0</version>
386 <phase>prepare-package</phase>
392 def userAaiBaseImage = session.userProperties['aai.base.image']
393 def userAaiCommonVersion = session.userProperties['aai.base.image.version']
394 if (userAaiCommonVersion != null) {
395 project.properties['aai.base.image.version'] = userAaiCommonVersion
397 if (userAaiBaseImage != null) {
398 project.properties['aai.base.image'] = userAaiBaseImage
400 log.info 'Base image flavour: ' + project.properties['aai.base.image']
401 log.info 'Base image version: ' + project.properties['aai.base.image.version']
408 <groupId>io.fabric8</groupId>
409 <artifactId>docker-maven-plugin</artifactId>
410 <version>${docker.fabric.version}</version>
412 <verbose>true</verbose>
413 <apiVersion>1.23</apiVersion>
416 <name>${docker.push.registry}/${aai.docker.namespace}/${project.artifactId}:%l
423 <cleanup>try</cleanup>
424 <dockerFileDir>${project.basedir}/src/main/docker</dockerFileDir>
429 <directory>${aai.build.directory}</directory>
430 <outputDirectory>/${project.artifactId}</outputDirectory>
441 <id>clean-images</id>
442 <phase>pre-clean</phase>
447 <removeAll>true</removeAll>
451 <id>generate-images</id>
452 <phase>package</phase>
459 <phase>deploy</phase>
472 <finalName>${project.artifactId}</finalName>
475 Using https://code.revelc.net/formatter-maven-plugin/ for Eclipse formatter
476 Using https://github.com/diffplug/spotless/tree/master/plugin-maven for import order
477 Use in combination to rewrite code and imports, then checkstyle
479 mvn formatter:format spotless:apply process-sources
482 <groupId>net.revelc.code.formatter</groupId>
483 <artifactId>formatter-maven-plugin</artifactId>
484 <version>2.8.1</version>
486 <configFile>${project.basedir}/onap-java-formatter.xml</configFile>
488 <!-- https://code.revelc.net/formatter-maven-plugin/
489 use mvn formatter:format to rewrite source files
490 use mvn formatter:validate to validate source files -->
493 <groupId>com.diffplug.spotless</groupId>
494 <artifactId>spotless-maven-plugin</artifactId>
495 <version>1.18.0</version>
499 <order>com,java,javax,org</order>
503 <!-- https://github.com/diffplug/spotless/tree/master/plugin-maven
504 use mvn spotless:apply to rewrite source files
505 use mvn spotless:check to validate source files -->
507 <!-- license plugin -->
508 <!-- Uncomment this to add a license header to every source file -->
510 <groupId>com.mycila</groupId>
511 <artifactId>license-maven-plugin</artifactId>
512 <version>3.0</version>
514 <header>License.txt</header>
516 <include>src/main/java/**</include>
517 <include>src/test/java/**</include>
518 <include>pom.xml</include>
520 <skipExistingHeaders>true</skipExistingHeaders>
525 <!-- Set goal from "check" to "format" to auto update license headers -->
528 <phase>process-sources</phase>
534 <groupId>org.apache.maven.plugins</groupId>
535 <artifactId>maven-site-plugin</artifactId>
536 <version>3.3</version>
540 <groupId>org.apache.maven.plugins</groupId>
541 <artifactId>maven-checkstyle-plugin</artifactId>
542 <version>2.17</version>
546 <report>checkstyle</report>
555 <groupId>org.apache.maven.plugins</groupId>
556 <artifactId>maven-deploy-plugin</artifactId>
559 <groupId>org.springframework.boot</groupId>
560 <artifactId>spring-boot-maven-plugin</artifactId>
561 <version>2.0.1.RELEASE</version>
565 <goal>repackage</goal>
571 <artifactId>maven-assembly-plugin</artifactId>
574 <descriptor>src/main/assembly/descriptor.xml</descriptor>
579 <id>make-assembly</id>
580 <phase>package</phase>
588 <groupId>org.apache.maven.plugins</groupId>
589 <artifactId>maven-dependency-plugin</artifactId>
593 <phase>prepare-package</phase>
600 <groupId>org.onap.aai.schema-service</groupId>
601 <artifactId>aai-schema</artifactId>
602 <version>${version.org.onap.aai.aai-schema}</version>
604 <includes>onap/**/</includes>
605 <outputDirectory>${aai.build.directory}/bundleconfig/etc</outputDirectory>
613 <groupId>org.jacoco</groupId>
614 <artifactId>jacoco-maven-plugin</artifactId>
617 <id>default-check</id>
622 <dataFile>${jacoco.report.directory}/jacoco-ut.exec</dataFile>
624 <!-- implementation is needed only for Maven 2 -->
625 <rule implementation="org.jacoco.maven.RuleConfiguration">
626 <element>BUNDLE</element>
628 <limit implementation="org.jacoco.report.check.Limit">
629 <counter>LINE</counter>
630 <value>COVEREDRATIO</value>
631 <minimum>${jacoco.line.coverage.limit}</minimum>
641 <groupId>org.codehaus.mojo</groupId>
642 <artifactId>build-helper-maven-plugin</artifactId>
643 <version>3.0.0</version>
646 <id>parse-version</id>
648 <goal>parse-version</goal>
656 <distributionManagement>
658 <id>ecomp-javadoc</id>
659 <url>dav:https://ecomp-nexus:8443/repository/aai/gizmo-javadoc/${project.version}</url>
661 </distributionManagement>