Adding required DB table for LCM functionality
[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                                         <execution>
79                                                 <id>copy-data</id>
80                                                 <goals>
81                                                         <goal>copy-resources</goal>
82                                                 </goals>
83                                                 <phase>validate</phase>
84                                                 <configuration>
85                                                         <outputDirectory>${basedir}/target/docker-stage/opt/openecomp/appc/data</outputDirectory>
86                                                         <resources>
87                                                                 <resource>
88                                                                         <directory>src/main/resources</directory>
89                                                                         <includes>
90                                                                                 <include>*.dump</include>
91                                                                         </includes>
92                                                                         <filtering>false</filtering>
93                                                                 </resource>
94                                                         </resources>
95                                                 </configuration>
96                                         </execution>
97                                         
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/appc/data/stores</outputDirectory>
106                                                         <resources>
107                                                                 <resource>
108                                                                         <directory>../src/main/stores</directory>
109                                                                         <includes>
110                                                                                 <include>*.jks</include>
111                                                                                 <include>*.p12</include>
112                                                                         </includes>
113                                                                         <filtering>false</filtering>
114                                                                 </resource>
115                                                         </resources>
116                                                 </configuration>
117                                         </execution>
118                                         
119                                         <execution>
120                                                 <id>copy-properties</id>
121                                                 <goals>
122                                                         <goal>copy-resources</goal>
123                                                 </goals>
124                                                 <phase>validate</phase>
125                                                 <configuration>
126                                                         <outputDirectory>${basedir}/target/docker-stage/opt/openecomp/appc/data/properties</outputDirectory>
127                                                         <resources>
128                                                                 <resource>
129                                                                         <directory>../src/main/properties</directory>
130                                                                         <includes>
131                                                                                 <include>*.properties</include>
132                                                                         </includes>
133                                                                         <filtering>false</filtering>
134                                                                 </resource>
135                                                         </resources>
136                                                 </configuration>
137                                         </execution>
138                                 </executions>
139                         </plugin>
140                         <plugin>
141                                 <artifactId>exec-maven-plugin</artifactId>
142                                 <groupId>org.codehaus.mojo</groupId>
143                                 <version>1.5.0</version>
144                                 <executions>
145                                         <execution>
146                                                 <id>Get features</id>
147                                                 <phase>generate-sources</phase>
148                                                 <goals>
149                                                         <goal>exec</goal>
150                                                 </goals>
151                                                 <configuration>
152                                                         <executable>bash</executable>
153                                                         <environmentVariables>
154                                                                 <APPC_VERSION>${appc.version}</APPC_VERSION>
155                                                                 <APPC_OAM_VERSION>${project.version}</APPC_OAM_VERSION>
156                                                                 <SDNC_OAM_VERSION>${project.version}</SDNC_OAM_VERSION>
157                                                         </environmentVariables>
158                                                         <arguments>
159                                                                 <argument>${basedir}/src/main/scripts/installZips.sh</argument>
160                                                                 <argument>${basedir}/target/docker-stage/opt/openecomp/appc</argument>
161                                                         </arguments>
162                                                 </configuration>
163                                         </execution>
164
165                                         <execution>
166                                                 <id>change shell permissions</id>
167                                                 <phase>process-sources</phase>
168                                                 <goals>
169                                                         <goal>exec</goal>
170                                                 </goals>
171                                                 <configuration>
172                                                         <executable>find</executable>
173                                                         <arguments>
174                                                                 <argument>${basedir}/target/docker-stage/opt/openecomp/appc</argument>
175                                                                 <argument>-name</argument>
176                                                                 <argument>*.sh</argument>
177                                                                 <argument>-exec</argument>
178                                                                 <argument>chmod</argument>
179                                                                 <argument>+x</argument>
180                                                                 <argument>{}</argument>
181                                                                 <argument>;</argument>
182                                                         </arguments>
183                                                 </configuration>
184                                         </execution>
185                                 </executions>
186                         </plugin>
187                 </plugins>
188         </build>
189
190         <profiles>
191                 <profile>
192                         <id>docker</id>
193                         <build>
194                                 <plugins>
195                                         <plugin>
196                                                 <groupId>org.codehaus.groovy.maven</groupId>
197                                                 <artifactId>gmaven-plugin</artifactId>
198                                                 <executions>
199                                                         <execution>
200                                                                 <phase>validate</phase>
201                                                                 <goals>
202                                                                         <goal>execute</goal>
203                                                                 </goals>
204                                                                 <configuration>
205                                                                         <properties>
206                                                                                 <ver>${project.version}</ver>
207                                                                                 <timestamp>${maven.build.timestamp}</timestamp>
208                                                                         </properties>
209                                                                         <source>
210                                                                                 println project.properties['ver'];
211                                                                                 def versionArray;
212                                                                                 if ( project.properties['ver'] != null ) {
213                                                                                 versionArray = project.properties['ver'].split('\\.');
214                                                                                 }
215                                                                                 if ( project.properties['ver'].endsWith("-SNAPSHOT") ) {
216                                                                                 project.properties['dockertag1']=project.properties['ver'] + "-latest";
217                                                                                 project.properties['dockertag2']="latest";
218                                                                                 } else {
219                                                                                 project.properties['dockertag1']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest";
220                                                                                 project.properties['dockertag2']=project.properties['ver'] + "-STAGING-" + project.properties['timestamp'];
221                                                                                 }
222                                                                                 println 'docker tag 1: ' + project.properties['dockertag1'];
223                                                                                 println 'docker tag 2: ' + project.properties['dockertag2'];
224                                                                         </source>
225                                                                 </configuration>
226                                                         </execution>
227                                                 </executions>
228                                         </plugin>
229                                         <plugin>
230                                                 <groupId>io.fabric8</groupId>
231                                                 <artifactId>docker-maven-plugin</artifactId>
232                                                 <version>0.16.5</version>
233                                                 <inherited>false</inherited>
234                                                 <configuration>
235                                                         <images>
236                                                                 <image>
237                                                                         <name>${image.name}</name>
238                                                                         <build>
239                                                                                 <cleanup>try</cleanup>
240                                                                                 <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
241                                                                                 <dockerFile>${basedir}/target/docker-stage/Dockerfile</dockerFile>
242                                                                                 <tags>
243                                                                                         <tag>${dockertag1}</tag>
244                                                                                         <tag>${dockertag2}</tag>
245                                                                                 </tags>
246                                                                         </build>
247                                                                 </image>
248                                                         </images>
249                                                 </configuration>
250                                                 <executions>
251                                                         <execution>
252                                                                 <id>generate-images</id>
253                                                                 <phase>package</phase>
254                                                                 <goals>
255                                                                         <goal>build</goal>
256                                                                 </goals>
257                                                         </execution>
258
259                                                         <execution>
260                                                                 <id>push-images</id>
261                                                                 <phase>deploy</phase>
262                                                                 <goals>
263                                                                         <goal>build</goal>
264                                                                         <goal>push</goal>
265                                                                 </goals>
266                                                         </execution>
267                                                 </executions>
268                                         </plugin>
269
270                                         <!-- This is to add any extra scripts, sql dump files, properties files 
271                                                 APPC may need even after inheriting from the sdnc base image -->
272                                         <plugin>
273                                                 <artifactId>maven-resources-plugin</artifactId>
274                                                 <version>2.6</version>
275                                                 <executions>
276                                                         <execution>
277                                                                 <id>copy-dockerfile</id>
278                                                                 <goals>
279                                                                         <goal>copy-resources</goal>
280                                                                 </goals><!-- here the phase you need -->
281                                                                 <phase>validate</phase>
282                                                                 <configuration>
283                                                                         <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
284                                                                         <resources>
285                                                                                 <resource>
286                                                                                         <directory>src/main/docker</directory>
287                                                                                         <includes>
288                                                                                                 <include>Dockerfile</include>
289                                                                                         </includes>
290                                                                                         <filtering>true</filtering>
291                                                                                 </resource>
292                                                                         </resources>
293                                                                 </configuration>
294                                                         </execution>
295
296                                                         <execution>
297                                                                 <id>copy-scripts</id>
298                                                                 <goals>
299                                                                         <goal>copy-resources</goal>
300                                                                 </goals><!-- here the phase you need -->
301                                                                 <phase>validate</phase>
302                                                                 <configuration>
303                                                                         <outputDirectory>${basedir}/target/docker-stage/opt/openecomp/appc/bin</outputDirectory>
304                                                                         <resources>
305                                                                                 <resource>
306                                                                                         <directory>src/main/scripts</directory>
307                                                                                         <includes>
308                                                                                                 <include>*.sh</include>
309                                                                                         </includes>
310                                                                                         <filtering>false</filtering>
311                                                                                 </resource>
312                                                                         </resources>
313                                                                 </configuration>
314                                                         </execution>
315
316                                                         <execution>
317                                                                 <id>copy-data</id>
318                                                                 <goals>
319                                                                         <goal>copy-resources</goal>
320                                                                 </goals>
321                                                                 <phase>validate</phase>
322                                                                 <configuration>
323                                                                         <outputDirectory>${basedir}/target/docker-stage/opt/openecomp/appc/data</outputDirectory>
324                                                                         <resources>
325                                                                                 <resource>
326                                                                                         <directory>src/main/resources</directory>
327                                                                                         <includes>
328                                                                                                 <include>*.dump</include>
329                                                                                         </includes>
330                                                                                         <filtering>false</filtering>
331                                                                                 </resource>
332                                                                         </resources>
333                                                                 </configuration>
334                                                         </execution>
335                                                         
336                                                         <execution>
337                                                                 <id>copy-keystores</id>
338                                                                 <goals>
339                                                                         <goal>copy-resources</goal>
340                                                                 </goals>
341                                                                 <phase>validate</phase>
342                                                                 <configuration>
343                                                                         <outputDirectory>${basedir}/target/docker-stage/opt/openecomp/appc/data/stores</outputDirectory>
344                                                                         <resources>
345                                                                                 <resource>
346                                                                                         <directory>../src/main/stores</directory>
347                                                                                         <includes>
348                                                                                                 <include>*.jks</include>
349                                                                                                 <include>*.p12</include>
350                                                                                         </includes>
351                                                                                         <filtering>false</filtering>
352                                                                                 </resource>
353                                                                         </resources>
354                                                                 </configuration>
355                                                         </execution>
356
357                                                         <execution>
358                                                                 <id>copy-properties</id>
359                                                                 <goals>
360                                                                         <goal>copy-resources</goal>
361                                                                 </goals>
362                                                                 <phase>validate</phase>
363                                                                 <configuration>
364                                                                         <outputDirectory>${basedir}/target/docker-stage/opt/openecomp/appc/data/properties</outputDirectory>
365                                                                         <resources>
366                                                                                 <resource>
367                                                                                         <directory>../src/main/properties</directory>
368                                                                                         <includes>
369                                                                                                 <include>*.properties</include>
370                                                                                         </includes>
371                                                                                         <filtering>false</filtering>
372                                                                                 </resource>
373                                                                         </resources>
374                                                                 </configuration>
375                                                         </execution>
376                                                 </executions>
377                                         </plugin>
378                                         <plugin>
379                                                 <artifactId>exec-maven-plugin</artifactId>
380                                                 <groupId>org.codehaus.mojo</groupId>
381                                                 <version>1.5.0</version>
382                                                 <executions>
383                                                         <execution>
384                                                                 <id>Get features</id>
385                                                                 <phase>generate-sources</phase>
386                                                                 <goals>
387                                                                         <goal>exec</goal>
388                                                                 </goals>
389                                                                 <configuration>
390                                                                         <executable>bash</executable>
391                                                                         <environmentVariables>
392                                                                                 <APPC_VERSION>${appc.version}</APPC_VERSION>
393                                                                                 <APPC_OAM_VERSION>${project.version}</APPC_OAM_VERSION>
394                                                                                 <SDNC_OAM_VERSION>${project.version}</SDNC_OAM_VERSION>
395                                                                         </environmentVariables>
396                                                                         <arguments>
397                                                                                 <argument>${basedir}/src/main/scripts/installZips.sh</argument>
398                                                                                 <argument>${basedir}/target/docker-stage/opt/openecomp/appc</argument>
399                                                                         </arguments>
400                                                                 </configuration>
401                                                         </execution>
402
403                                                         <execution>
404                                                                 <id>change shell permissions</id>
405                                                                 <phase>process-sources</phase>
406                                                                 <goals>
407                                                                         <goal>exec</goal>
408                                                                 </goals>
409                                                                 <configuration>
410                                                                         <executable>find</executable>
411                                                                         <arguments>
412                                                                                 <argument>${basedir}/target/docker-stage/opt/openecomp/appc</argument>
413                                                                                 <argument>-name</argument>
414                                                                                 <argument>*.sh</argument>
415                                                                                 <argument>-exec</argument>
416                                                                                 <argument>chmod</argument>
417                                                                                 <argument>+x</argument>
418                                                                                 <argument>{}</argument>
419                                                                                 <argument>;</argument>
420                                                                         </arguments>
421                                                                 </configuration>
422                                                         </execution>
423                                                 </executions>
424                                         </plugin>
425                                 </plugins>
426                         </build>
427
428                 </profile>
429         </profiles>
430         
431         <organization>
432                 <name>openECOMP</name>
433         </organization>
434         
435 </project>