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.0-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.0-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('\\.');
53 project.properties['sdnc.project.version'].endsWith("-SNAPSHOT")
56 project.properties['project.docker.latesttag.version']=versionArray[0]
57 + '.' + versionArray[1] + "-SNAPSHOT-latest";
59 project.properties['project.docker.latesttag.version']=versionArray[0]
60 + '.' + versionArray[1] + "-STAGING-latest";
63 println 'New Tag for docker:' +
64 project.properties['project.docker.latesttag.version'];
71 <groupId>io.fabric8</groupId>
72 <artifactId>docker-maven-plugin</artifactId>
73 <version>0.16.5</version>
74 <inherited>false</inherited>
79 <name>${image.name}</name>
81 <cleanup>try</cleanup>
82 <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
83 <dockerFile>${basedir}/target/docker-stage/Dockerfile</dockerFile>
85 <tag>${project.version}-STAGING-${maven.build.timestamp}</tag>
86 <tag>${project.docker.latesttag.version}</tag>
94 <id>generate-images</id>
95 <phase>package</phase>
103 <phase>deploy</phase>
114 <groupId>org.apache.maven.plugins</groupId>
115 <artifactId>maven-dependency-plugin</artifactId>
116 <version>3.0.0</version>
119 <id>get-odl-distribution</id>
120 <phase>validate</phase>
127 <groupId>org.opendaylight.integration</groupId>
128 <artifactId>distribution-karaf</artifactId>
129 <version>0.5.1-Boron-SR1</version>
132 <overWrite>true</overWrite>
133 <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
136 <overWriteReleases>false</overWriteReleases>
137 <overWriteSnapshots>true</overWriteSnapshots>
138 <overWriteIfNewer>true</overWriteIfNewer>
145 <artifactId>maven-resources-plugin</artifactId>
146 <version>2.6</version>
149 <id>copy-dockerfile</id>
151 <goal>copy-resources</goal>
152 </goals><!-- here the phase you need -->
153 <phase>validate</phase>
155 <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
158 <directory>src/main/docker</directory>
160 <include>Dockerfile</include>
162 <filtering>true</filtering>
169 <id>copy-scripts</id>
171 <goal>copy-resources</goal>
172 </goals><!-- here the phase you need -->
173 <phase>validate</phase>
175 <outputDirectory>${basedir}/target/docker-stage/opt/openecomp/sdnc/bin</outputDirectory>
178 <directory>src/main/scripts</directory>
180 <include>*.sh</include>
182 <filtering>false</filtering>
189 <id>copy-tarballs</id>
191 <goal>copy-resources</goal>
192 </goals><!-- here the phase you need -->
193 <phase>validate</phase>
195 <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
198 <directory>src/main/resources</directory>
200 <include>*.tgz</include>
201 <include>idmlight.db.mv.db</include>
203 <filtering>false</filtering>
211 <goal>copy-resources</goal>
212 </goals><!-- here the phase you need -->
213 <phase>validate</phase>
215 <outputDirectory>${basedir}/target/docker-stage/opt/openecomp/sdnc/data</outputDirectory>
218 <directory>src/main/resources</directory>
220 <include>*.dump</include>
222 <filtering>false</filtering>
228 <id>copy-properties</id>
230 <goal>copy-resources</goal>
231 </goals><!-- here the phase you need -->
232 <phase>validate</phase>
234 <outputDirectory>${basedir}/target/docker-stage/opt/openecomp/sdnc/data/properties</outputDirectory>
237 <directory>../src/main/properties</directory>
239 <include>*.properties</include>
241 <filtering>false</filtering>
247 <id>copy-keystores</id>
249 <goal>copy-resources</goal>
250 </goals><!-- here the phase you need -->
251 <phase>validate</phase>
253 <outputDirectory>${basedir}/target/docker-stage/opt/openecomp/sdnc/data/stores</outputDirectory>
256 <directory>../src/main/stores</directory>
258 <include>*.jks</include>
260 <filtering>false</filtering>
268 <artifactId>exec-maven-plugin</artifactId>
269 <groupId>org.codehaus.mojo</groupId>
270 <version>1.5.0</version>
274 <id>Get features</id>
275 <phase>generate-sources</phase>
280 <executable>/bin/bash</executable>
281 <environmentVariables>
282 <SDNC_CORE_VERSION>${sdnc.core.version}</SDNC_CORE_VERSION>
283 <SDNC_ADAPTORS_VERSION>${sdnc.adaptors.version}</SDNC_ADAPTORS_VERSION>
284 <SDNC_NORTHBOUND_VERSION>${sdnc.northbound.version}</SDNC_NORTHBOUND_VERSION>
285 <SDNC_PLUGINS_VERSION>${sdnc.plugins.version}</SDNC_PLUGINS_VERSION>
286 <SDNC_OAM_VERSION>${project.version}</SDNC_OAM_VERSION>
287 </environmentVariables>
289 <argument>${basedir}/src/main/scripts/installZips.sh</argument>
290 <argument>${basedir}/target/docker-stage/opt/openecomp/sdnc</argument>
296 <id>change shell permissions</id>
297 <phase>process-sources</phase>
302 <executable>/usr/bin/find</executable>
304 <argument>${basedir}/target/docker-stage/opt/openecomp/sdnc</argument>
305 <argument>-name</argument>
306 <argument>*.sh</argument>
307 <argument>-exec</argument>
308 <argument>chmod</argument>
309 <argument>+x</argument>
310 <argument>{}</argument>
311 <argument>;</argument>
323 <name>openECOMP</name>