Install ansible apt repo manually
[ccsdk/distribution.git] / odlsli / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <project xmlns="http://maven.apache.org/POM/4.0.0"
3         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5         <modelVersion>4.0.0</modelVersion>
6
7         <parent>
8                 <groupId>org.onap.ccsdk.parent</groupId>
9                 <artifactId>odlparent-lite</artifactId>
10                 <version>1.1.0-SNAPSHOT</version>
11                 <relativePath />
12         </parent>
13
14         <groupId>org.onap.ccsdk.distribution</groupId>
15         <artifactId>distribution-odlsli</artifactId>
16         <version>0.3.0-SNAPSHOT</version>
17         <packaging>pom</packaging>
18
19         <name>ccsdk-distribution :: odlsli</name>
20         <description>Creates SDN Controller Docker container</description>
21         <organization>
22                 <name>openECOMP</name>
23         </organization>
24
25         <properties>
26                 <image.name>onap/ccsdk-odlsli-image</image.name>
27                 <ccsdk.project.version>${project.version}</ccsdk.project.version>
28                 <docker.buildArg.https_proxy>${https_proxy}</docker.buildArg.https_proxy>
29                 <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
30                 <opendaylight.root>opt/opendaylight</opendaylight.root>
31                 <docker.push.phase>deploy</docker.push.phase>
32                 <docker.verbose>true</docker.verbose>
33                 <ansible.gpg.key>93C4A3FD7BB9C367</ansible.gpg.key>
34         </properties>
35
36         <dependencies>
37
38                 <dependency>
39                         <groupId>org.onap.ccsdk.sli.core</groupId>
40                         <artifactId>dblib-installer</artifactId>
41                         <version>${ccsdk.sli.core.version}</version>
42                         <classifier>repo</classifier>
43                         <type>zip</type>
44                 </dependency>
45                 <dependency>
46                         <groupId>org.onap.ccsdk.sli.core</groupId>
47                         <artifactId>filters-installer</artifactId>
48                         <version>${ccsdk.sli.core.version}</version>
49                         <classifier>repo</classifier>
50                         <type>zip</type>
51                 </dependency>
52                 <dependency>
53                         <groupId>org.onap.ccsdk.sli.core</groupId>
54                         <artifactId>sli-installer</artifactId>
55                         <version>${ccsdk.sli.core.version}</version>
56                         <classifier>repo</classifier>
57                         <type>zip</type>
58                 </dependency>
59                 <dependency>
60                         <groupId>org.onap.ccsdk.sli.core</groupId>
61                         <artifactId>sliapi-installer</artifactId>
62                         <version>${ccsdk.sli.core.version}</version>
63                         <classifier>repo</classifier>
64                         <type>zip</type>
65                 </dependency>
66                 <dependency>
67                         <groupId>org.onap.ccsdk.sli.core</groupId>
68                         <artifactId>sliPluginUtils-installer</artifactId>
69                         <version>${ccsdk.sli.core.version}</version>
70                         <classifier>repo</classifier>
71                         <type>zip</type>
72                 </dependency>
73                 <dependency>
74                         <groupId>org.onap.ccsdk.sli.core</groupId>
75                         <artifactId>utils-installer</artifactId>
76                         <version>${ccsdk.sli.core.version}</version>
77                         <classifier>repo</classifier>
78                         <type>zip</type>
79                 </dependency>
80                 <dependency>
81                         <groupId>org.onap.ccsdk.sli.core</groupId>
82                         <artifactId>slicore-features-installer</artifactId>
83                         <version>${ccsdk.sli.core.version}</version>
84                         <classifier>repo</classifier>
85                         <type>zip</type>
86                 </dependency>
87                 <dependency>
88                         <groupId>org.onap.ccsdk.sli.adaptors</groupId>
89                         <artifactId>aai-service-installer</artifactId>
90                         <version>${ccsdk.sli.adaptors.version}</version>
91                         <classifier>repo</classifier>
92                         <type>zip</type>
93                 </dependency>
94         <dependency>
95                         <groupId>org.onap.ccsdk.sli.adaptors</groupId>
96                         <artifactId>ansible-adapter-installer</artifactId>
97                         <version>${ccsdk.sli.adaptors.version}</version>
98                         <classifier>repo</classifier>
99                         <type>zip</type>
100                 </dependency>
101                 <dependency>
102                         <groupId>org.onap.ccsdk.sli.adaptors</groupId>
103                         <artifactId>mdsal-resource-installer</artifactId>
104                         <version>${ccsdk.sli.adaptors.version}</version>
105                         <classifier>repo</classifier>
106                         <type>zip</type>
107                 </dependency>
108                 <dependency>
109                         <groupId>org.onap.ccsdk.sli.adaptors</groupId>
110                         <artifactId>resource-assignment-installer</artifactId>
111                         <version>${ccsdk.sli.adaptors.version}</version>
112                         <classifier>repo</classifier>
113                         <type>zip</type>
114                 </dependency>
115                 <dependency>
116                         <groupId>org.onap.ccsdk.sli.adaptors</groupId>
117                         <artifactId>sql-resource-installer</artifactId>
118                         <version>${ccsdk.sli.adaptors.version}</version>
119                         <classifier>repo</classifier>
120                         <type>zip</type>
121                 </dependency>
122                 <dependency>
123                         <groupId>org.onap.ccsdk.sli.adaptors</groupId>
124                         <artifactId>sliadaptors-features-installer</artifactId>
125                         <version>${ccsdk.sli.adaptors.version}</version>
126                         <classifier>repo</classifier>
127                         <type>zip</type>
128                 </dependency>
129                 <dependency>
130                         <groupId>org.onap.ccsdk.sli.northbound</groupId>
131                         <artifactId>asdcApi-installer</artifactId>
132                         <version>${ccsdk.sli.northbound.version}</version>
133                         <classifier>repo</classifier>
134                         <type>zip</type>
135                 </dependency>
136                 <dependency>
137                         <groupId>org.onap.ccsdk.sli.northbound</groupId>
138                         <artifactId>dataChange-installer</artifactId>
139                         <version>${ccsdk.sli.northbound.version}</version>
140                         <classifier>repo</classifier>
141                         <type>zip</type>
142                 </dependency>
143                 <dependency>
144                         <groupId>org.onap.ccsdk.sli.northbound</groupId>
145                         <artifactId>lcm-installer</artifactId>
146                         <version>${ccsdk.sli.northbound.version}</version>
147                         <classifier>repo</classifier>
148                         <type>zip</type>
149                 </dependency>
150                 <dependency>
151                         <groupId>org.onap.ccsdk.sli.northbound</groupId>
152                         <artifactId>slinorthbound-features-installer</artifactId>
153                         <version>${ccsdk.sli.northbound.version}</version>
154                         <classifier>repo</classifier>
155                         <type>zip</type>
156                 </dependency>
157                 <dependency>
158                         <groupId>org.onap.ccsdk.sli.plugins</groupId>
159                         <artifactId>properties-node-installer</artifactId>
160                         <version>${ccsdk.sli.plugins.version}</version>
161                         <classifier>repo</classifier>
162                         <type>zip</type>
163                 </dependency>
164                 <dependency>
165                         <groupId>org.onap.ccsdk.sli.plugins</groupId>
166                         <artifactId>restapi-call-node-installer</artifactId>
167                         <version>${ccsdk.sli.plugins.version}</version>
168                         <classifier>repo</classifier>
169                         <type>zip</type>
170                 </dependency>
171                 <dependency>
172                         <groupId>org.onap.ccsdk.sli.plugins</groupId>
173                         <artifactId>sliplugins-features-installer</artifactId>
174                         <version>${ccsdk.sli.plugins.version}</version>
175                         <classifier>repo</classifier>
176                         <type>zip</type>
177                 </dependency>
178         </dependencies>
179
180         <build>
181         <extensions>
182                 <extension>
183                         <!-- this extension is required by wagon in order to pass the proxy -->
184                         <groupId>org.apache.maven.wagon</groupId>
185                         <artifactId>wagon-http-lightweight</artifactId>
186                         <version>2.2</version>
187                 </extension>
188         </extensions>
189                 <plugins>
190
191
192                         <plugin>
193                                 <groupId>org.codehaus.groovy.maven</groupId>
194                                 <artifactId>gmaven-plugin</artifactId>
195                                 <executions>
196                                         <execution>
197                                                 <phase>validate</phase>
198                                                 <goals>
199                                                         <goal>execute</goal>
200                                                 </goals>
201                                                 <configuration>
202                                                         <source>
203                                                                 println project.properties['ccsdk.project.version'];
204                                                                 def versionArray;
205                                                                 if (project.properties['ccsdk.project.version'] != null ) {
206                                                                     versionArray = project.properties['ccsdk.project.version'].split('\\.');
207                                                                 }
208
209                                                                 if (project.properties['ccsdk.project.version'].endsWith("-SNAPSHOT"))
210                                                                 {
211                                                                     project.properties['project.docker.latesttag.version']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest";
212                                                                 } else {
213                                                                     project.properties['project.docker.latesttag.version']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest";
214                                                                 }
215
216                                                                 println 'New Tag for docker:' + project.properties['project.docker.latesttag.version'];
217                                                         </source>
218                                                 </configuration>
219                                         </execution>
220                                 </executions>
221                         </plugin>
222
223
224
225                         <plugin>
226                                 <artifactId>maven-resources-plugin</artifactId>
227                                 <version>2.6</version>
228                                 <executions>
229                                         <execution>
230                                                 <id>copy-dockerfile</id>
231                                                 <goals>
232                                                         <goal>copy-resources</goal>
233                                                 </goals><!-- here the phase you need -->
234                                                 <phase>validate</phase>
235                                                 <configuration>
236                                                         <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
237                                                         <resources>
238                                                                 <resource>
239                                                                         <directory>src/main/docker</directory>
240                                                                         <includes>
241                                                                                 <include>Dockerfile</include>
242                                                                         </includes>
243                                                                         <filtering>true</filtering>
244                                                                 </resource>
245                                                         </resources>
246                                                 </configuration>
247                                         </execution>
248
249                                         <execution>
250                                                 <id>copy-scripts</id>
251                                                 <goals>
252                                                         <goal>copy-resources</goal>
253                                                 </goals><!-- here the phase you need -->
254                                                 <phase>validate</phase>
255                                                 <configuration>
256                                                         <outputDirectory>${basedir}/target/docker-stage/opt/onap/ccsdk/bin</outputDirectory>
257                                                         <resources>
258                                                                 <resource>
259                                                                         <directory>src/main/scripts</directory>
260                                                                         <includes>
261                                                                                 <include>*.sh</include>
262                                                                         </includes>
263                                                                         <filtering>false</filtering>
264                                                                 </resource>
265                                                         </resources>
266                                                 </configuration>
267                                         </execution>
268
269                                         <execution>
270                                                 <id>copy-odl-resources</id>
271                                                 <goals>
272                                                         <goal>copy-resources</goal>
273                                                 </goals><!-- here the phase you need -->
274                                                 <phase>validate</phase>
275                                                 <configuration>
276                                                         <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
277                                                         <resources>
278                                                                 <resource>
279                                                                         <directory>src/main/resources</directory>
280                                                                         <includes>
281                                                                                 <include>idmlight.db.mv.db</include>
282                                                                                 <include>org.ops4j.pax.logging.cfg</include>
283                                                                                 <include>install_ccsdk.yml</include>
284                                                                                 <include>ansible-sources.list</include>
285                                                                         </includes>
286                                                                         <filtering>false</filtering>
287                                                                 </resource>
288                                                         </resources>
289                                                 </configuration>
290                                         </execution>
291                                         <execution>
292                                                 <id>copy-config</id>
293                                                 <goals>
294                                                         <goal>copy-resources</goal>
295                                                 </goals><!-- here the phase you need -->
296                                                 <phase>validate</phase>
297                                                 <configuration>
298                                                         <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
299                                                         <resources>
300                                                                 <resource>
301                                                                         <directory>src/main/resources</directory>
302                                                                         <includes>
303                                                                                 <include>org.ops4j.pax.logging.cfg</include>
304                                                                         </includes>
305                                                                         <filtering>false</filtering>
306                                                                 </resource>
307                                                         </resources>
308                                                 </configuration>
309                                         </execution>
310                                         <execution>
311                                                 <id>copy-data</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/opt/onap/ccsdk/data</outputDirectory>
318                                                         <resources>
319                                                                 <resource>
320                                                                         <directory>src/main/resources</directory>
321                                                                         <includes>
322                                                                                 <include>*.dump</include>
323                                                                         </includes>
324                                                                         <filtering>false</filtering>
325                                                                 </resource>
326                                                         </resources>
327                                                 </configuration>
328                                         </execution>
329                                         <execution>
330                                                 <id>copy-properties</id>
331                                                 <goals>
332                                                         <goal>copy-resources</goal>
333                                                 </goals><!-- here the phase you need -->
334                                                 <phase>validate</phase>
335                                                 <configuration>
336                                                         <outputDirectory>${basedir}/target/docker-stage/opt/onap/ccsdk/data/properties</outputDirectory>
337                                                         <resources>
338                                                                 <resource>
339                                                                         <directory>src/main/properties</directory>
340                                                                         <includes>
341                                                                                 <include>*.properties</include>
342                                                                         </includes>
343                                                                         <filtering>false</filtering>
344                                                                 </resource>
345                                                         </resources>
346                                                 </configuration>
347                                         </execution>
348                                         <execution>
349                                                 <id>copy-keystores</id>
350                                                 <goals>
351                                                         <goal>copy-resources</goal>
352                                                 </goals><!-- here the phase you need -->
353                                                 <phase>validate</phase>
354                                                 <configuration>
355                                                         <outputDirectory>${basedir}/target/docker-stage/opt/onap/ccsdk/data/stores</outputDirectory>
356                                                         <resources>
357                                                                 <resource>
358                                                                         <directory>src/main/stores</directory>
359                                                                         <includes>
360                                                                                 <include>*.jks</include>
361                                                                         </includes>
362                                                                         <filtering>false</filtering>
363                                                                 </resource>
364                                                         </resources>
365                                                 </configuration>
366                                         </execution>
367                                 </executions>
368                         </plugin>
369                         <plugin>
370                                 <groupId>org.apache.maven.plugins</groupId>
371                                 <artifactId>maven-dependency-plugin</artifactId>
372                                 <version>3.0.2</version>
373                                 <executions>
374                                         <execution>
375                                                 <id>unpack features</id>
376                                                 <phase>generate-sources</phase>
377                                                 <goals>
378                                                         <goal>unpack-dependencies</goal>
379                                                 </goals>
380                                                 <configuration>
381                                                         <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
382                                                         <excludeTransitive>true</excludeTransitive>
383                                                 </configuration>
384                                         </execution>
385                                         <execution>
386                                                 <id>unpack dgs</id>
387                                                 <phase>generate-sources</phase>
388                                                 <goals>
389                                                         <goal>unpack</goal>
390                                                 </goals>
391                                                 <configuration>
392                                                         <outputDirectory>${basedir}/target/docker-stage/opt/onap/ccsdk</outputDirectory>
393                                                         <artifactItems>
394                                                                 <artifactItem>
395                                                                         <groupId>${project.groupId}</groupId>
396                                                                         <artifactId>platform-logic-installer</artifactId>
397                                                                         <version>${project.version}</version>
398                                                                         <type>zip</type>
399                                                                 </artifactItem>
400                                                         </artifactItems>
401                                                 </configuration>
402                                         </execution>
403                                 </executions>
404                         </plugin>
405                         <plugin>
406                                 <groupId>org.codehaus.mojo</groupId>
407                                 <artifactId>exec-maven-plugin</artifactId>
408                                 <version>1.5.0</version>
409                                 <executions>
410
411                                         <execution>
412                                                 <id>change shell permissions</id>
413                                                 <phase>process-sources</phase>
414                                                 <goals>
415                                                         <goal>exec</goal>
416                                                 </goals>
417                                                 <configuration>
418                                                         <executable>/usr/bin/find</executable>
419                                                         <arguments>
420                                                                 <argument>${basedir}/target/docker-stage/opt/onap/ccsdk</argument>
421                                                                 <argument>-name</argument>
422                                                                 <argument>*.sh</argument>
423                                                                 <argument>-exec</argument>
424                                                                 <argument>chmod</argument>
425                                                                 <argument>+x</argument>
426                                                                 <argument>{}</argument>
427                                                                 <argument>;</argument>
428                                                         </arguments>
429                                                 </configuration>
430                                         </execution>
431                                 </executions>
432                         </plugin>
433
434
435                 </plugins>
436         </build>
437
438         <profiles>
439                 <profile>
440                         <id>docker</id>
441                         <build>
442                                 <plugins>
443                                         <plugin>
444                                                 <groupId>io.fabric8</groupId>
445                                                 <artifactId>docker-maven-plugin</artifactId>
446                                                 <version>0.16.5</version>
447                                                 <inherited>false</inherited>
448                                                 <configuration>
449                                                         <images>
450                                                                 <image>
451                                                                         <name>${image.name}</name>
452                                                                         <build>
453                                                                                 <cleanup>try</cleanup>
454                                                                                 <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
455                                                                                 <dockerFile>${basedir}/target/docker-stage/Dockerfile</dockerFile>
456                                                                                 <tags>
457                                                                                         <tag>${project.version}</tag>
458                                                                                         <tag>${project.version}-STAGING-${maven.build.timestamp}</tag>
459                                                                                         <tag>${project.docker.latesttag.version}</tag>
460                                                                                 </tags>
461                                                                         </build>
462                                                                 </image>
463                                                         </images>
464                                                 </configuration>
465                                                 <executions>
466                                                         <execution>
467                                                                 <id>generate-images</id>
468                                                                 <phase>package</phase>
469                                                                 <goals>
470                                                                         <goal>build</goal>
471                                                                 </goals>
472                                                         </execution>
473
474                                                         <execution>
475                                                                 <id>push-images</id>
476                                                                 <phase>${docker.push.phase}</phase>
477                                                                 <goals>
478                                                                         <goal>build</goal>
479                                                                         <goal>push</goal>
480                                                                 </goals>
481                                                         </execution>
482                                                 </executions>
483                                         </plugin>
484                                 </plugins>
485                         </build>
486                 </profile>
487         </profiles>
488 </project>