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.aai.aai-common</groupId>
28 <artifactId>aai-parent</artifactId>
29 <version>1.6.10</version>
33 <groupId>org.onap.aai.model-loader</groupId>
34 <artifactId>model-loader</artifactId>
35 <name>aai-model-loader</name>
36 <version>1.6.1</version>
39 <aai.common.version>1.6.10</aai.common.version>
40 <start-class>org.onap.aai.modelloader.service.ModelLoaderApplication</start-class>
41 <nexusproxy>https://nexus.onap.org</nexusproxy>
42 <docker.location>${basedir}/target</docker.location>
43 <hamcrest-all.version>1.3</hamcrest-all.version>
44 <babel.version>1.3.1</babel.version>
45 <aai.rest.client.version>1.2.1</aai.rest.client.version>
46 <sdc-distribution-client.version>1.3.0</sdc-distribution-client.version>
47 <!-- docker related properties -->
48 <docker.fabric.version>0.28.0</docker.fabric.version>
49 <aai.docker.version>1.0.0</aai.docker.version>
50 <aai.build.directory>${project.build.directory}/${project.artifactId}-${project.version}-build/</aai.build.directory>
51 <aai.docker.namespace>onap</aai.docker.namespace>
52 <aai.base.image>alpine</aai.base.image>
53 <aai.base.image.version>1.6.0</aai.base.image.version>
54 <!-- This will be used for the docker images as the default format of maven build has issues -->
55 <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
56 <!-- Code coverage enforcement -->
57 <jacoco.line.coverage.limit>0.80</jacoco.line.coverage.limit>
60 <distributionManagement>
62 <id>ecomp-releases</id>
63 <name>ECOMP Release Repository</name>
64 <url>${nexusproxy}/content/repositories/releases/</url>
67 <id>ecomp-snapshots</id>
68 <name>ECOMP Snapshot Repository</name>
69 <url>${nexusproxy}/content/repositories/snapshots/</url>
71 </distributionManagement>
74 <!-- Docker profile to be used for building docker image and pushing to nexus -->
80 <groupId>org.codehaus.mojo</groupId>
81 <artifactId>build-helper-maven-plugin</artifactId>
82 <version>3.0.0</version>
85 <phase>pre-clean</phase>
86 <id>parse-version</id>
88 <goal>parse-version</goal>
94 <groupId>org.codehaus.groovy.maven</groupId>
95 <artifactId>gmaven-plugin</artifactId>
96 <version>1.0</version>
99 <phase>pre-clean</phase>
105 def userAaiBaseImage = session.userProperties['aai.base.image'];
106 def userAaiCommonVersion = session.userProperties['aai.base.image.version'];
107 if (userAaiCommonVersion != null) {
108 project.properties['aai.base.image.version'] = userAaiCommonVersion;
110 if (userAaiBaseImage != null) {
111 project.properties['aai.base.image'] = userAaiBaseImage;
113 log.info 'Base image flavour: ' + project.properties['aai.base.image'];
114 log.info 'Base image version: ' + project.properties['aai.base.image.version'];
121 <groupId>io.fabric8</groupId>
122 <artifactId>docker-maven-plugin</artifactId>
123 <version>${docker.fabric.version}</version>
125 <verbose>true</verbose>
126 <apiVersion>1.23</apiVersion>
129 <name>${docker.push.registry}/${aai.docker.namespace}/${project.artifactId}:%l</name>
134 <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest</tag>
135 <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-${maven.build.timestamp}</tag>
137 <cleanup>try</cleanup>
138 <dockerFileDir>${project.basedir}/src/main/docker</dockerFileDir>
143 <directory>${aai.build.directory}</directory>
144 <outputDirectory>/${project.artifactId}</outputDirectory>
155 <id>clean-images</id>
156 <phase>pre-clean</phase>
161 <removeAll>true</removeAll>
165 <id>generate-images</id>
166 <phase>package</phase>
173 <phase>deploy</phase>
187 <groupId>org.springframework.boot</groupId>
188 <artifactId>spring-boot-starter-jetty</artifactId>
191 <groupId>org.springframework.boot</groupId>
192 <artifactId>spring-boot-starter-web</artifactId>
195 <groupId>org.springframework.boot</groupId>
196 <artifactId>spring-boot-starter-tomcat</artifactId>
201 <groupId>org.onap.aai</groupId>
202 <artifactId>babel</artifactId>
203 <version>${babel.version}</version>
204 <classifier>client</classifier>
208 <artifactId>*</artifactId>
213 <groupId>org.glassfish.jersey.core</groupId>
214 <artifactId>jersey-common</artifactId>
218 <groupId>org.onap.aai</groupId>
219 <artifactId>rest-client</artifactId>
222 <groupId>com.google.code.gson</groupId>
223 <artifactId>gson</artifactId>
226 <!-- Test dependencies -->
227 <!-- https://mvnrepository.com/artifact/com.mikesamuel/json-sanitizer -->
229 <groupId>com.mikesamuel</groupId>
230 <artifactId>json-sanitizer</artifactId>
231 <version>1.2.0</version>
234 <!-- Common logging framework -->
236 <groupId>org.onap.aai.logging-service</groupId>
237 <artifactId>common-logging</artifactId>
240 <groupId>ch.qos.logback</groupId>
241 <artifactId>logback-classic</artifactId>
244 <groupId>ch.qos.logback</groupId>
245 <artifactId>logback-core</artifactId>
248 <groupId>org.onap.sdc.sdc-distribution-client</groupId>
249 <artifactId>sdc-distribution-client</artifactId>
250 <version>${sdc-distribution-client.version}</version>
253 <groupId>org.json</groupId>
254 <artifactId>json</artifactId>
257 <groupId>org.eclipse.jetty</groupId>
258 <artifactId>jetty-security</artifactId>
261 <groupId>jline</groupId>
262 <artifactId>jline</artifactId>
263 <version>2.12.1</version>
266 <groupId>org.apache.commons</groupId>
267 <artifactId>commons-compress</artifactId>
270 <groupId>commons-io</groupId>
271 <artifactId>commons-io</artifactId>
274 <groupId>org.apache.commons</groupId>
275 <artifactId>commons-text</artifactId>
278 <!-- Test dependencies -->
280 <groupId>junit</groupId>
281 <artifactId>junit</artifactId>
285 <groupId>org.hamcrest</groupId>
286 <artifactId>hamcrest-all</artifactId>
287 <version>${hamcrest-all.version}</version>
291 <groupId>org.mockito</groupId>
292 <artifactId>mockito-core</artifactId>
296 <groupId>org.springframework.boot</groupId>
297 <artifactId>spring-boot-starter-test</artifactId>
302 <!-- Plugins and repositories -->
306 <url>http://repo1.maven.org/maven2</url>
310 <name>EvoSuite Repository</name>
311 <url>http://www.evosuite.org/m2</url>
313 </pluginRepositories>
318 <name>Maven 2 repository 2</name>
319 <url>http://repo2.maven.org/maven2/</url>
322 <id>ecomp-releases</id>
323 <name>ECOMP Release Repository</name>
324 <url>${nexusproxy}/content/repositories/releases/</url>
327 <id>ecomp-snapshots</id>
328 <name>ECOMP Snapshot Repository</name>
329 <url>${nexusproxy}/content/repositories/snapshots/</url>
332 <id>ecomp-staging</id>
333 <name>ECOMP Staging Repository</name>
334 <url>${nexusproxy}/content/repositories/staging/</url>
341 <groupId>org.springframework.boot</groupId>
342 <artifactId>spring-boot-maven-plugin</artifactId>
344 <executable>true</executable>
349 <goal>repackage</goal>
355 <groupId>com.mycila</groupId>
356 <artifactId>license-maven-plugin</artifactId>
357 <version>3.0</version>
359 <header>License.txt</header>
361 <include>src/main/java/**</include>
362 <include>src/test/java/**</include>
363 <include>version/properties</include>
364 <include>pom.xml</include>
366 <skipExistingHeaders>true</skipExistingHeaders>
371 <!-- Set goal to "format" to auto update license headers -->
374 <phase>process-sources</phase>
379 <groupId>org.apache.maven.plugins</groupId>
380 <artifactId>maven-deploy-plugin</artifactId>
383 <artifactId>maven-assembly-plugin</artifactId>
386 <descriptor>src/main/assembly/descriptor.xml</descriptor>
391 <id>make-assembly</id>
392 <phase>package</phase>
400 <groupId>org.jacoco</groupId>
401 <artifactId>jacoco-maven-plugin</artifactId>
404 <id>default-check</id>
409 <dataFile>${jacoco.report.directory}/jacoco-ut.exec</dataFile>
411 <!-- implementation is needed only for Maven 2 -->
412 <rule implementation="org.jacoco.maven.RuleConfiguration">
413 <element>BUNDLE</element>
415 <limit implementation="org.jacoco.report.check.Limit">
416 <counter>LINE</counter>
417 <value>COVEREDRATIO</value>
418 <minimum>${jacoco.line.coverage.limit}</minimum>