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-root</artifactId>
8 <version>0.2.1-SNAPSHOT</version>
11 <artifactId>distribution-odlsli</artifactId>
12 <version>0.2.1-SNAPSHOT</version>
13 <packaging>pom</packaging>
15 <name>ccsdk-distribution :: odlsli</name>
16 <description>Creates SDN Controller Docker container</description>
18 <name>openECOMP</name>
22 <image.name>onap/ccsdk-odlsli-image</image.name>
23 <ccsdk.project.version>${project.version}</ccsdk.project.version>
24 <docker.buildArg.https_proxy>${https_proxy}</docker.buildArg.https_proxy>
32 <groupId>org.codehaus.groovy.maven</groupId>
33 <artifactId>gmaven-plugin</artifactId>
36 <phase>validate</phase>
42 println project.properties['ccsdk.project.version'];
44 if ( project.properties['ccsdk.project.version'] != null ) {
45 versionArray = project.properties['ccsdk.project.version'].split('\\.');
48 if (project.properties['ccsdk.project.version'].endsWith("-SNAPSHOT"))
50 project.properties['project.docker.latesttag.version']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest";
52 project.properties['project.docker.latesttag.version']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest";
55 println 'New Tag for docker:' +
56 project.properties['project.docker.latesttag.version'];
66 <artifactId>maven-resources-plugin</artifactId>
67 <version>2.6</version>
70 <id>copy-dockerfile</id>
72 <goal>copy-resources</goal>
73 </goals><!-- here the phase you need -->
74 <phase>validate</phase>
76 <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
79 <directory>src/main/docker</directory>
81 <include>Dockerfile</include>
83 <filtering>true</filtering>
92 <goal>copy-resources</goal>
93 </goals><!-- here the phase you need -->
94 <phase>validate</phase>
96 <outputDirectory>${basedir}/target/docker-stage/opt/onap/sdnc/bin</outputDirectory>
99 <directory>src/main/scripts</directory>
101 <include>*.sh</include>
103 <filtering>false</filtering>
110 <id>copy-tarballs</id>
112 <goal>copy-resources</goal>
113 </goals><!-- here the phase you need -->
114 <phase>validate</phase>
116 <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
119 <directory>src/main/resources</directory>
121 <include>idmlight.db.mv.db</include>
123 <filtering>false</filtering>
131 <goal>copy-resources</goal>
132 </goals><!-- here the phase you need -->
133 <phase>validate</phase>
135 <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
138 <directory>src/main/resources</directory>
140 <include>org.ops4j.pax.logging.cfg</include>
142 <filtering>false</filtering>
150 <goal>copy-resources</goal>
151 </goals><!-- here the phase you need -->
152 <phase>validate</phase>
154 <outputDirectory>${basedir}/target/docker-stage/opt/onap/sdnc/data</outputDirectory>
157 <directory>src/main/resources</directory>
159 <include>*.dump</include>
161 <filtering>false</filtering>
167 <id>copy-properties</id>
169 <goal>copy-resources</goal>
170 </goals><!-- here the phase you need -->
171 <phase>validate</phase>
173 <outputDirectory>${basedir}/target/docker-stage/opt/onap/sdnc/data/properties</outputDirectory>
176 <directory>src/main/properties</directory>
178 <include>*.properties</include>
180 <filtering>false</filtering>
186 <id>copy-keystores</id>
188 <goal>copy-resources</goal>
189 </goals><!-- here the phase you need -->
190 <phase>validate</phase>
192 <outputDirectory>${basedir}/target/docker-stage/opt/onap/sdnc/data/stores</outputDirectory>
195 <directory>src/main/stores</directory>
197 <include>*.jks</include>
199 <filtering>false</filtering>
207 <groupId>org.codehaus.mojo</groupId>
208 <artifactId>exec-maven-plugin</artifactId>
209 <version>1.5.0</version>
213 <id>Get features</id>
214 <phase>generate-sources</phase>
219 <executable>/bin/bash</executable>
220 <environmentVariables>
221 <SDNC_CORE_VERSION>${ccsdk.sli.core.version}</SDNC_CORE_VERSION>
222 <SDNC_ADAPTORS_VERSION>${ccsdk.sli.adaptors.version}</SDNC_ADAPTORS_VERSION>
223 <SDNC_NORTHBOUND_VERSION>${ccsdk.sli.northbound.version}</SDNC_NORTHBOUND_VERSION>
224 <SDNC_PLUGINS_VERSION>${ccsdk.sli.plugins.version}</SDNC_PLUGINS_VERSION>
225 <SDNC_OAM_VERSION>${project.version}</SDNC_OAM_VERSION>
226 </environmentVariables>
228 <argument>${basedir}/src/main/scripts/installZips.sh</argument>
229 <argument>${basedir}/target/docker-stage/opt/onap/sdnc</argument>
235 <id>change shell permissions</id>
236 <phase>process-sources</phase>
241 <executable>/usr/bin/find</executable>
243 <argument>${basedir}/target/docker-stage/opt/onap/sdnc</argument>
244 <argument>-name</argument>
245 <argument>*.sh</argument>
246 <argument>-exec</argument>
247 <argument>chmod</argument>
248 <argument>+x</argument>
249 <argument>{}</argument>
250 <argument>;</argument>
267 <groupId>io.fabric8</groupId>
268 <artifactId>docker-maven-plugin</artifactId>
269 <version>0.16.5</version>
270 <inherited>false</inherited>
274 <name>${image.name}</name>
276 <cleanup>try</cleanup>
277 <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
278 <dockerFile>${basedir}/target/docker-stage/Dockerfile</dockerFile>
280 <tag>${project.version}</tag>
281 <tag>${project.version}-STAGING-${maven.build.timestamp}</tag>
282 <tag>${project.docker.latesttag.version}</tag>
290 <id>generate-images</id>
291 <phase>package</phase>
299 <phase>deploy</phase>