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-admportal</artifactId>
15 <version>1.1.0-SNAPSHOT</version>
17 <name>Installation - admportal</name>
18 <description>Creates admportal Docker container</description>
21 <image.name>openecomp/admportal-sdnc-image</image.name>
22 <sdnc.project.version>${project.version}</sdnc.project.version>
30 <groupId>org.codehaus.groovy.maven</groupId>
31 <artifactId>gmaven-plugin</artifactId>
34 <phase>validate</phase>
40 println project.properties['sdnc.project.version'];
42 if ( project.properties['sdnc.project.version'] != null ) {
44 project.properties['sdnc.project.version'].split('\\.');
48 project.properties['sdnc.project.version'].endsWith("-SNAPSHOT")
51 project.properties['project.docker.latesttag.version']=versionArray[0]
52 + '.' + versionArray[1] + "-SNAPSHOT-latest";
54 project.properties['project.docker.latesttag.version']=versionArray[0]
55 + '.' + 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}-STAGING-${maven.build.timestamp}</tag>
81 <tag>${project.docker.latesttag.version}</tag>
89 <id>generate-images</id>
90 <phase>generate-sources</phase>
108 <artifactId>maven-resources-plugin</artifactId>
109 <version>2.6</version>
112 <id>copy-dockerfile</id>
114 <goal>copy-resources</goal>
115 </goals><!-- here the phase you need -->
116 <phase>validate</phase>
118 <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
121 <directory>src/main/docker</directory>
123 <include>Dockerfile</include>
125 <filtering>true</filtering>
131 <id>copy-properties</id>
133 <goal>copy-resources</goal>
134 </goals><!-- here the phase you need -->
135 <phase>validate</phase>
137 <outputDirectory>${basedir}/target/docker-stage/opt/openecomp/sdnc/data/properties</outputDirectory>
140 <directory>../src/main/properties</directory>
142 <include>*.properties</include>
143 <include>*.properties.sdnctldb01</include>
145 <filtering>false</filtering>
153 <artifactId>exec-maven-plugin</artifactId>
154 <groupId>org.codehaus.mojo</groupId>
155 <version>1.5.0</version>
158 <id>Unzip admportal</id>
159 <phase>generate-sources</phase>
164 <executable>/usr/bin/unzip</executable>
166 <argument>-d</argument>
167 <argument>${basedir}/target/docker-stage/opt/openecomp/sdnc</argument>
168 <argument>../../admportal/target/*.zip</argument>
174 <id>Copy admportal config</id>
175 <phase>generate-sources</phase>
180 <executable>/bin/cp</executable>
182 <argument>../../admportal/config/admportal.json</argument>
183 <argument>${basedir}/target/docker-stage/opt/openecomp/sdnc/data/properties</argument>
189 <id>Copy admportal config1</id>
190 <phase>generate-sources</phase>
195 <executable>/bin/cp</executable>
197 <argument>../../admportal/config/admportal.log4js.json</argument>
198 <argument>${basedir}/target/docker-stage/opt/openecomp/sdnc/data/properties</argument>
205 <id>change shell permissions</id>
206 <phase>process-sources</phase>
211 <executable>/usr/bin/find</executable>
213 <argument>${basedir}/target/docker-stage/opt/openecomp/sdnc</argument>
214 <argument>-name</argument>
215 <argument>*.sh</argument>
216 <argument>-exec</argument>
217 <argument>chmod</argument>
218 <argument>+x</argument>
219 <argument>{}</argument>
220 <argument>;</argument>
232 <name>openECOMP</name>