1 <?xml version="1.0" encoding="UTF-8"?>
3 ============LICENSE_START=======================================================
5 ================================================================================
6 Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
7 Copyright © 2017-2018 European Software Marketing Ltd.
8 ================================================================================
9 Licensed under the Apache License, Version 2.0 (the "License");
10 you may not use this file except in compliance with the License.
11 You may obtain a copy of the License at
13 http://www.apache.org/licenses/LICENSE-2.0
15 Unless required by applicable law or agreed to in writing, software
16 distributed under the License is distributed on an "AS IS" BASIS,
17 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 See the License for the specific language governing permissions and
19 limitations under the License.
20 ============LICENSE_END=========================================================
22 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
23 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
24 <modelVersion>4.0.0</modelVersion>
27 <groupId>org.onap.oparent</groupId>
28 <artifactId>oparent</artifactId>
29 <version>2.1.0</version>
33 <groupId>org.onap.aai.model-loader</groupId>
34 <artifactId>model-loader</artifactId>
35 <name>aai-model-loader</name>
36 <version>1.8.0-SNAPSHOT</version>
38 <dependencyManagement>
41 <groupId>org.springframework.boot</groupId>
42 <artifactId>spring-boot-dependencies</artifactId>
43 <version>${spring-boot.version}</version>
48 </dependencyManagement>
51 <start-class>org.onap.aai.modelloader.service.ModelLoaderApplication</start-class>
52 <nexusproxy>https://nexus.onap.org</nexusproxy>
53 <docker.location>${basedir}/target</docker.location>
54 <spring-boot.version>2.1.12.RELEASE</spring-boot.version>
55 <apache.commons-text.version>1.8</apache.commons-text.version>
56 <commons-compress.version>1.19</commons-compress.version>
57 <hamcrest-all.version>1.3</hamcrest-all.version>
58 <babel.version>1.8.0</babel.version>
59 <aai.rest.client.version>1.2.1</aai.rest.client.version>
60 <sdc-distribution-client.version>1.4.1</sdc-distribution-client.version>
61 <logback.version>1.2.3</logback.version>
62 <!-- docker related properties -->
63 <docker.fabric.version>0.28.0</docker.fabric.version>
64 <aai.docker.version>1.0.0</aai.docker.version>
65 <aai.build.directory>${project.build.directory}/${project.artifactId}-${project.version}-build/</aai.build.directory>
66 <aai.docker.namespace>onap</aai.docker.namespace>
67 <aai.base.image>alpine</aai.base.image>
68 <aai.base.image.version>1.8.1</aai.base.image.version>
69 <!-- This will be used for the docker images as the default format of maven build has issues -->
70 <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
72 <sonar.jacoco.reportPath />
73 <sonar.jacoco.itReportPath />
74 <sonar.jacoco.reportMissing.force.zero />
76 <jacoco.line.coverage.limit>0.75</jacoco.line.coverage.limit>
77 <jacoco.version>0.8.5</jacoco.version>
78 <sonar-jacoco-listeners.version>3.2</sonar-jacoco-listeners.version>
79 <sonar.core.codeCoveragePlugin>jacoco</sonar.core.codeCoveragePlugin>
80 <sonar.coverage.jacoco.xmlReportPaths>${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
81 <sonar.exclusions>**/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/**</sonar.exclusions>
83 <sonar.scanner.version>3.7.0.1746</sonar.scanner.version>
85 <maven-javadoc-plugin.version>3.2.0</maven-javadoc-plugin.version>
86 <maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
87 <maven-compiler-plugin.source>11</maven-compiler-plugin.source>
88 <maven-compiler-plugin.target>11</maven-compiler-plugin.target>
89 <maven-compiler-plugin.test.source>11</maven-compiler-plugin.test.source>
90 <maven-compiler-plugin.test.target>11</maven-compiler-plugin.test.target>
93 <distributionManagement>
95 <id>ecomp-releases</id>
96 <name>ECOMP Release Repository</name>
97 <url>${nexusproxy}/content/repositories/releases/</url>
100 <id>ecomp-snapshots</id>
101 <name>ECOMP Snapshot Repository</name>
102 <url>${nexusproxy}/content/repositories/snapshots/</url>
103 </snapshotRepository>
104 </distributionManagement>
107 <!-- Docker profile to be used for building docker image and pushing to nexus -->
113 <groupId>org.codehaus.mojo</groupId>
114 <artifactId>build-helper-maven-plugin</artifactId>
115 <version>3.0.0</version>
118 <phase>pre-clean</phase>
119 <id>parse-version</id>
121 <goal>parse-version</goal>
127 <groupId>org.codehaus.groovy.maven</groupId>
128 <artifactId>gmaven-plugin</artifactId>
129 <version>1.0</version>
132 <phase>pre-clean</phase>
138 def userAaiBaseImage = session.userProperties['aai.base.image'];
139 def userAaiCommonVersion = session.userProperties['aai.base.image.version'];
140 if (userAaiCommonVersion != null) {
141 project.properties['aai.base.image.version'] = userAaiCommonVersion;
143 if (userAaiBaseImage != null) {
144 project.properties['aai.base.image'] = userAaiBaseImage;
146 log.info 'Base image flavour: ' + project.properties['aai.base.image'];
147 log.info 'Base image version: ' + project.properties['aai.base.image.version'];
154 <groupId>io.fabric8</groupId>
155 <artifactId>docker-maven-plugin</artifactId>
156 <version>${docker.fabric.version}</version>
158 <verbose>true</verbose>
159 <apiVersion>1.23</apiVersion>
162 <name>${docker.push.registry}/${aai.docker.namespace}/${project.artifactId}:%l</name>
167 <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest</tag>
168 <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-${maven.build.timestamp}</tag>
170 <cleanup>try</cleanup>
171 <dockerFileDir>${project.basedir}/src/main/docker</dockerFileDir>
176 <directory>${aai.build.directory}</directory>
177 <outputDirectory>/${project.artifactId}</outputDirectory>
188 <id>clean-images</id>
189 <phase>pre-clean</phase>
194 <removeAll>true</removeAll>
198 <id>generate-images</id>
199 <phase>package</phase>
206 <phase>deploy</phase>
220 <groupId>org.springframework.boot</groupId>
221 <artifactId>spring-boot-starter-jetty</artifactId>
224 <groupId>org.springframework.boot</groupId>
225 <artifactId>spring-boot-starter-web</artifactId>
228 <groupId>org.springframework.boot</groupId>
229 <artifactId>spring-boot-starter-tomcat</artifactId>
234 <groupId>org.onap.aai</groupId>
235 <artifactId>babel</artifactId>
236 <version>${babel.version}</version>
237 <classifier>client</classifier>
241 <artifactId>*</artifactId>
246 <groupId>org.glassfish.jersey.core</groupId>
247 <artifactId>jersey-common</artifactId>
251 <groupId>org.onap.aai</groupId>
252 <artifactId>rest-client</artifactId>
253 <version>${aai.rest.client.version}</version>
256 <groupId>com.google.code.gson</groupId>
257 <artifactId>gson</artifactId>
260 <!-- Test dependencies -->
261 <!-- https://mvnrepository.com/artifact/com.mikesamuel/json-sanitizer -->
263 <groupId>com.mikesamuel</groupId>
264 <artifactId>json-sanitizer</artifactId>
265 <version>1.2.0</version>
268 <!-- Common logging framework -->
270 <groupId>org.onap.aai.logging-service</groupId>
271 <artifactId>common-logging</artifactId>
272 <version>1.5.0</version>
275 <groupId>ch.qos.logback</groupId>
276 <artifactId>logback-classic</artifactId>
277 <version>${logback.version}</version><!--$NO-MVN-MAN-VER$ -->
280 <groupId>ch.qos.logback</groupId>
281 <artifactId>logback-core</artifactId>
282 <version>${logback.version}</version><!--$NO-MVN-MAN-VER$ -->
285 <groupId>org.onap.sdc.sdc-distribution-client</groupId>
286 <artifactId>sdc-distribution-client</artifactId>
287 <version>${sdc-distribution-client.version}</version>
290 <groupId>org.json</groupId>
291 <artifactId>json</artifactId>
292 <version>20131018</version><!--$NO-MVN-MAN-VER$ -->
295 <groupId>org.eclipse.jetty</groupId>
296 <artifactId>jetty-security</artifactId>
299 <groupId>jline</groupId>
300 <artifactId>jline</artifactId>
301 <version>2.12.1</version>
304 <groupId>org.apache.commons</groupId>
305 <artifactId>commons-compress</artifactId>
306 <version>${commons-compress.version}</version>
309 <groupId>commons-io</groupId>
310 <artifactId>commons-io</artifactId>
311 <version>2.4</version>
314 <groupId>org.apache.commons</groupId>
315 <artifactId>commons-text</artifactId>
316 <version>${apache.commons-text.version}</version>
319 <!-- Test dependencies -->
321 <groupId>junit</groupId>
322 <artifactId>junit</artifactId>
326 <groupId>org.hamcrest</groupId>
327 <artifactId>hamcrest-all</artifactId>
328 <version>${hamcrest-all.version}</version>
332 <groupId>org.mockito</groupId>
333 <artifactId>mockito-core</artifactId>
337 <groupId>org.springframework.boot</groupId>
338 <artifactId>spring-boot-starter-test</artifactId>
343 <!-- Plugins and repositories -->
347 <url>http://repo1.maven.org/maven2</url>
351 <name>EvoSuite Repository</name>
352 <url>http://www.evosuite.org/m2</url>
354 </pluginRepositories>
359 <name>Maven 2 repository 2</name>
360 <url>http://repo2.maven.org/maven2/</url>
363 <id>ecomp-releases</id>
364 <name>ECOMP Release Repository</name>
365 <url>${nexusproxy}/content/repositories/releases/</url>
368 <id>ecomp-snapshots</id>
369 <name>ECOMP Snapshot Repository</name>
370 <url>${nexusproxy}/content/repositories/snapshots/</url>
373 <id>ecomp-staging</id>
374 <name>ECOMP Staging Repository</name>
375 <url>${nexusproxy}/content/repositories/staging/</url>
382 <groupId>org.apache.maven.plugins</groupId>
383 <artifactId>maven-compiler-plugin</artifactId>
384 <version>${maven-compiler-plugin.version}</version>
385 <inherited>true</inherited>
387 <source>${maven-compiler-plugin.source}</source>
388 <target>${maven-compiler-plugin.target}</target>
389 <testSource>${maven-compiler-plugin.test.source}</testSource>
390 <testTarget>${maven-compiler-plugin.test.target}</testTarget>
394 <groupId>org.springframework.boot</groupId>
395 <artifactId>spring-boot-maven-plugin</artifactId>
396 <version>${spring-boot.version}</version>
398 <executable>true</executable>
403 <goal>repackage</goal>
409 <groupId>com.mycila</groupId>
410 <artifactId>license-maven-plugin</artifactId>
411 <version>3.0</version>
413 <header>License.txt</header>
415 <include>src/main/java/**</include>
416 <include>src/test/java/**</include>
417 <include>version/properties</include>
418 <include>pom.xml</include>
420 <skipExistingHeaders>true</skipExistingHeaders>
425 <!-- Set goal to "format" to auto update license headers -->
428 <phase>process-sources</phase>
433 <groupId>org.apache.maven.plugins</groupId>
434 <artifactId>maven-deploy-plugin</artifactId>
436 <classifier>client</classifier>
440 <artifactId>maven-assembly-plugin</artifactId>
443 <descriptor>src/main/assembly/descriptor.xml</descriptor>
448 <id>make-assembly</id>
449 <phase>package</phase>
457 <!-- once we connect aai-parent or oparent 3.0+ we can take out this
461 <groupId>org.jacoco</groupId>
462 <artifactId>jacoco-maven-plugin</artifactId>
463 <version>${jacoco.version}</version>
465 <!-- Note: This exclusion list should match <sonar.exclusions> property
468 <exclude>**/gen/**</exclude>
469 <exclude>**/generated-sources/**</exclude>
470 <exclude>**/yang-gen/**</exclude>
471 <exclude>**/pax/**</exclude>
475 <!-- Prepares the property pointing to the JaCoCo runtime agent which
476 is passed as VM argument when Maven the Surefire plugin is executed. -->
478 <id>pre-unit-test</id>
480 <goal>prepare-agent</goal>
483 <!-- Sets the path to the file which contains the execution data
485 <destFile>${project.build.directory}/code-coverage/jacoco-ut.exec</destFile>
486 <!-- Sets the name of the property containing the settings for JaCoCo
488 <propertyName>surefireArgLine</propertyName>
491 <!-- Ensures that the code coverage report for unit tests is created
492 after unit tests have been run. -->
494 <id>post-unit-test</id>
500 <!-- Sets the path to the file which contains the execution data
502 <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
503 <!-- Sets the output directory for the code coverage report. -->
504 <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
508 <id>pre-integration-test</id>
509 <phase>pre-integration-test</phase>
511 <goal>prepare-agent</goal>
514 <!-- Sets the path to the file which contains the execution data
516 <destFile>${project.build.directory}/code-coverage/jacoco-it.exec</destFile>
517 <!-- Sets the name of the property containing the settings for JaCoCo
519 <propertyName>failsafeArgLine</propertyName>
522 <!-- Ensures that the code coverage report for integration tests after
523 integration tests have been run. -->
525 <id>post-integration-test</id>
526 <phase>post-integration-test</phase>
531 <!-- Sets the path to the file which contains the execution data
533 <dataFile>${project.build.directory}/code-coverage/jacoco-it.exec</dataFile>
534 <!-- Sets the output directory for the code coverage report. -->
535 <outputDirectory>${project.reporting.outputDirectory}/jacoco-it</outputDirectory>
539 <id>default-check</id>
544 <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
546 <rule implementation="org.jacoco.maven.RuleConfiguration">
547 <element>BUNDLE</element>
549 <limit implementation="org.jacoco.report.check.Limit">
550 <counter>LINE</counter>
551 <value>COVEREDRATIO</value>
552 <minimum>${jacoco.line.coverage.limit}</minimum>
562 <groupId>org.apache.maven.plugins</groupId>
563 <artifactId>maven-surefire-plugin</artifactId>
564 <version>3.0.0-M4</version>
566 <!-- Sets the VM argument line used when unit tests are run. -->
567 <argLine>${surefireArgLine}</argLine>
568 <!-- Excludes integration tests when unit tests are run. -->
570 <exclude>**/IT*.java</exclude>
575 <groupId>org.apache.maven.plugins</groupId>
576 <artifactId>maven-failsafe-plugin</artifactId>
577 <version>3.0.0-M4</version>
579 <!-- Ensures that both integration-test and verify goals of the Failsafe
580 Maven plugin are executed. -->
582 <id>integration-tests</id>
584 <goal>integration-test</goal>
588 <!-- Sets the VM argument line used when integration tests are run. -->
589 <argLine>${failsafeArgLine}</argLine>
595 <groupId>org.sonarsource.scanner.maven</groupId>
596 <artifactId>sonar-maven-plugin</artifactId>
597 <version>${sonar.scanner.version}</version>
599 <!-- end removable sonar config -->