1 <?xml version="1.0" encoding="UTF-8"?>
2 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
6 <groupId>org.onap.ccsdk.distribution</groupId>
7 <artifactId>distribution-root</artifactId>
8 <version>0.2.0-SNAPSHOT</version>
11 <modelVersion>4.0.0</modelVersion>
12 <packaging>pom</packaging>
13 <artifactId>distribution-opendaylight</artifactId>
14 <version>0.2.0-SNAPSHOT</version>
16 <name>Distribution - opendaylight</name>
17 <description>Creates OpenDaylight container</description>
20 <image.name>onap/ccsdk-odl-image</image.name>
21 <ccsdk.project.version>${project.version}</ccsdk.project.version>
22 <ccsdk.opendaylight.version>0.6.1-Carbon</ccsdk.opendaylight.version>
23 <ccsdk.mariadb-connector-java.version>2.1.1</ccsdk.mariadb-connector-java.version>
24 <docker.buildArg.https_proxy>${https_proxy}</docker.buildArg.https_proxy>
27 <dependencyManagement>
30 <groupId>org.opendaylight.integration</groupId>
31 <artifactId>distribution-karaf</artifactId>
32 <version>${ccsdk.opendaylight.version}</version>
36 <groupId>org.mariadb.jdbc</groupId>
37 <artifactId>mariadb-java-client</artifactId>
38 <version>${ccsdk.mariadb-connector-java.version}</version>
42 </dependencyManagement>
49 <groupId>org.codehaus.groovy.maven</groupId>
50 <artifactId>gmaven-plugin</artifactId>
53 <phase>validate</phase>
59 println project.properties['ccsdk.project.version'];
61 if (project.properties['ccsdk.project.version'] != null ) {
62 versionArray = project.properties['ccsdk.project.version'].split('\\.');
65 if (project.properties['ccsdk.project.version'].endsWith("-SNAPSHOT"))
67 project.properties['project.docker.latesttag.version']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest";
69 project.properties['project.docker.latesttag.version']=versionArray[0]+'.' + versionArray[1]+"-STAGING-latest";
72 println 'New Tag for docker:' + project.properties['project.docker.latesttag.version'];
82 <groupId>org.apache.maven.plugins</groupId>
83 <artifactId>maven-dependency-plugin</artifactId>
84 <version>3.0.0</version>
87 <id>get-odl-distribution</id>
88 <phase>validate</phase>
95 <groupId>org.opendaylight.integration</groupId>
96 <artifactId>distribution-karaf</artifactId>
97 <version>${ccsdk.opendaylight.version}</version>
100 <overWrite>true</overWrite>
101 <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
104 <overWriteReleases>false</overWriteReleases>
105 <overWriteSnapshots>true</overWriteSnapshots>
106 <overWriteIfNewer>true</overWriteIfNewer>
113 <groupId>org.apache.maven.plugins</groupId>
114 <artifactId>maven-dependency-plugin</artifactId>
115 <version>3.0.0</version>
118 <id>get-mariadb-connector-jar</id>
119 <phase>validate</phase>
126 <groupId>org.mariadb.jdbc</groupId>
127 <artifactId>mariadb-java-client</artifactId>
128 <version>${ccsdk.mariadb-connector-java.version}</version>
130 <overWrite>true</overWrite>
131 <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
134 <overWriteReleases>false</overWriteReleases>
135 <overWriteSnapshots>true</overWriteSnapshots>
136 <overWriteIfNewer>true</overWriteIfNewer>
143 <artifactId>maven-resources-plugin</artifactId>
144 <version>2.6</version>
147 <id>copy-dockerfile</id>
149 <goal>copy-resources</goal>
150 </goals><!-- here the phase you need -->
151 <phase>validate</phase>
153 <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
156 <directory>src/main/docker</directory>
158 <include>Dockerfile</include>
160 <filtering>true</filtering>
180 <groupId>io.fabric8</groupId>
181 <artifactId>docker-maven-plugin</artifactId>
182 <version>0.16.5</version>
183 <inherited>false</inherited>
187 <name>${image.name}</name>
189 <cleanup>try</cleanup>
190 <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
191 <dockerFile>${basedir}/target/docker-stage/Dockerfile</dockerFile>
193 <tag>${project.version}</tag>
194 <tag>${project.version}-STAGING-${maven.build.timestamp}</tag>
195 <tag>${project.docker.latesttag.version}</tag>
203 <id>generate-images</id>
204 <phase>package</phase>
212 <phase>deploy</phase>
227 <name>openECOMP</name>