Updating master to 1.1.0-SNAPSHOT
[appc/deployment.git] / installation / appc / 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.openecomp.appc.deployment</groupId>
7                 <artifactId>installation</artifactId>
8                 <version>1.1.0-SNAPSHOT</version>
9         </parent>
10
11         <modelVersion>4.0.0</modelVersion>
12         <packaging>pom</packaging>
13         <groupId>org.openecomp.appc.deployment</groupId>
14         <artifactId>installation-appc</artifactId>
15         <version>1.1.0-SNAPSHOT</version>
16
17         <name>Installation - APPC Docker</name>
18         <description>Creates APPC Docker container on top of the SDNC Base Docker Image</description>
19
20         <properties>
21                 <image.name>openecomp/appc-image</image.name>
22                 <appc.version>${project.version}</appc.version>
23                 <!--This version will be over-ridden by jenkins 
24                     injecting the version.properties variable file during docker build-->
25                 <appc.docker.staging.version>1.0.0</appc.docker.staging.version>
26                 <maven.build.timestamp.format>yyyyMMdd'T'HHmmss</maven.build.timestamp.format>
27         </properties>
28
29
30         <build>
31                 <plugins>
32                         
33                         <!-- This is to add any extra scripts, sql dump files, properties files APPC may need even after inheriting from the sdnc base image -->
34                         <plugin>
35                                 <artifactId>maven-resources-plugin</artifactId>
36                                 <version>2.6</version>
37                                 <executions>
38                                         <execution>
39                                                 <id>copy-dockerfile</id>
40                                                 <goals>
41                                                         <goal>copy-resources</goal>
42                                                 </goals><!-- here the phase you need -->
43                                                 <phase>validate</phase>
44                                                 <configuration>
45                                                         <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
46                                                         <resources>
47                                                                 <resource>
48                                                                         <directory>src/main/docker</directory>
49                                                                         <includes>
50                                                                                 <include>Dockerfile</include>
51                                                                         </includes>
52                                                                         <filtering>true</filtering>
53                                                                 </resource>
54                                                         </resources>
55                                                 </configuration>
56                                         </execution>
57
58                                         <execution>
59                                                 <id>copy-scripts</id>
60                                                 <goals>
61                                                         <goal>copy-resources</goal>
62                                                 </goals><!-- here the phase you need -->
63                                                 <phase>validate</phase>
64                                                 <configuration>
65                                                         <outputDirectory>${basedir}/target/docker-stage/opt/openecomp/appc/bin</outputDirectory>
66                                                         <resources>
67                                                                 <resource>
68                                                                         <directory>src/main/scripts</directory>
69                                                                         <includes>
70                                                                                 <include>*.sh</include>
71                                                                         </includes>
72                                                                         <filtering>false</filtering>
73                                                                 </resource>
74                                                         </resources>
75                                                 </configuration>
76                                         </execution>
77                                         
78                                         <!-- Two commented execution tags below in case / when appc needs to add .dump mysql files or keystore files -->
79                                         <!--<execution>
80                                                 <id>copy-data</id>
81                                                 <goals>
82                                                         <goal>copy-resources</goal>
83                                                 </goals>
84                                                 <phase>validate</phase>
85                                                 <configuration>
86                                                         <outputDirectory>${basedir}/target/docker-stage/opt/openecomp/sdnc/data</outputDirectory>
87                                                         <resources>
88                                                                 <resource>
89                                                                         <directory>src/main/resources</directory>
90                                                                         <includes>
91                                                                                 <include>*.dump</include>
92                                                                         </includes>
93                                                                         <filtering>false</filtering>
94                                                                 </resource>
95                                                         </resources>
96                                                 </configuration>
97                                         </execution>
98                                         <execution>
99                                                 <id>copy-keystores</id>
100                                                 <goals>
101                                                         <goal>copy-resources</goal>
102                                                 </goals>
103                                                 <phase>validate</phase>
104                                                 <configuration>
105                                                         <outputDirectory>${basedir}/target/docker-stage/opt/openecomp/sdnc/data/stores</outputDirectory>
106                                                         <resources>
107                                                                 <resource>
108                                                                         <directory>../src/main/stores</directory>
109                                                                         <includes>
110                                                                                 <include>*.jks</include>
111                                                                         </includes>
112                                                                         <filtering>false</filtering>
113                                                                 </resource>
114                                                         </resources>
115                                                 </configuration>
116                                         </execution>-->
117                                         
118                                         <execution>
119                                                 <id>copy-properties</id>
120                                                 <goals>
121                                                         <goal>copy-resources</goal>
122                                                 </goals>
123                                                 <phase>validate</phase>
124                                                 <configuration>
125                                                         <outputDirectory>${basedir}/target/docker-stage/opt/openecomp/appc/data/properties</outputDirectory>
126                                                         <resources>
127                                                                 <resource>
128                                                                         <directory>../src/main/appc-properties</directory>
129                                                                         <includes>
130                                                                                 <include>*.properties</include>
131                                                                         </includes>
132                                                                         <filtering>false</filtering>
133                                                                 </resource>
134                                                         </resources>
135                                                 </configuration>
136                                         </execution>
137                                 </executions>
138                         </plugin>
139                         <plugin>
140                                 <artifactId>exec-maven-plugin</artifactId>
141                                 <groupId>org.codehaus.mojo</groupId>
142                                 <version>1.5.0</version>
143                                 <executions>
144                                         <execution>
145                                                 <id>Get features</id>
146                                                 <phase>generate-sources</phase>
147                                                 <goals>
148                                                         <goal>exec</goal>
149                                                 </goals>
150                                                 <configuration>
151                                                         <executable>/bin/bash</executable>
152                                                         <environmentVariables>
153                                                                 <APPC_VERSION>${appc.version}</APPC_VERSION>
154                                                                 <APPC_OAM_VERSION>${project.version}</APPC_OAM_VERSION>
155                                                                 <SDNC_OAM_VERSION>${project.version}</SDNC_OAM_VERSION>
156                                                         </environmentVariables>
157                                                         <arguments>
158                                                                 <argument>${basedir}/src/main/scripts/installZips.sh</argument>
159                                                                 <argument>${basedir}/target/docker-stage/opt/openecomp/appc</argument>
160                                                         </arguments>
161                                                 </configuration>
162                                         </execution>
163
164                                         <execution>
165                                                 <id>change shell permissions</id>
166                                                 <phase>process-sources</phase>
167                                                 <goals>
168                                                         <goal>exec</goal>
169                                                 </goals>
170                                                 <configuration>
171                                                         <executable>/usr/bin/find</executable>
172                                                         <arguments>
173                                                                 <argument>${basedir}/target/docker-stage/opt/openecomp/appc</argument>
174                                                                 <argument>-name</argument>
175                                                                 <argument>*.sh</argument>
176                                                                 <argument>-exec</argument>
177                                                                 <argument>chmod</argument>
178                                                                 <argument>+x</argument>
179                                                                 <argument>{}</argument>
180                                                                 <argument>;</argument>
181                                                         </arguments>
182                                                 </configuration>
183                                         </execution>
184                                 </executions>
185                         </plugin>
186                 </plugins>
187         </build>
188
189         <profiles>
190                 <profile>
191                         <id>docker</id>
192                         <build>
193                                 <plugins>
194                                         <plugin>
195                                                 <groupId>io.fabric8</groupId>
196                                                 <artifactId>docker-maven-plugin</artifactId>
197                                                 <version>0.16.5</version>
198                                                 <inherited>false</inherited>
199                                                 <configuration>
200                                                         <images>
201                                                                 <image>
202                                                                         <name>${image.name}</name>
203                                                                         <build>
204                                                                                 <cleanup>try</cleanup>
205                                                                                 <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
206                                                                                 <dockerFile>${basedir}/target/docker-stage/Dockerfile</dockerFile>
207                                                                                 <tags>
208                                                                                         <tag>${appc.docker.staging.version}-STAGING-${maven.build.timestamp}</tag>
209                                                                                         <tag>latest</tag> 
210                                                                                 </tags>
211                                                                         </build>
212                                                                 </image>
213                                                         </images>
214                                                 </configuration>
215                                                 <executions>
216                                                         <execution>
217                                                                 <id>generate-images</id>
218                                                                 <phase>generate-sources</phase>
219                                                                 <goals>
220                                                                         <goal>build</goal>
221                                                                 </goals>
222                                                         </execution>
223
224                                                         <execution>
225                                                                 <id>push-images</id>
226                                                                 <phase>deploy</phase>
227                                                                 <goals>
228                                                                         <goal>build</goal>
229                                                                         <goal>push</goal>
230                                                                 </goals>
231                                                         </execution>
232                                                 </executions>
233                                         </plugin>
234
235                                         <!-- This is to add any extra scripts, sql dump files, properties files 
236                                                 APPC may need even after inheriting from the sdnc base image -->
237                                         <plugin>
238                                                 <artifactId>maven-resources-plugin</artifactId>
239                                                 <version>2.6</version>
240                                                 <executions>
241                                                         <execution>
242                                                                 <id>copy-dockerfile</id>
243                                                                 <goals>
244                                                                         <goal>copy-resources</goal>
245                                                                 </goals><!-- here the phase you need -->
246                                                                 <phase>validate</phase>
247                                                                 <configuration>
248                                                                         <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
249                                                                         <resources>
250                                                                                 <resource>
251                                                                                         <directory>src/main/docker</directory>
252                                                                                         <includes>
253                                                                                                 <include>Dockerfile</include>
254                                                                                         </includes>
255                                                                                         <filtering>true</filtering>
256                                                                                 </resource>
257                                                                         </resources>
258                                                                 </configuration>
259                                                         </execution>
260
261                                                         <execution>
262                                                                 <id>copy-scripts</id>
263                                                                 <goals>
264                                                                         <goal>copy-resources</goal>
265                                                                 </goals><!-- here the phase you need -->
266                                                                 <phase>validate</phase>
267                                                                 <configuration>
268                                                                         <outputDirectory>${basedir}/target/docker-stage/opt/openecomp/appc/bin</outputDirectory>
269                                                                         <resources>
270                                                                                 <resource>
271                                                                                         <directory>src/main/scripts</directory>
272                                                                                         <includes>
273                                                                                                 <include>*.sh</include>
274                                                                                         </includes>
275                                                                                         <filtering>false</filtering>
276                                                                                 </resource>
277                                                                         </resources>
278                                                                 </configuration>
279                                                         </execution>
280
281                                                         <!-- Two commented execution tags below in case / when appc needs 
282                                                                 to add .dump mysql files or keystore files -->
283                                                         <!--<execution> <id>copy-data</id> <goals> <goal>copy-resources</goal> 
284                                                                 </goals> <phase>validate</phase> <configuration> <outputDirectory>${basedir}/target/docker-stage/opt/openecomp/sdnc/data</outputDirectory> 
285                                                                 <resources> <resource> <directory>src/main/resources</directory> <includes> 
286                                                                 <include>*.dump</include> </includes> <filtering>false</filtering> </resource> 
287                                                                 </resources> </configuration> </execution> <execution> <id>copy-keystores</id> 
288                                                                 <goals> <goal>copy-resources</goal> </goals> <phase>validate</phase> <configuration> 
289                                                                 <outputDirectory>${basedir}/target/docker-stage/opt/openecomp/sdnc/data/stores</outputDirectory> 
290                                                                 <resources> <resource> <directory>../src/main/stores</directory> <includes> 
291                                                                 <include>*.jks</include> </includes> <filtering>false</filtering> </resource> 
292                                                                 </resources> </configuration> </execution> -->
293
294                                                         <execution>
295                                                                 <id>copy-properties</id>
296                                                                 <goals>
297                                                                         <goal>copy-resources</goal>
298                                                                 </goals>
299                                                                 <phase>validate</phase>
300                                                                 <configuration>
301                                                                         <outputDirectory>${basedir}/target/docker-stage/opt/openecomp/appc/data/properties</outputDirectory>
302                                                                         <resources>
303                                                                                 <resource>
304                                                                                         <directory>../src/main/appc-properties</directory>
305                                                                                         <includes>
306                                                                                                 <include>*.properties</include>
307                                                                                         </includes>
308                                                                                         <filtering>false</filtering>
309                                                                                 </resource>
310                                                                         </resources>
311                                                                 </configuration>
312                                                         </execution>
313                                                 </executions>
314                                         </plugin>
315                                         <plugin>
316                                                 <artifactId>exec-maven-plugin</artifactId>
317                                                 <groupId>org.codehaus.mojo</groupId>
318                                                 <version>1.5.0</version>
319                                                 <executions>
320                                                         <execution>
321                                                                 <id>Get features</id>
322                                                                 <phase>generate-sources</phase>
323                                                                 <goals>
324                                                                         <goal>exec</goal>
325                                                                 </goals>
326                                                                 <configuration>
327                                                                         <executable>/bin/bash</executable>
328                                                                         <environmentVariables>
329                                                                                 <APPC_VERSION>${appc.version}</APPC_VERSION>
330                                                                                 <APPC_OAM_VERSION>${project.version}</APPC_OAM_VERSION>
331                                                                                 <SDNC_OAM_VERSION>${project.version}</SDNC_OAM_VERSION>
332                                                                         </environmentVariables>
333                                                                         <arguments>
334                                                                                 <argument>${basedir}/src/main/scripts/installZips.sh</argument>
335                                                                                 <argument>${basedir}/target/docker-stage/opt/openecomp/appc</argument>
336                                                                         </arguments>
337                                                                 </configuration>
338                                                         </execution>
339
340                                                         <execution>
341                                                                 <id>change shell permissions</id>
342                                                                 <phase>process-sources</phase>
343                                                                 <goals>
344                                                                         <goal>exec</goal>
345                                                                 </goals>
346                                                                 <configuration>
347                                                                         <executable>/usr/bin/find</executable>
348                                                                         <arguments>
349                                                                                 <argument>${basedir}/target/docker-stage/opt/openecomp/appc</argument>
350                                                                                 <argument>-name</argument>
351                                                                                 <argument>*.sh</argument>
352                                                                                 <argument>-exec</argument>
353                                                                                 <argument>chmod</argument>
354                                                                                 <argument>+x</argument>
355                                                                                 <argument>{}</argument>
356                                                                                 <argument>;</argument>
357                                                                         </arguments>
358                                                                 </configuration>
359                                                         </execution>
360                                                 </executions>
361                                         </plugin>
362                                 </plugins>
363                         </build>
364
365                 </profile>
366         </profiles>
367         
368         <organization>
369                 <name>openECOMP</name>
370         </organization>
371         
372 </project>