Fix for aai in vcpe
[appc/deployment.git] / installation / appc / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3 ============LICENSE_START==========================================
4 ONAP : APPC
5 ===================================================================
6 Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
7 ===================================================================
8
9 Unless otherwise specified, all software contained herein is licensed
10 under the Apache License, Version 2.0 (the License);
11 you may not use this software except in compliance with the License.
12 You may obtain a copy of the License at
13
14     http://www.apache.org/licenses/LICENSE-2.0
15
16 Unless required by applicable law or agreed to in writing, software
17 distributed under the License is distributed on an "AS IS" BASIS,
18 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19 See the License for the specific language governing permissions and
20 limitations under the License.
21 ============LICENSE_END============================================
22 -->
23 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
24         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
25
26         <parent>
27                 <groupId>org.onap.appc.deployment</groupId>
28                 <artifactId>installation</artifactId>
29                 <version>1.6.0-SNAPSHOT</version>
30         </parent>
31
32         <modelVersion>4.0.0</modelVersion>
33         <packaging>pom</packaging>
34         <groupId>org.onap.appc.deployment</groupId>
35         <artifactId>installation-appc</artifactId>
36         <version>1.6.0-SNAPSHOT</version>
37
38         <name>Installation - APPC Docker</name>
39         <description>Creates APPC Docker container on top of the SDNC Base Docker Image</description>
40
41         <properties>
42                 <image.name>onap/appc-image</image.name>
43                 <appc.release.version>1.4.4</appc.release.version>
44                 <appc.snapshot.version>1.6.0-SNAPSHOT</appc.snapshot.version>
45                 <!--This version will be over-ridden by jenkins 
46                     injecting the version.properties variable file during docker build-->
47                 <appc.docker.staging.version>1.0.0</appc.docker.staging.version>
48                 <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
49                 <!--Determines the version of the cdt-proxy-service to download and install-->
50                 <appc.cdt.version>1.5.0-SNAPSHOT</appc.cdt.version>
51                 <docker.plugin.version>0.28.0</docker.plugin.version>
52         </properties>
53
54
55         <build>
56                 <plugins>
57                         
58                         <!-- This is to add any extra scripts, sql dump files, properties files APPC may need even after inheriting from the sdnc base image -->
59                         <plugin>
60                                 <artifactId>maven-resources-plugin</artifactId>
61                                 <version>2.6</version>
62                                 <executions>
63                                         <execution>
64                                                 <id>copy-dockerfile</id>
65                                                 <goals>
66                                                         <goal>copy-resources</goal>
67                                                 </goals><!-- here the phase you need -->
68                                                 <phase>validate</phase>
69                                                 <configuration>
70                                                         <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
71                                                         <resources>
72                                                                 <resource>
73                                                                         <directory>src/main/docker</directory>
74                                                                         <includes>
75                                                                                 <include>Dockerfile</include>
76                                                                         </includes>
77                                                                         <filtering>true</filtering>
78                                                                 </resource>
79                                                         </resources>
80                                                 </configuration>
81                                         </execution>
82
83                                         <execution>
84                                                 <id>copy-scripts</id>
85                                                 <goals>
86                                                         <goal>copy-resources</goal>
87                                                 </goals><!-- here the phase you need -->
88                                                 <phase>validate</phase>
89                                                 <configuration>
90                                                         <outputDirectory>${basedir}/target/docker-stage/opt/onap/appc/bin</outputDirectory>
91                                                         <resources>
92                                                                 <resource>
93                                                                         <directory>src/main/scripts</directory>
94                                                                         <includes>
95                                                                                 <include>*.sh</include>
96                                                                         </includes>
97                                                                         <filtering>false</filtering>
98                                                                 </resource>
99                                                         </resources>
100                                                 </configuration>
101                                         </execution>
102                                         
103                                         <execution>
104                                                 <id>copy-data</id>
105                                                 <goals>
106                                                         <goal>copy-resources</goal>
107                                                 </goals>
108                                                 <phase>validate</phase>
109                                                 <configuration>
110                                                         <outputDirectory>${basedir}/target/docker-stage/opt/onap/appc/data</outputDirectory>
111                                                         <resources>
112                                                                 <resource>
113                                                                         <directory>src/main/resources</directory>
114                                                                         <includes>
115                                                                                 <include>*.dump</include>
116                                                                                 <include>*.sh</include>
117                                                                                 <include>*.cfg</include>
118                                                                                 <include>*.xml</include>
119                                                                                 <include>*.json</include>
120                                                                         </includes>
121                                                                         <filtering>false</filtering>
122                                                                 </resource>
123                                                         </resources>
124                                                 </configuration>
125                                         </execution>
126                                         
127                                         <execution>
128                                                 <id>copy-keystores</id>
129                                                 <goals>
130                                                         <goal>copy-resources</goal>
131                                                 </goals>
132                                                 <phase>validate</phase>
133                                                 <configuration>
134                                                         <outputDirectory>${basedir}/target/docker-stage/opt/onap/appc/data/stores</outputDirectory>
135                                                         <resources>
136                                                                 <resource>
137                                                                         <directory>../src/main/stores</directory>
138                                                                         <includes>
139                                                                                 <include>*.jks</include>
140                                                                                 <include>*.p12</include>
141                                                                                 <include>*keyfile</include>
142                                                                         </includes>
143                                                                         <filtering>false</filtering>
144                                                                 </resource>
145                                                         </resources>
146                                                 </configuration>
147                                         </execution>
148                                         
149                                         <execution>
150                                                 <id>copy-properties</id>
151                                                 <goals>
152                                                         <goal>copy-resources</goal>
153                                                 </goals>
154                                                 <phase>validate</phase>
155                                                 <configuration>
156                                                         <outputDirectory>${basedir}/target/docker-stage/opt/onap/appc/data/properties</outputDirectory>
157                                                         <resources>
158                                                                 <resource>
159                                                                         <directory>../src/main/properties</directory>
160                                                                         <includes>
161                                                                                 <include>*.properties</include>
162                                                                                 <include>*.csv</include>
163                                                                         </includes>
164                                                                         <filtering>false</filtering>
165                                                                 </resource>
166                                                         </resources>
167                                                 </configuration>
168                                         </execution>
169                                 </executions>
170                         </plugin>
171                         <plugin>
172                                 <artifactId>exec-maven-plugin</artifactId>
173                                 <groupId>org.codehaus.mojo</groupId>
174                                 <version>1.5.0</version>
175                                 <executions>
176                                         <execution>
177                                                 <id>Get features</id>
178                                                 <phase>generate-sources</phase>
179                                                 <goals>
180                                                         <goal>exec</goal>
181                                                 </goals>
182                                                 <configuration>
183                                                         <executable>bash</executable>
184                                                         <environmentVariables>
185                                                                 <APPC_VERSION>${appc.version}</APPC_VERSION>
186                                                                 <APPC_CDT_VERSION>${appc.cdt.version}</APPC_CDT_VERSION>
187                                                                 <APPC_OAM_VERSION>${project.version}</APPC_OAM_VERSION>
188                                                                 <SDNC_OAM_VERSION>${project.version}</SDNC_OAM_VERSION>
189                                                         </environmentVariables>
190                                                         <arguments>
191                                                                 <argument>${basedir}/src/main/scripts/installZips.sh</argument>
192                                                                 <argument>${basedir}/target/docker-stage/opt/onap/appc</argument>
193                                                         </arguments>
194                                                 </configuration>
195                                         </execution>
196
197                                         <execution>
198                                                 <id>change shell permissions</id>
199                                                 <phase>process-sources</phase>
200                                                 <goals>
201                                                         <goal>exec</goal>
202                                                 </goals>
203                                                 <configuration>
204                                                         <executable>find</executable>
205                                                         <arguments>
206                                                                 <argument>${basedir}/target/docker-stage/opt/onap/appc</argument>
207                                                                 <argument>-name</argument>
208                                                                 <argument>*.sh</argument>
209                                                                 <argument>-exec</argument>
210                                                                 <argument>chmod</argument>
211                                                                 <argument>+x</argument>
212                                                                 <argument>{}</argument>
213                                                                 <argument>;</argument>
214                                                         </arguments>
215                                                 </configuration>
216                                         </execution>
217                                 </executions>
218                         </plugin>
219                 </plugins>
220         </build>
221
222         <profiles>
223                 <profile>
224                         <id>docker</id>
225                         <build>
226                                 <plugins>
227                                         <plugin>
228                                                 <groupId>org.codehaus.groovy.maven</groupId>
229                                                 <artifactId>gmaven-plugin</artifactId>
230                                                 <executions>
231                                                         <execution>
232                                                                 <phase>validate</phase>
233                                                                 <goals>
234                                                                         <goal>execute</goal>
235                                                                 </goals>
236                                                                 <configuration>
237                                                                         <properties>
238                                                                                 <ver>${project.version}</ver>
239                                                                                 <timestamp>${maven.build.timestamp}</timestamp>
240                                                                         </properties>
241                                                                         <source>
242                                                                                 println project.properties['ver'];
243                                                                                 def versionArray;
244                                                                                 if ( project.properties['ver'] != null ) {
245                                                                                 versionArray = project.properties['ver'].split('\\.');
246                                                                                 }
247                                                                                 if ( project.properties['ver'].endsWith("-SNAPSHOT") ) {
248                                                                                 project.properties['dockertag1']=project.properties['ver'] + "-latest";
249                                                                                 project.properties['dockertag2']=project.properties['ver'] + "-" + project.properties['timestamp'];
250                                                                                 project.properties['appc.version']=project.properties['appc.snapshot.version'];
251                                                                                 } else {
252                                                                                 project.properties['dockertag1']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest";
253                                                                                 project.properties['dockertag2']=project.properties['ver'] + "-STAGING-" + project.properties['timestamp'];
254                                                                                 project.properties['appc.version']=project.properties['appc.release.version'];
255                                                                                 }
256                                                                                 println 'docker tag 1: ' + project.properties['dockertag1'];
257                                                                                 println 'docker tag 2: ' + project.properties['dockertag2'];
258                                                                         </source>
259                                                                 </configuration>
260                                                         </execution>
261                                                 </executions>
262                                         </plugin>
263                                         <plugin>
264                                                 <groupId>io.fabric8</groupId>
265                                                 <artifactId>docker-maven-plugin</artifactId>
266                                                 <version>${docker.plugin.version}</version>
267                                                 <inherited>false</inherited>
268                                                 <configuration>
269                                                         <images>
270                                                                 <image>
271                                                                         <name>${image.name}</name>
272                                                                         <build>
273                                                                                 <cleanup>try</cleanup>
274                                                                                 <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
275                                                                                 <dockerFile>Dockerfile</dockerFile>
276                                                                                 <tags>
277                                                                                         <tag>${dockertag1}</tag>
278                                                                                         <tag>${dockertag2}</tag>
279                                                                                 </tags>
280                                                                         </build>
281                                                                 </image>
282                                                         </images>
283                                                 </configuration>
284                                                 <executions>
285                                                         <execution>
286                                                                 <id>generate-images</id>
287                                                                 <phase>package</phase>
288                                                                 <goals>
289                                                                         <goal>build</goal>
290                                                                 </goals>
291                                                         </execution>
292
293                                                         <execution>
294                                                                 <id>push-images</id>
295                                                                 <phase>deploy</phase>
296                                                                 <goals>
297                                                                         <goal>build</goal>
298                                                                         <goal>push</goal>
299                                                                 </goals>
300                                                         </execution>
301                                                 </executions>
302                                         </plugin>
303
304                                         <!-- This is to add any extra scripts, sql dump files, properties files 
305                                                 APPC may need even after inheriting from the sdnc base image -->
306                                         <plugin>
307                                                 <artifactId>maven-resources-plugin</artifactId>
308                                                 <version>2.6</version>
309                                                 <executions>
310                                                         <execution>
311                                                                 <id>copy-dockerfile</id>
312                                                                 <goals>
313                                                                         <goal>copy-resources</goal>
314                                                                 </goals><!-- here the phase you need -->
315                                                                 <phase>validate</phase>
316                                                                 <configuration>
317                                                                         <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
318                                                                         <resources>
319                                                                                 <resource>
320                                                                                         <directory>src/main/docker</directory>
321                                                                                         <includes>
322                                                                                                 <include>Dockerfile</include>
323                                                                                         </includes>
324                                                                                         <filtering>true</filtering>
325                                                                                 </resource>
326                                                                         </resources>
327                                                                 </configuration>
328                                                         </execution>
329
330                                                         <execution>
331                                                                 <id>copy-scripts</id>
332                                                                 <goals>
333                                                                         <goal>copy-resources</goal>
334                                                                 </goals><!-- here the phase you need -->
335                                                                 <phase>validate</phase>
336                                                                 <configuration>
337                                                                         <outputDirectory>${basedir}/target/docker-stage/opt/onap/appc/bin</outputDirectory>
338                                                                         <resources>
339                                                                                 <resource>
340                                                                                         <directory>src/main/scripts</directory>
341                                                                                         <includes>
342                                                                                                 <include>*.sh</include>
343                                                                                         </includes>
344                                                                                         <filtering>false</filtering>
345                                                                                 </resource>
346                                                                         </resources>
347                                                                 </configuration>
348                                                         </execution>
349
350                                                         <execution>
351                                                                 <id>copy-data</id>
352                                                                 <goals>
353                                                                         <goal>copy-resources</goal>
354                                                                 </goals>
355                                                                 <phase>validate</phase>
356                                                                 <configuration>
357                                                                         <outputDirectory>${basedir}/target/docker-stage/opt/onap/appc/data</outputDirectory>
358                                                                         <resources>
359                                                                                 <resource>
360                                                                                         <directory>src/main/resources</directory>
361                                                                                         <includes>
362                                                                                                 <include>*.dump</include>
363                                                                                                 <include>*.sh</include>
364                                                                                                 <include>*.cfg</include>
365                                                                                                 <include>*.xml</include>
366                                                                                                 <include>*.json</include>
367                                                                                         </includes>
368                                                                                         <filtering>false</filtering>
369                                                                                 </resource>
370                                                                         </resources>
371                                                                 </configuration>
372                                                         </execution>
373                                                         
374                                                         <execution>
375                                                                 <id>copy-keystores</id>
376                                                                 <goals>
377                                                                         <goal>copy-resources</goal>
378                                                                 </goals>
379                                                                 <phase>validate</phase>
380                                                                 <configuration>
381                                                                         <outputDirectory>${basedir}/target/docker-stage/opt/onap/appc/data/stores</outputDirectory>
382                                                                         <resources>
383                                                                                 <resource>
384                                                                                         <directory>../src/main/stores</directory>
385                                                                                         <includes>
386                                                                                                 <include>*.jks</include>
387                                                                                                 <include>*.p12</include>
388                                                                                                 <include>*.keyfile</include>
389                                                                                         </includes>
390                                                                                         <filtering>false</filtering>
391                                                                                 </resource>
392                                                                         </resources>
393                                                                 </configuration>
394                                                         </execution>
395
396                                                         <execution>
397                                                                 <id>copy-properties</id>
398                                                                 <goals>
399                                                                         <goal>copy-resources</goal>
400                                                                 </goals>
401                                                                 <phase>validate</phase>
402                                                                 <configuration>
403                                                                         <outputDirectory>${basedir}/target/docker-stage/opt/onap/appc/data/properties</outputDirectory>
404                                                                         <resources>
405                                                                                 <resource>
406                                                                                         <directory>../src/main/properties</directory>
407                                                                                         <includes>
408                                                                                                 <include>*.properties</include>
409                                                                                                 <include>*.csv</include>
410                                                                                         </includes>
411                                                                                         <filtering>false</filtering>
412                                                                                 </resource>
413                                                                         </resources>
414                                                                 </configuration>
415                                                         </execution>
416                                                 </executions>
417                                         </plugin>
418                                         <plugin>
419                                                 <artifactId>exec-maven-plugin</artifactId>
420                                                 <groupId>org.codehaus.mojo</groupId>
421                                                 <version>1.5.0</version>
422                                                 <executions>
423                                                         <execution>
424                                                                 <id>Get features</id>
425                                                                 <phase>generate-sources</phase>
426                                                                 <goals>
427                                                                         <goal>exec</goal>
428                                                                 </goals>
429                                                                 <configuration>
430                                                                         <executable>bash</executable>
431                                                                         <environmentVariables>
432                                                                                 <APPC_VERSION>${appc.version}</APPC_VERSION>
433                                                                                 <APPC_OAM_VERSION>${project.version}</APPC_OAM_VERSION>
434                                                                                 <SDNC_OAM_VERSION>${project.version}</SDNC_OAM_VERSION>
435                                                                         </environmentVariables>
436                                                                         <arguments>
437                                                                                 <argument>${basedir}/src/main/scripts/installZips.sh</argument>
438                                                                                 <argument>${basedir}/target/docker-stage/opt/onap/appc</argument>
439                                                                                 <argument>${basedir}/target/docker-stage</argument>
440                                                                         </arguments>
441                                                                 </configuration>
442                                                         </execution>
443
444                                                         <execution>
445                                                                 <id>change shell permissions</id>
446                                                                 <phase>process-sources</phase>
447                                                                 <goals>
448                                                                         <goal>exec</goal>
449                                                                 </goals>
450                                                                 <configuration>
451                                                                         <executable>find</executable>
452                                                                         <arguments>
453                                                                                 <argument>${basedir}/target/docker-stage/opt/onap/appc</argument>
454                                                                                 <argument>-name</argument>
455                                                                                 <argument>*.sh</argument>
456                                                                                 <argument>-exec</argument>
457                                                                                 <argument>chmod</argument>
458                                                                                 <argument>+x</argument>
459                                                                                 <argument>{}</argument>
460                                                                                 <argument>;</argument>
461                                                                         </arguments>
462                                                                 </configuration>
463                                                         </execution>
464                                                 </executions>
465                                         </plugin>
466                                 </plugins>
467                         </build>
468
469                 </profile>
470         </profiles>
471         
472         <organization>
473                 <name>ONAP</name>
474         </organization>
475         
476 </project>