Merge "link the term memoization"
[sdnc/oam.git] / installation / admportal / pom.xml
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">
4
5         <parent>
6                 <groupId>org.onap.ccsdk.parent</groupId>
7                 <artifactId>odlparent-lite</artifactId>
8                 <version>1.2.0-SNAPSHOT</version>
9         </parent>
10
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.5.0-SNAPSHOT</version>
16
17         <name>sdnc-oam :: installation :: ${project.artifactId}</name>
18         <description>Creates admportal Docker container</description>
19
20         <properties>
21                 <image.name>onap/admportal-sdnc-image</image.name>
22                 <sdnc.project.version>${project.version}</sdnc.project.version>
23                 <ccsdk.docker.version>0.4-STAGING-latest</ccsdk.docker.version>
24         <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
25         </properties>
26
27
28         <build>
29                 <plugins>
30
31                         <plugin>
32                                 <groupId>org.codehaus.groovy.maven</groupId>
33                                 <artifactId>gmaven-plugin</artifactId>
34                                 <executions>
35                                         <execution>
36                                                 <phase>validate</phase>
37                                                 <goals>
38                                                         <goal>execute</goal>
39                                                 </goals>
40                                                 <configuration>
41                                                         <source>
42                                                                 println project.properties['sdnc.project.version'];
43                                                                 def versionArray;
44                                                                 if ( project.properties['sdnc.project.version'] != null ) {
45                                                                         versionArray =
46                                                                         project.properties['sdnc.project.version'].split('\\.');
47                                                                 }
48
49                                                                 if (project.properties['sdnc.project.version'].endsWith("-SNAPSHOT")) {
50                                                                         project.properties['project.docker.latesttag.version']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest";
51                                                                 } else {
52                                                                         project.properties['project.docker.latesttag.version']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest";
53                                                                 }
54
55                                                                 println 'New Tag for docker:' +
56                                                                 project.properties['project.docker.latesttag.version'];
57                                                         </source>
58                                                 </configuration>
59                                         </execution>
60                                 </executions>
61                         </plugin>
62                         <plugin>
63                                 <groupId>io.fabric8</groupId>
64                                 <artifactId>docker-maven-plugin</artifactId>
65                                 <version>0.16.5</version>
66                                 <inherited>false</inherited>
67                                 <configuration>
68
69                                         <images>
70                                                 <image>
71                                                         <name>${image.name}</name>
72                                                         <build>
73                                                                 <cleanup>try</cleanup>
74                                                                 <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
75                                                                 <dockerFile>${basedir}/target/docker-stage/Dockerfile</dockerFile>
76                                                                 <tags>
77                                                                         <tag>${project.version}</tag>
78                                                                         <tag>${project.version}-STAGING-${maven.build.timestamp}</tag>
79                                                                         <tag>${project.docker.latesttag.version}</tag>
80                                                                 </tags>
81                                                         </build>
82                                                 </image>
83                                         </images>
84                                 </configuration>
85                                 <executions>
86                                         <execution>
87                                                 <id>generate-images</id>
88                                                 <phase>generate-sources</phase>
89                                                 <goals>
90                                                         <goal>build</goal>
91                                                 </goals>
92                                         </execution>
93
94                                         <execution>
95                                                 <id>push-images</id>
96                                                 <phase>deploy</phase>
97                                                 <goals>
98                                                         <goal>build</goal>
99                                                         <goal>push</goal>
100                                                 </goals>
101                                         </execution>
102                                 </executions>
103                         </plugin>
104
105                         <plugin>
106                                 <artifactId>maven-resources-plugin</artifactId>
107                                 <version>2.6</version>
108                                 <executions>
109                                         <execution>
110                                                 <id>copy-dockerfile</id>
111                                                 <goals>
112                                                         <goal>copy-resources</goal>
113                                                 </goals><!-- here the phase you need -->
114                                                 <phase>validate</phase>
115                                                 <configuration>
116                                                         <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
117                                                         <resources>
118                                                                 <resource>
119                                                                         <directory>src/main/docker</directory>
120                                                                         <includes>
121                                                                                 <include>Dockerfile</include>
122                                                                         </includes>
123                                                                         <filtering>true</filtering>
124                                                                 </resource>
125                                                         </resources>
126                                                 </configuration>
127                                         </execution>
128                                         <execution>
129                                                 <id>copy-properties</id>
130                                                 <goals>
131                                                         <goal>copy-resources</goal>
132                                                 </goals><!-- here the phase you need -->
133                                                 <phase>validate</phase>
134                                                 <configuration>
135                                                         <outputDirectory>${basedir}/target/docker-stage/opt/onap/sdnc/data/properties</outputDirectory>
136                                                         <resources>
137                                                                 <resource>
138                                                                         <directory>../src/main/properties</directory>
139                                                                         <includes>
140                                                                                 <include>*.properties</include>
141                                                                                 <include>*.properties.sdnctldb01</include>
142                                                                         </includes>
143                                                                         <filtering>false</filtering>
144                                                                 </resource>
145                                                         </resources>
146                                                 </configuration>
147                                         </execution>
148                                 </executions>
149                         </plugin>
150                         <plugin>
151                                 <artifactId>exec-maven-plugin</artifactId>
152                                 <groupId>org.codehaus.mojo</groupId>
153                                 <version>1.5.0</version>
154                                 <executions>
155                                         <execution>
156                                                 <id>Unzip admportal</id>
157                                                 <phase>generate-sources</phase>
158                                                 <goals>
159                                                         <goal>exec</goal>
160                                                 </goals>
161                                                 <configuration>
162                                                         <executable>/usr/bin/unzip</executable>
163                                                         <arguments>
164                                                                 <argument>-d</argument>
165                                                                 <argument>${basedir}/target/docker-stage/opt/onap/sdnc</argument>
166                                                                 <argument>../../admportal/target/*.zip</argument>
167                                                         </arguments>
168                                                 </configuration>
169                                         </execution>
170
171                                         <execution>
172                                                 <id>Copy admportal config</id>
173                                                 <phase>generate-sources</phase>
174                                                 <goals>
175                                                         <goal>exec</goal>
176                                                 </goals>
177                                                 <configuration>
178                                                         <executable>/bin/cp</executable>
179                                                         <arguments>
180                                                                 <argument>../../admportal/config/admportal.json</argument>
181                                                                 <argument>${basedir}/target/docker-stage/opt/onap/sdnc/data/properties</argument>
182                                                         </arguments>
183                                                 </configuration>
184                                         </execution>
185
186                                         <execution>
187                                                 <id>Copy admportal config1</id>
188                                                 <phase>generate-sources</phase>
189                                                 <goals>
190                                                         <goal>exec</goal>
191                                                 </goals>
192                                                 <configuration>
193                                                         <executable>/bin/cp</executable>
194                                                         <arguments>
195                                                                 <argument>../../admportal/config/admportal.log4js.json</argument>
196                                                                 <argument>${basedir}/target/docker-stage/opt/onap/sdnc/data/properties</argument>
197                                                         </arguments>
198                                                 </configuration>
199                                         </execution>
200
201
202                                         <execution>
203                                                 <id>change shell permissions</id>
204                                                 <phase>process-sources</phase>
205                                                 <goals>
206                                                         <goal>exec</goal>
207                                                 </goals>
208                                                 <configuration>
209                                                         <executable>/usr/bin/find</executable>
210                                                         <arguments>
211                                                                 <argument>${basedir}/target/docker-stage/opt/onap/sdnc</argument>
212                                                                 <argument>-name</argument>
213                                                                 <argument>*.sh</argument>
214                                                                 <argument>-exec</argument>
215                                                                 <argument>chmod</argument>
216                                                                 <argument>+x</argument>
217                                                                 <argument>{}</argument>
218                                                                 <argument>;</argument>
219                                                         </arguments>
220                                                 </configuration>
221                                         </execution>
222                                 </executions>
223                         </plugin>
224
225
226                 </plugins>
227
228         </build>
229         <organization>
230                 <name>openECOMP</name>
231         </organization>
232 </project>