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-admportal</artifactId>
15 <version>1.1.1-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('\\.');
47 if (project.properties['sdnc.project.version'].endsWith("-SNAPSHOT")) {
48 project.properties['project.docker.latesttag.version']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest";
50 project.properties['project.docker.latesttag.version']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest";
53 println 'New Tag for docker:' +
54 project.properties['project.docker.latesttag.version'];
61 <groupId>io.fabric8</groupId>
62 <artifactId>docker-maven-plugin</artifactId>
63 <version>0.16.5</version>
64 <inherited>false</inherited>
69 <name>${image.name}</name>
71 <cleanup>try</cleanup>
72 <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
73 <dockerFile>${basedir}/target/docker-stage/Dockerfile</dockerFile>
75 <tag>${project.version}</tag>
76 <tag>${project.version}-STAGING-${maven.build.timestamp}</tag>
77 <tag>${project.docker.latesttag.version}</tag>
85 <id>generate-images</id>
86 <phase>generate-sources</phase>
104 <artifactId>maven-resources-plugin</artifactId>
105 <version>2.6</version>
108 <id>copy-dockerfile</id>
110 <goal>copy-resources</goal>
111 </goals><!-- here the phase you need -->
112 <phase>validate</phase>
114 <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
117 <directory>src/main/docker</directory>
119 <include>Dockerfile</include>
121 <filtering>true</filtering>
127 <id>copy-properties</id>
129 <goal>copy-resources</goal>
130 </goals><!-- here the phase you need -->
131 <phase>validate</phase>
133 <outputDirectory>${basedir}/target/docker-stage/opt/openecomp/sdnc/data/properties</outputDirectory>
136 <directory>../src/main/properties</directory>
138 <include>*.properties</include>
139 <include>*.properties.sdnctldb01</include>
141 <filtering>false</filtering>
149 <artifactId>exec-maven-plugin</artifactId>
150 <groupId>org.codehaus.mojo</groupId>
151 <version>1.5.0</version>
154 <id>Unzip admportal</id>
155 <phase>generate-sources</phase>
160 <executable>/usr/bin/unzip</executable>
162 <argument>-d</argument>
163 <argument>${basedir}/target/docker-stage/opt/openecomp/sdnc</argument>
164 <argument>../../admportal/target/*.zip</argument>
170 <id>Copy admportal config</id>
171 <phase>generate-sources</phase>
176 <executable>/bin/cp</executable>
178 <argument>../../admportal/config/admportal.json</argument>
179 <argument>${basedir}/target/docker-stage/opt/openecomp/sdnc/data/properties</argument>
185 <id>Copy admportal config1</id>
186 <phase>generate-sources</phase>
191 <executable>/bin/cp</executable>
193 <argument>../../admportal/config/admportal.log4js.json</argument>
194 <argument>${basedir}/target/docker-stage/opt/openecomp/sdnc/data/properties</argument>
201 <id>change shell permissions</id>
202 <phase>process-sources</phase>
207 <executable>/usr/bin/find</executable>
209 <argument>${basedir}/target/docker-stage/opt/openecomp/sdnc</argument>
210 <argument>-name</argument>
211 <argument>*.sh</argument>
212 <argument>-exec</argument>
213 <argument>chmod</argument>
214 <argument>+x</argument>
215 <argument>{}</argument>
216 <argument>;</argument>
228 <name>openECOMP</name>