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