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>3.3.3</version>
33 <groupId>org.onap.aai.model-loader</groupId>
34 <artifactId>model-loader</artifactId>
35 <name>aai-model-loader</name>
36 <version>1.14.0-SNAPSHOT</version>
38 <dependencyManagement>
41 <groupId>org.springframework.boot</groupId>
42 <artifactId>spring-boot-dependencies</artifactId>
43 <version>${spring-boot.version}</version>
48 <groupId>org.springframework.cloud</groupId>
49 <artifactId>spring-cloud-dependencies</artifactId>
50 <version>${spring-cloud.version}</version>
55 </dependencyManagement>
58 <start-class>org.onap.aai.modelloader.service.ModelLoaderApplication</start-class>
59 <nexusproxy>https://nexus.onap.org</nexusproxy>
60 <docker.location>${basedir}/target</docker.location>
61 <spring-boot.version>2.7.18</spring-boot.version>
62 <spring-cloud.version>2021.0.8</spring-cloud.version>
63 <apache.commons-text.version>1.10.0</apache.commons-text.version>
64 <commons-compress.version>1.22</commons-compress.version>
65 <gson.version>2.10.1</gson.version>
66 <hamcrest-all.version>1.3</hamcrest-all.version>
67 <babel.version>1.13.0</babel.version>
68 <sdc-distribution-client.version>2.0.0</sdc-distribution-client.version>
69 <logback.version>1.2.11</logback.version>
70 <!-- docker related properties -->
71 <docker.fabric.version>0.39.0</docker.fabric.version>
72 <aai.docker.version>1.0.0</aai.docker.version>
73 <aai.build.directory>${project.build.directory}/${project.artifactId}-${project.version}-build/</aai.build.directory>
74 <aai.docker.namespace>onap</aai.docker.namespace>
75 <aai.base.image>alpine</aai.base.image>
76 <aai.base.image.version>1.13.2</aai.base.image.version>
77 <!-- This will be used for the docker images as the default format of maven build has issues -->
78 <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
80 <sonar.jacoco.reportPath />
81 <sonar.jacoco.itReportPath />
82 <sonar.jacoco.reportMissing.force.zero />
84 <jacoco.line.coverage.limit>0.75</jacoco.line.coverage.limit>
85 <jacoco.version>0.8.5</jacoco.version>
86 <sonar-jacoco-listeners.version>3.2</sonar-jacoco-listeners.version>
87 <sonar.core.codeCoveragePlugin>jacoco</sonar.core.codeCoveragePlugin>
88 <sonar.coverage.jacoco.xmlReportPaths>${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
89 <sonar.exclusions>**/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/**</sonar.exclusions>
91 <sonar.scanner.version>3.7.0.1746</sonar.scanner.version>
93 <maven-javadoc-plugin.version>3.2.0</maven-javadoc-plugin.version>
94 <maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
95 <maven-compiler-plugin.source>11</maven-compiler-plugin.source>
96 <maven-compiler-plugin.target>11</maven-compiler-plugin.target>
97 <maven-compiler-plugin.test.source>11</maven-compiler-plugin.test.source>
98 <maven-compiler-plugin.test.target>11</maven-compiler-plugin.test.target>
101 <distributionManagement>
103 <id>ecomp-releases</id>
104 <name>ECOMP Release Repository</name>
105 <url>${nexusproxy}/content/repositories/releases/</url>
108 <id>ecomp-snapshots</id>
109 <name>ECOMP Snapshot Repository</name>
110 <url>${nexusproxy}/content/repositories/snapshots/</url>
111 </snapshotRepository>
112 </distributionManagement>
115 <!-- Docker profile to be used for building docker image and pushing to nexus -->
121 <groupId>org.codehaus.mojo</groupId>
122 <artifactId>build-helper-maven-plugin</artifactId>
123 <version>3.0.0</version>
126 <phase>pre-clean</phase>
127 <id>parse-version</id>
129 <goal>parse-version</goal>
135 <groupId>org.codehaus.groovy.maven</groupId>
136 <artifactId>gmaven-plugin</artifactId>
137 <version>1.0</version>
140 <phase>pre-clean</phase>
146 def userAaiBaseImage = session.userProperties['aai.base.image'];
147 def userAaiCommonVersion = session.userProperties['aai.base.image.version'];
148 if (userAaiCommonVersion != null) {
149 project.properties['aai.base.image.version'] = userAaiCommonVersion;
151 if (userAaiBaseImage != null) {
152 project.properties['aai.base.image'] = userAaiBaseImage;
154 log.info 'Base image flavour: ' + project.properties['aai.base.image'];
155 log.info 'Base image version: ' + project.properties['aai.base.image.version'];
162 <groupId>io.fabric8</groupId>
163 <artifactId>docker-maven-plugin</artifactId>
164 <version>${docker.fabric.version}</version>
166 <verbose>true</verbose>
167 <apiVersion>1.23</apiVersion>
170 <name>${docker.push.registry}/${aai.docker.namespace}/${project.artifactId}:%l</name>
175 <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest</tag>
176 <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-${maven.build.timestamp}</tag>
178 <cleanup>try</cleanup>
179 <dockerFileDir>${project.basedir}/src/main/docker</dockerFileDir>
184 <directory>${aai.build.directory}</directory>
185 <outputDirectory>/${project.artifactId}</outputDirectory>
196 <id>clean-images</id>
197 <phase>pre-clean</phase>
202 <removeAll>true</removeAll>
206 <id>generate-images</id>
207 <phase>package</phase>
214 <phase>deploy</phase>
228 <groupId>org.springframework.boot</groupId>
229 <artifactId>spring-boot-starter-jetty</artifactId>
232 <groupId>org.springframework.boot</groupId>
233 <artifactId>spring-boot-starter-web</artifactId>
236 <groupId>org.springframework.boot</groupId>
237 <artifactId>spring-boot-starter-tomcat</artifactId>
242 <groupId>org.springframework.boot</groupId>
243 <artifactId>spring-boot-starter-aop</artifactId>
247 <groupId>org.apache.kafka</groupId>
248 <artifactId>kafka-clients</artifactId>
249 <!-- <version>3.3.1</version> -->
252 <groupId>org.springframework.kafka</groupId>
253 <artifactId>spring-kafka</artifactId>
254 <!-- <version>3.1.2</version> -->
257 <groupId>org.springframework.kafka</groupId>
258 <artifactId>spring-kafka-test</artifactId>
259 <!-- <version>3.1.1</version> -->
263 <groupId>org.onap.aai</groupId>
264 <artifactId>babel</artifactId>
265 <version>${babel.version}</version>
266 <classifier>client</classifier>
270 <artifactId>*</artifactId>
275 <groupId>com.google.code.gson</groupId>
276 <artifactId>gson</artifactId>
277 <version>${gson.version}</version>
280 <!-- Test dependencies -->
281 <!-- https://mvnrepository.com/artifact/com.mikesamuel/json-sanitizer -->
283 <groupId>com.mikesamuel</groupId>
284 <artifactId>json-sanitizer</artifactId>
285 <version>1.2.3</version>
288 <!-- Common logging framework -->
290 <groupId>org.onap.aai.logging-service</groupId>
291 <artifactId>common-logging</artifactId>
292 <version>1.5.0</version>
295 <groupId>ch.qos.logback</groupId>
296 <artifactId>logback-classic</artifactId>
297 <version>${logback.version}</version>
298 <!--$NO-MVN-MAN-VER$ -->
301 <groupId>ch.qos.logback</groupId>
302 <artifactId>logback-core</artifactId>
303 <version>${logback.version}</version>
304 <!--$NO-MVN-MAN-VER$ -->
307 <groupId>org.onap.sdc.sdc-distribution-client</groupId>
308 <artifactId>sdc-distribution-client</artifactId>
309 <version>${sdc-distribution-client.version}</version>
312 <groupId>org.apache.commons</groupId>
313 <artifactId>commons-compress</artifactId>
314 <version>${commons-compress.version}</version>
317 <groupId>commons-io</groupId>
318 <artifactId>commons-io</artifactId>
319 <version>2.11.0</version>
322 <groupId>org.apache.commons</groupId>
323 <artifactId>commons-text</artifactId>
324 <version>${apache.commons-text.version}</version>
327 <groupId>org.springframework.cloud</groupId>
328 <artifactId>spring-cloud-starter-sleuth</artifactId>
331 <groupId>org.springframework.cloud</groupId>
332 <artifactId>spring-cloud-sleuth-zipkin</artifactId>
335 <groupId>com.fasterxml.jackson.dataformat</groupId>
336 <artifactId>jackson-dataformat-xml</artifactId>
339 <!-- Test dependencies -->
341 <groupId>org.hamcrest</groupId>
342 <artifactId>hamcrest-all</artifactId>
343 <version>${hamcrest-all.version}</version>
347 <groupId>org.junit.jupiter</groupId>
348 <artifactId>junit-jupiter</artifactId>
352 <groupId>org.junit.jupiter</groupId>
353 <artifactId>junit-jupiter-api</artifactId>
357 <groupId>org.mockito</groupId>
358 <artifactId>mockito-core</artifactId>
362 <groupId>org.springframework.boot</groupId>
363 <artifactId>spring-boot-starter-test</artifactId>
367 <groupId>com.vaadin.external.google</groupId>
368 <artifactId>android-json</artifactId>
373 <groupId>org.springframework.cloud</groupId>
374 <artifactId>spring-cloud-contract-wiremock</artifactId>
379 <!-- Plugins and repositories -->
383 <url>https://repo1.maven.org/maven2</url>
387 <name>EvoSuite Repository</name>
388 <url>https://www.evosuite.org/m2</url>
390 </pluginRepositories>
395 <name>Maven 2 repository 2</name>
396 <url>https://repo2.maven.org/maven2/</url>
399 <id>ecomp-releases</id>
400 <name>ECOMP Release Repository</name>
401 <url>${nexusproxy}/content/repositories/releases/</url>
404 <id>ecomp-snapshots</id>
405 <name>ECOMP Snapshot Repository</name>
406 <url>${nexusproxy}/content/repositories/snapshots/</url>
409 <id>ecomp-staging</id>
410 <name>ECOMP Staging Repository</name>
411 <url>${nexusproxy}/content/repositories/staging/</url>
418 <groupId>org.apache.maven.plugins</groupId>
419 <artifactId>maven-compiler-plugin</artifactId>
420 <version>${maven-compiler-plugin.version}</version>
421 <inherited>true</inherited>
423 <source>${maven-compiler-plugin.source}</source>
424 <target>${maven-compiler-plugin.target}</target>
425 <testSource>${maven-compiler-plugin.test.source}</testSource>
426 <testTarget>${maven-compiler-plugin.test.target}</testTarget>
430 <groupId>org.springframework.boot</groupId>
431 <artifactId>spring-boot-maven-plugin</artifactId>
432 <version>${spring-boot.version}</version>
434 <executable>true</executable>
439 <goal>repackage</goal>
445 <groupId>com.mycila</groupId>
446 <artifactId>license-maven-plugin</artifactId>
447 <version>3.0</version>
449 <header>License.txt</header>
451 <include>src/main/java/**</include>
452 <include>src/test/java/**</include>
453 <include>version/properties</include>
454 <include>pom.xml</include>
456 <skipExistingHeaders>true</skipExistingHeaders>
461 <!-- Set goal to "format" to auto update license headers -->
464 <phase>process-sources</phase>
469 <groupId>org.apache.maven.plugins</groupId>
470 <artifactId>maven-deploy-plugin</artifactId>
472 <classifier>client</classifier>
476 <artifactId>maven-assembly-plugin</artifactId>
479 <descriptor>src/main/assembly/descriptor.xml</descriptor>
484 <id>make-assembly</id>
485 <phase>package</phase>
493 <!-- once we connect aai-parent or oparent 3.0+ we can take out this
497 <groupId>org.jacoco</groupId>
498 <artifactId>jacoco-maven-plugin</artifactId>
499 <version>${jacoco.version}</version>
501 <!-- Note: This exclusion list should match <sonar.exclusions> property
504 <exclude>**/gen/**</exclude>
505 <exclude>**/generated-sources/**</exclude>
506 <exclude>**/yang-gen/**</exclude>
507 <exclude>**/pax/**</exclude>
511 <!-- Prepares the property pointing to the JaCoCo runtime agent which
512 is passed as VM argument when Maven the Surefire plugin is executed. -->
514 <id>pre-unit-test</id>
516 <goal>prepare-agent</goal>
519 <!-- Sets the path to the file which contains the execution data
521 <destFile>${project.build.directory}/code-coverage/jacoco-ut.exec</destFile>
522 <!-- Sets the name of the property containing the settings for JaCoCo
524 <propertyName>surefireArgLine</propertyName>
527 <!-- Ensures that the code coverage report for unit tests is created
528 after unit tests have been run. -->
530 <id>post-unit-test</id>
536 <!-- Sets the path to the file which contains the execution data
538 <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
539 <!-- Sets the output directory for the code coverage report. -->
540 <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
544 <id>pre-integration-test</id>
545 <phase>pre-integration-test</phase>
547 <goal>prepare-agent</goal>
550 <!-- Sets the path to the file which contains the execution data
552 <destFile>${project.build.directory}/code-coverage/jacoco-it.exec</destFile>
553 <!-- Sets the name of the property containing the settings for JaCoCo
555 <propertyName>failsafeArgLine</propertyName>
558 <!-- Ensures that the code coverage report for integration tests after
559 integration tests have been run. -->
561 <id>post-integration-test</id>
562 <phase>post-integration-test</phase>
567 <!-- Sets the path to the file which contains the execution data
569 <dataFile>${project.build.directory}/code-coverage/jacoco-it.exec</dataFile>
570 <!-- Sets the output directory for the code coverage report. -->
571 <outputDirectory>${project.reporting.outputDirectory}/jacoco-it</outputDirectory>
575 <id>default-check</id>
580 <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
582 <rule implementation="org.jacoco.maven.RuleConfiguration">
583 <element>BUNDLE</element>
585 <limit implementation="org.jacoco.report.check.Limit">
586 <counter>LINE</counter>
587 <value>COVEREDRATIO</value>
588 <minimum>${jacoco.line.coverage.limit}</minimum>
598 <groupId>org.apache.maven.plugins</groupId>
599 <artifactId>maven-surefire-plugin</artifactId>
600 <version>3.1.2</version>
602 <!-- Sets the VM argument line used when unit tests are run. -->
603 <argLine>${surefireArgLine}</argLine>
604 <!-- Excludes integration tests when unit tests are run. -->
606 <exclude>**/IT*.java</exclude>
611 <groupId>org.apache.maven.plugins</groupId>
612 <artifactId>maven-failsafe-plugin</artifactId>
613 <version>3.1.2</version>
615 <!-- Ensures that both integration-test and verify goals of the Failsafe
616 Maven plugin are executed. -->
618 <id>integration-tests</id>
620 <goal>integration-test</goal>
624 <!-- Sets the VM argument line used when integration tests are run. -->
625 <argLine>${failsafeArgLine}</argLine>
631 <groupId>org.sonarsource.scanner.maven</groupId>
632 <artifactId>sonar-maven-plugin</artifactId>
633 <version>${sonar.scanner.version}</version>
635 <!-- end removable sonar config -->