1 <?xml version="1.0" encoding="UTF-8"?>
3 ~ Copyright © 2017-2018 AT&T Intellectual Property.
5 ~ Licensed under the Apache License, Version 2.0 (the "License");
6 ~ you may not use this file except in compliance with the License.
7 ~ You may obtain a copy of the License at
9 ~ http://www.apache.org/licenses/LICENSE-2.0
11 ~ Unless required by applicable law or agreed to in writing, software
12 ~ distributed under the License is distributed on an "AS IS" BASIS,
13 ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 ~ See the License for the specific language governing permissions and
15 ~ limitations under the License.
17 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
18 <modelVersion>4.0.0</modelVersion>
20 <groupId>org.onap.ccsdk.apps.controllerblueprints</groupId>
21 <artifactId>parent</artifactId>
22 <version>0.4.0-SNAPSHOT</version>
23 <relativePath>../parent</relativePath>
25 <artifactId>distribution</artifactId>
26 <packaging>pom</packaging>
27 <name>Controller Blueprints Distribution</name>
29 <assembly.id>maven</assembly.id>
30 <name.space>org.onap.ccsdk.apps</name.space> <!-- <name.space>${namespace}</name.space> -->
31 <serviceArtifactName>controllerblueprints</serviceArtifactName>
32 <image.name>onap/ccsdk-controllerblueprints</image.name>
33 <docker.buildArg.https_proxy>${https_proxy}</docker.buildArg.https_proxy>
34 <docker.push.phase>deploy</docker.push.phase>
35 <docker.verbose>true</docker.verbose>
40 <groupId>org.onap.ccsdk.apps.controllerblueprints</groupId>
41 <artifactId>application</artifactId>
47 <artifactId>maven-resources-plugin</artifactId>
48 <version>2.6</version>
51 <id>copy-dockerfile</id>
53 <goal>copy-resources</goal>
54 </goals><!-- here the phase you need -->
55 <phase>validate</phase>
57 <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
60 <directory>src/main/docker</directory>
64 <filtering>true</filtering>
72 <groupId>org.apache.maven.plugins</groupId>
73 <artifactId>maven-antrun-plugin</artifactId>
77 <phase>package</phase>
80 <fixcrlf srcdir="${basedir}" eol="unix" includes="**/*.sh, **/*.source"/>
90 <!--build the final artifact for docker deployment -->
91 <artifactId>maven-assembly-plugin</artifactId>
92 <version>3.1.0</version>
94 <!-- <skipAssembly>${skip.assembly}</skipAssembly>-->
95 <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
97 <descriptor>src/main/docker/distribution.xml</descriptor>
99 <tarLongFileMode>posix</tarLongFileMode>
103 <id>${assembly.id}</id>
104 <phase>package</phase>
112 <groupId>org.codehaus.groovy.maven</groupId>
113 <artifactId>gmaven-plugin</artifactId>
114 <version>1.0</version>
117 <phase>validate</phase>
123 println project.properties['ccsdk.project.version'];
125 if (project.properties['ccsdk.project.version'] != null ) {
126 versionArray = project.properties['ccsdk.project.version'].split('\\.');
129 if (project.properties['ccsdk.project.version'].endsWith("-SNAPSHOT"))
131 project.properties['project.docker.latesttag.version']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest";
133 project.properties['project.docker.latesttag.version']=versionArray[0]+'.' + versionArray[1]+"-STAGING-latest";
136 println 'New Tag for docker:' + project.properties['project.docker.latesttag.version'];
152 <groupId>io.fabric8</groupId>
153 <artifactId>docker-maven-plugin</artifactId>
154 <version>0.26.1</version>
155 <inherited>false</inherited>
159 <name>${image.name}</name>
161 <cleanup>try</cleanup>
162 <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
164 <tag>${project.version}</tag>
165 <tag>${project.version}-STAGING-${maven.build.timestamp}</tag>
166 <tag>${project.docker.latesttag.version}</tag>
171 <verbose>true</verbose>
175 <id>generate-images</id>
176 <phase>package</phase>
183 <phase>${docker.push.phase}</phase>