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.onap.ccsdk.parent</groupId>
7 <artifactId>odlparent-lite</artifactId>
8 <version>1.1.0</version>
11 <modelVersion>4.0.0</modelVersion>
12 <packaging>pom</packaging>
13 <groupId>org.onap.sdnc.oam</groupId>
14 <artifactId>installation-admportal</artifactId>
15 <version>1.4.0-SNAPSHOT</version>
17 <name>sdnc-oam :: installation :: ${project.artifactId}</name>
18 <description>Creates admportal Docker container</description>
21 <image.name>onap/admportal-sdnc-image</image.name>
22 <sdnc.project.version>${project.version}</sdnc.project.version>
23 <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
31 <groupId>org.codehaus.groovy.maven</groupId>
32 <artifactId>gmaven-plugin</artifactId>
35 <phase>validate</phase>
41 println project.properties['sdnc.project.version'];
43 if ( project.properties['sdnc.project.version'] != null ) {
45 project.properties['sdnc.project.version'].split('\\.');
48 if (project.properties['sdnc.project.version'].endsWith("-SNAPSHOT")) {
49 project.properties['project.docker.latesttag.version']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest";
51 project.properties['project.docker.latesttag.version']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest";
54 println 'New Tag for docker:' +
55 project.properties['project.docker.latesttag.version'];
62 <groupId>io.fabric8</groupId>
63 <artifactId>docker-maven-plugin</artifactId>
64 <version>0.16.5</version>
65 <inherited>false</inherited>
70 <name>${image.name}</name>
72 <cleanup>try</cleanup>
73 <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
74 <dockerFile>${basedir}/target/docker-stage/Dockerfile</dockerFile>
76 <tag>${project.version}</tag>
77 <tag>${project.version}-STAGING-${maven.build.timestamp}</tag>
78 <tag>${project.docker.latesttag.version}</tag>
86 <id>generate-images</id>
87 <phase>generate-sources</phase>
105 <artifactId>maven-resources-plugin</artifactId>
106 <version>2.6</version>
109 <id>copy-dockerfile</id>
111 <goal>copy-resources</goal>
112 </goals><!-- here the phase you need -->
113 <phase>validate</phase>
115 <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
118 <directory>src/main/docker</directory>
120 <include>Dockerfile</include>
122 <filtering>true</filtering>
128 <id>copy-properties</id>
130 <goal>copy-resources</goal>
131 </goals><!-- here the phase you need -->
132 <phase>validate</phase>
134 <outputDirectory>${basedir}/target/docker-stage/opt/onap/sdnc/data/properties</outputDirectory>
137 <directory>../src/main/properties</directory>
139 <include>*.properties</include>
140 <include>*.properties.sdnctldb01</include>
142 <filtering>false</filtering>
150 <artifactId>exec-maven-plugin</artifactId>
151 <groupId>org.codehaus.mojo</groupId>
152 <version>1.5.0</version>
155 <id>Unzip admportal</id>
156 <phase>generate-sources</phase>
161 <executable>/usr/bin/unzip</executable>
163 <argument>-d</argument>
164 <argument>${basedir}/target/docker-stage/opt/onap/sdnc</argument>
165 <argument>../../admportal/target/*.zip</argument>
171 <id>Copy admportal config</id>
172 <phase>generate-sources</phase>
177 <executable>/bin/cp</executable>
179 <argument>../../admportal/config/admportal.json</argument>
180 <argument>${basedir}/target/docker-stage/opt/onap/sdnc/data/properties</argument>
186 <id>Copy admportal config1</id>
187 <phase>generate-sources</phase>
192 <executable>/bin/cp</executable>
194 <argument>../../admportal/config/admportal.log4js.json</argument>
195 <argument>${basedir}/target/docker-stage/opt/onap/sdnc/data/properties</argument>
202 <id>change shell permissions</id>
203 <phase>process-sources</phase>
208 <executable>/usr/bin/find</executable>
210 <argument>${basedir}/target/docker-stage/opt/onap/sdnc</argument>
211 <argument>-name</argument>
212 <argument>*.sh</argument>
213 <argument>-exec</argument>
214 <argument>chmod</argument>
215 <argument>+x</argument>
216 <argument>{}</argument>
217 <argument>;</argument>
229 <name>openECOMP</name>