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