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.openecomp.sdnc.oam</groupId>
7 <artifactId>installation</artifactId>
8 <version>1.1.1-SNAPSHOT</version>
11 <modelVersion>4.0.0</modelVersion>
12 <packaging>pom</packaging>
13 <groupId>org.openecomp.sdnc.oam</groupId>
14 <artifactId>installation-sdnc</artifactId>
15 <version>1.1.1-SNAPSHOT</version>
17 <name>Installation - sdnc</name>
18 <description>Creates SDN Controller Docker container</description>
21 <image.name>openecomp/sdnc-image</image.name>
22 <sdnc.project.version>${project.version}</sdnc.project.version>
23 <sdnc.core.version>${project.version}</sdnc.core.version>
24 <sdnc.adaptors.version>${project.version}</sdnc.adaptors.version>
25 <sdnc.northbound.version>${project.version}</sdnc.northbound.version>
26 <sdnc.plugins.version>${project.version}</sdnc.plugins.version>
35 <groupId>org.codehaus.groovy.maven</groupId>
36 <artifactId>gmaven-plugin</artifactId>
39 <phase>validate</phase>
45 println project.properties['sdnc.project.version'];
47 if ( project.properties['sdnc.project.version'] != null ) {
49 project.properties['sdnc.project.version'].split('\\.');
52 if (project.properties['sdnc.project.version'].endsWith("-SNAPSHOT")) {
53 project.properties['project.docker.latesttag.version']=versionArray[0] + '.' + versionArray[1] + "-SNAPSHOT-latest";
55 project.properties['project.docker.latesttag.version']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest";
58 println 'New Tag for docker:' +
59 project.properties['project.docker.latesttag.version'];
66 <groupId>io.fabric8</groupId>
67 <artifactId>docker-maven-plugin</artifactId>
68 <version>0.16.5</version>
69 <inherited>false</inherited>
74 <name>${image.name}</name>
76 <cleanup>try</cleanup>
77 <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
78 <dockerFile>${basedir}/target/docker-stage/Dockerfile</dockerFile>
80 <tag>${project.version}</tag>
81 <tag>${project.version}-STAGING-${maven.build.timestamp}</tag>
82 <tag>${project.docker.latesttag.version}</tag>
90 <id>generate-images</id>
91 <phase>package</phase>
110 <groupId>org.apache.maven.plugins</groupId>
111 <artifactId>maven-dependency-plugin</artifactId>
112 <version>3.0.0</version>
115 <id>get-odl-distribution</id>
116 <phase>validate</phase>
123 <groupId>org.opendaylight.integration</groupId>
124 <artifactId>distribution-karaf</artifactId>
125 <version>0.5.1-Boron-SR1</version>
128 <overWrite>true</overWrite>
129 <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
132 <overWriteReleases>false</overWriteReleases>
133 <overWriteSnapshots>true</overWriteSnapshots>
134 <overWriteIfNewer>true</overWriteIfNewer>
141 <artifactId>maven-resources-plugin</artifactId>
142 <version>2.6</version>
145 <id>copy-dockerfile</id>
147 <goal>copy-resources</goal>
148 </goals><!-- here the phase you need -->
149 <phase>validate</phase>
151 <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
154 <directory>src/main/docker</directory>
156 <include>Dockerfile</include>
158 <filtering>true</filtering>
165 <id>copy-scripts</id>
167 <goal>copy-resources</goal>
168 </goals><!-- here the phase you need -->
169 <phase>validate</phase>
171 <outputDirectory>${basedir}/target/docker-stage/opt/openecomp/sdnc/bin</outputDirectory>
174 <directory>src/main/scripts</directory>
176 <include>*.sh</include>
178 <filtering>false</filtering>
185 <id>copy-tarballs</id>
187 <goal>copy-resources</goal>
188 </goals><!-- here the phase you need -->
189 <phase>validate</phase>
191 <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
194 <directory>src/main/resources</directory>
196 <include>*.tgz</include>
197 <include>idmlight.db.mv.db</include>
199 <filtering>false</filtering>
207 <goal>copy-resources</goal>
208 </goals><!-- here the phase you need -->
209 <phase>validate</phase>
211 <outputDirectory>${basedir}/target/docker-stage/opt/openecomp/sdnc/data</outputDirectory>
214 <directory>src/main/resources</directory>
216 <include>*.dump</include>
218 <filtering>false</filtering>
224 <id>copy-properties</id>
226 <goal>copy-resources</goal>
227 </goals><!-- here the phase you need -->
228 <phase>validate</phase>
230 <outputDirectory>${basedir}/target/docker-stage/opt/openecomp/sdnc/data/properties</outputDirectory>
233 <directory>../src/main/properties</directory>
235 <include>*.properties</include>
237 <filtering>false</filtering>
243 <id>copy-keystores</id>
245 <goal>copy-resources</goal>
246 </goals><!-- here the phase you need -->
247 <phase>validate</phase>
249 <outputDirectory>${basedir}/target/docker-stage/opt/openecomp/sdnc/data/stores</outputDirectory>
252 <directory>../src/main/stores</directory>
254 <include>*.jks</include>
256 <filtering>false</filtering>
264 <artifactId>exec-maven-plugin</artifactId>
265 <groupId>org.codehaus.mojo</groupId>
266 <version>1.5.0</version>
270 <id>Get features</id>
271 <phase>generate-sources</phase>
276 <executable>/bin/bash</executable>
277 <environmentVariables>
278 <SDNC_CORE_VERSION>${sdnc.core.version}</SDNC_CORE_VERSION>
279 <SDNC_ADAPTORS_VERSION>${sdnc.adaptors.version}</SDNC_ADAPTORS_VERSION>
280 <SDNC_NORTHBOUND_VERSION>${sdnc.northbound.version}</SDNC_NORTHBOUND_VERSION>
281 <SDNC_PLUGINS_VERSION>${sdnc.plugins.version}</SDNC_PLUGINS_VERSION>
282 <SDNC_OAM_VERSION>${project.version}</SDNC_OAM_VERSION>
283 </environmentVariables>
285 <argument>${basedir}/src/main/scripts/installZips.sh</argument>
286 <argument>${basedir}/target/docker-stage/opt/openecomp/sdnc</argument>
292 <id>change shell permissions</id>
293 <phase>process-sources</phase>
298 <executable>/usr/bin/find</executable>
300 <argument>${basedir}/target/docker-stage/opt/openecomp/sdnc</argument>
301 <argument>-name</argument>
302 <argument>*.sh</argument>
303 <argument>-exec</argument>
304 <argument>chmod</argument>
305 <argument>+x</argument>
306 <argument>{}</argument>
307 <argument>;</argument>
319 <name>openECOMP</name>