1 <!-- ============LICENSE_START=======================================================
2 Copyright (C) 2019 Nordix Foundation. ================================================================================
3 Licensed under the Apache License, Version 2.0 (the "License"); you may not
4 use this file except in compliance with the License. You may obtain a copy
5 of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required
6 by applicable law or agreed to in writing, software distributed under the
7 License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
8 OF ANY KIND, either express or implied. See the License for the specific
9 language governing permissions and limitations under the License. SPDX-License-Identifier:
10 Apache-2.0 ============LICENSE_END========================================================= -->
12 <project xmlns="http://maven.apache.org/POM/4.0.0"
13 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
14 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
16 <modelVersion>4.0.0</modelVersion>
19 <groupId>org.onap.svnfm</groupId>
20 <artifactId>packages</artifactId>
21 <version>1.0.0-SNAPSHOT</version>
24 <packaging>pom</packaging>
25 <artifactId>docker</artifactId>
26 <name>Docker Images</name>
27 <description>Docker Images</description>
30 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
31 <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
32 <svnfm.project.version>${project.version}</svnfm.project.version>
33 <docker.skip>false</docker.skip>
34 <docker.skip.build>false</docker.skip.build>
35 <docker.skip.push>false</docker.skip.push>
36 <docker.pull.registry>nexus3.onap.org:10001</docker.pull.registry>
37 <docker.push.registry>nexus3.onap.org:10003</docker.push.registry>
38 <maven.build.timestamp.format>yyyyMMdd'T'HHmm</maven.build.timestamp.format>
42 <finalName>${project.artifactId}-${project.version}</finalName>
45 <groupId>org.codehaus.groovy.maven</groupId>
46 <artifactId>gmaven-plugin</artifactId>
47 <version>1.0</version>
50 <phase>validate</phase>
56 println 'Project version: ' +
57 project.properties['svnfm.project.version'];
61 project.properties['svnfm.project.version'] != null ) {
63 project.properties['svnfm.project.version'].split('-');
67 project.properties['svnfm.project.version'].endsWith("-SNAPSHOT")
70 project.properties['project.docker.latesttag.version']=versionArray[0]
73 project.properties['project.docker.latesttag.version']=versionArray[0]
77 println 'New tag for docker: ' +
78 project.properties['project.docker.latesttag.version'];
86 <groupId>io.fabric8</groupId>
87 <artifactId>docker-maven-plugin</artifactId>
88 <version>0.19.1</version>
91 <verbose>true</verbose>
92 <apiVersion>1.23</apiVersion>
93 <pullRegistry>${docker.pull.registry}</pullRegistry>
94 <pushRegistry>${docker.push.registry}</pushRegistry>
98 <name>onap/svnfm/simulator</name>
100 <cleanup>try</cleanup>
101 <dockerFile>Dockerfile</dockerFile>
103 <tag>${project.version}</tag>
104 <tag>${project.version}-${maven.build.timestamp}</tag>
105 <tag>${project.docker.latesttag.version}</tag>
112 <include>org.onap.svnfm:simulator</include>
114 <outputFileNameMapping>app.jar</outputFileNameMapping>
126 <id>clean-images</id>
127 <phase>pre-clean</phase>
132 <removeAll>true</removeAll>
137 <id>generate-images</id>
138 <phase>generate-sources</phase>
146 <phase>deploy</phase>
152 <image>onap/svnfm/simulator</image>
159 <groupId>org.apache.maven.plugins</groupId>
160 <artifactId>maven-deploy-plugin</artifactId>
161 <version>2.8</version>