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" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3 <modelVersion>4.0.0</modelVersion>
6 <groupId>org.onap.ccsdk.distribution</groupId>
7 <artifactId>distribution-opendaylight</artifactId>
8 <version>0.2.1-SNAPSHOT</version>
11 <artifactId>distribution-odl-nitrogen</artifactId>
12 <version>0.2.1-SNAPSHOT</version>
13 <packaging>pom</packaging>
15 <name>ccsdk-distribution :: opendaylight :: ${project.artifactId}</name>
16 <description>Creates OpenDaylight container</description>
22 <image.name>onap/ccsdk-odl-image</image.name>
23 <ccsdk.project.version>${project.version}</ccsdk.project.version>
24 <ccsdk.opendaylight.version>0.7.1</ccsdk.opendaylight.version>
25 <ccsdk.mariadb-connector-java.version>2.1.1</ccsdk.mariadb-connector-java.version>
26 <docker.buildArg.https_proxy>${https_proxy}</docker.buildArg.https_proxy>
29 <dependencyManagement>
32 <groupId>org.opendaylight.integration</groupId>
33 <artifactId>karaf</artifactId>
34 <version>${ccsdk.opendaylight.version}</version>
38 <groupId>org.mariadb.jdbc</groupId>
39 <artifactId>mariadb-java-client</artifactId>
40 <version>${ccsdk.mariadb-connector-java.version}</version>
44 </dependencyManagement>
51 <groupId>org.codehaus.groovy.maven</groupId>
52 <artifactId>gmaven-plugin</artifactId>
55 <phase>validate</phase>
61 println project.properties['ccsdk.project.version'];
63 if (project.properties['ccsdk.project.version'] != null ) {
64 versionArray = project.properties['ccsdk.project.version'].split('\\.');
67 if (project.properties['ccsdk.project.version'].endsWith("-SNAPSHOT"))
69 project.properties['project.docker.latesttag.version']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest";
71 project.properties['project.docker.latesttag.version']=versionArray[0]+'.' + versionArray[1]+"-STAGING-latest";
74 println 'New Tag for docker:' + project.properties['project.docker.latesttag.version'];
84 <groupId>org.apache.maven.plugins</groupId>
85 <artifactId>maven-dependency-plugin</artifactId>
86 <version>3.0.0</version>
89 <id>get-odl-distribution</id>
90 <phase>validate</phase>
97 <groupId>org.opendaylight.integration</groupId>
98 <artifactId>karaf</artifactId>
99 <version>${ccsdk.opendaylight.version}</version>
102 <overWrite>true</overWrite>
103 <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
106 <overWriteReleases>false</overWriteReleases>
107 <overWriteSnapshots>true</overWriteSnapshots>
108 <overWriteIfNewer>true</overWriteIfNewer>
113 <id>get-mariadb-connector-jar</id>
114 <phase>validate</phase>
121 <groupId>org.mariadb.jdbc</groupId>
122 <artifactId>mariadb-java-client</artifactId>
123 <version>${ccsdk.mariadb-connector-java.version}</version>
125 <overWrite>true</overWrite>
126 <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
129 <overWriteReleases>false</overWriteReleases>
130 <overWriteSnapshots>true</overWriteSnapshots>
131 <overWriteIfNewer>true</overWriteIfNewer>
138 <artifactId>maven-resources-plugin</artifactId>
139 <version>2.6</version>
142 <id>copy-dockerfile</id>
144 <goal>copy-resources</goal>
145 </goals><!-- here the phase you need -->
146 <phase>validate</phase>
148 <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
151 <directory>src/main/docker</directory>
153 <include>Dockerfile</include>
155 <filtering>true</filtering>
174 <groupId>io.fabric8</groupId>
175 <artifactId>docker-maven-plugin</artifactId>
176 <version>0.16.5</version>
177 <inherited>false</inherited>
181 <name>${image.name}</name>
183 <cleanup>try</cleanup>
184 <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
185 <dockerFile>${basedir}/target/docker-stage/Dockerfile</dockerFile>
187 <tag>${project.version}</tag>
188 <tag>${project.version}-STAGING-${maven.build.timestamp}</tag>
189 <tag>${project.docker.latesttag.version}</tag>
197 <id>generate-images</id>
198 <phase>package</phase>
206 <phase>deploy</phase>