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>
27 <sdnc.opendaylight.version>0.5.1-Boron-SR1</sdnc.opendaylight.version>
28 <sdnc.mysql-connector-java.version>5.1.39</sdnc.mysql-connector-java.version>
29 <docker.buildArg.https_proxy>${https_proxy}</docker.buildArg.https_proxy>
32 <dependencyManagement>
35 <groupId>org.opendaylight.integration</groupId>
36 <artifactId>distribution-karaf</artifactId>
37 <version>${sdnc.opendaylight.version}</version>
41 <groupId>mysql</groupId>
42 <artifactId>mysql-connector-java</artifactId>
43 <version>${sdnc.mysql-connector-java.version}</version>
47 </dependencyManagement>
54 <groupId>org.codehaus.groovy.maven</groupId>
55 <artifactId>gmaven-plugin</artifactId>
58 <phase>validate</phase>
64 println project.properties['sdnc.project.version'];
66 if ( project.properties['sdnc.project.version'] != null ) {
68 project.properties['sdnc.project.version'].split('\\.');
71 if (project.properties['sdnc.project.version'].endsWith("-SNAPSHOT")) {
72 project.properties['project.docker.latesttag.version']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest";
74 project.properties['project.docker.latesttag.version']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest";
77 println 'New Tag for docker:' +
78 project.properties['project.docker.latesttag.version'];
86 <groupId>io.fabric8</groupId>
87 <artifactId>docker-maven-plugin</artifactId>
88 <version>0.16.5</version>
89 <inherited>false</inherited>
93 <name>${image.name}</name>
95 <cleanup>try</cleanup>
96 <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
97 <dockerFile>${basedir}/target/docker-stage/Dockerfile</dockerFile>
99 <tag>${project.version}</tag>
100 <tag>${project.version}-STAGING-${maven.build.timestamp}</tag>
101 <tag>${project.docker.latesttag.version}</tag>
109 <id>generate-images</id>
110 <phase>package</phase>
118 <phase>deploy</phase>
129 <groupId>org.apache.maven.plugins</groupId>
130 <artifactId>maven-dependency-plugin</artifactId>
131 <version>3.0.0</version>
134 <id>get-odl-distribution</id>
135 <phase>validate</phase>
142 <groupId>org.opendaylight.integration</groupId>
143 <artifactId>distribution-karaf</artifactId>
144 <version>${sdnc.opendaylight.version}</version>
147 <overWrite>true</overWrite>
148 <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
151 <overWriteReleases>false</overWriteReleases>
152 <overWriteSnapshots>true</overWriteSnapshots>
153 <overWriteIfNewer>true</overWriteIfNewer>
160 <groupId>org.apache.maven.plugins</groupId>
161 <artifactId>maven-dependency-plugin</artifactId>
162 <version>3.0.0</version>
165 <id>get-mysql-connector-jar</id>
166 <phase>validate</phase>
173 <groupId>mysql</groupId>
174 <artifactId>mysql-connector-java</artifactId>
175 <version>${sdnc.mysql-connector-java.version}</version>
178 <overWrite>true</overWrite>
179 <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
182 <overWriteReleases>false</overWriteReleases>
183 <overWriteSnapshots>true</overWriteSnapshots>
184 <overWriteIfNewer>true</overWriteIfNewer>
191 <artifactId>maven-resources-plugin</artifactId>
192 <version>2.6</version>
195 <id>copy-dockerfile</id>
197 <goal>copy-resources</goal>
198 </goals><!-- here the phase you need -->
199 <phase>validate</phase>
201 <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
204 <directory>src/main/docker</directory>
206 <include>Dockerfile</include>
208 <filtering>true</filtering>
215 <id>copy-scripts</id>
217 <goal>copy-resources</goal>
218 </goals><!-- here the phase you need -->
219 <phase>validate</phase>
221 <outputDirectory>${basedir}/target/docker-stage/opt/openecomp/sdnc/bin</outputDirectory>
224 <directory>src/main/scripts</directory>
226 <include>*.sh</include>
228 <filtering>false</filtering>
235 <id>copy-tarballs</id>
237 <goal>copy-resources</goal>
238 </goals><!-- here the phase you need -->
239 <phase>validate</phase>
241 <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
244 <directory>src/main/resources</directory>
246 <include>idmlight.db.mv.db</include>
248 <filtering>false</filtering>
256 <goal>copy-resources</goal>
257 </goals><!-- here the phase you need -->
258 <phase>validate</phase>
260 <outputDirectory>${basedir}/target/docker-stage/opt/openecomp/sdnc/data</outputDirectory>
263 <directory>src/main/resources</directory>
265 <include>*.dump</include>
267 <filtering>false</filtering>
273 <id>copy-properties</id>
275 <goal>copy-resources</goal>
276 </goals><!-- here the phase you need -->
277 <phase>validate</phase>
279 <outputDirectory>${basedir}/target/docker-stage/opt/openecomp/sdnc/data/properties</outputDirectory>
282 <directory>../src/main/properties</directory>
284 <include>*.properties</include>
286 <filtering>false</filtering>
292 <id>copy-keystores</id>
294 <goal>copy-resources</goal>
295 </goals><!-- here the phase you need -->
296 <phase>validate</phase>
298 <outputDirectory>${basedir}/target/docker-stage/opt/openecomp/sdnc/data/stores</outputDirectory>
301 <directory>../src/main/stores</directory>
303 <include>*.jks</include>
305 <filtering>false</filtering>
313 <artifactId>exec-maven-plugin</artifactId>
314 <groupId>org.codehaus.mojo</groupId>
315 <version>1.5.0</version>
319 <id>Get features</id>
320 <phase>generate-sources</phase>
325 <executable>/bin/bash</executable>
326 <environmentVariables>
327 <SDNC_CORE_VERSION>${sdnc.core.version}</SDNC_CORE_VERSION>
328 <SDNC_ADAPTORS_VERSION>${sdnc.adaptors.version}</SDNC_ADAPTORS_VERSION>
329 <SDNC_NORTHBOUND_VERSION>${sdnc.northbound.version}</SDNC_NORTHBOUND_VERSION>
330 <SDNC_PLUGINS_VERSION>${sdnc.plugins.version}</SDNC_PLUGINS_VERSION>
331 <SDNC_OAM_VERSION>${project.version}</SDNC_OAM_VERSION>
332 </environmentVariables>
334 <argument>${basedir}/src/main/scripts/installZips.sh</argument>
335 <argument>${basedir}/target/docker-stage/opt/openecomp/sdnc</argument>
341 <id>change shell permissions</id>
342 <phase>process-sources</phase>
347 <executable>/usr/bin/find</executable>
349 <argument>${basedir}/target/docker-stage/opt/openecomp/sdnc</argument>
350 <argument>-name</argument>
351 <argument>*.sh</argument>
352 <argument>-exec</argument>
353 <argument>chmod</argument>
354 <argument>+x</argument>
355 <argument>{}</argument>
356 <argument>;</argument>
368 <name>openECOMP</name>