7d9726ed035362378a564b627cf70bb079444221
[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                 <dependency>
38                         <groupId>${project.groupId}</groupId>
39                         <artifactId>dependencies</artifactId>
40                         <version>${project.version}</version>
41                         <classifier>repo</classifier>
42                         <type>zip</type>
43                 </dependency>
44
45                 <dependency>
46                         <groupId>org.onap.ccsdk.sli.core</groupId>
47                         <artifactId>dblib-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>filters-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>sli-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>sliapi-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>sliPluginUtils-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>utils-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.core</groupId>
89                         <artifactId>slicore-features-installer</artifactId>
90                         <version>${ccsdk.sli.core.version}</version>
91                         <classifier>repo</classifier>
92                         <type>zip</type>
93                 </dependency>
94                 <dependency>
95                         <groupId>org.onap.ccsdk.sli.adaptors</groupId>
96                         <artifactId>aai-service-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>ansible-adapter-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>mdsal-resource-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>resource-assignment-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>netbox-client-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.adaptors</groupId>
131                         <artifactId>sql-resource-installer</artifactId>
132                         <version>${ccsdk.sli.adaptors.version}</version>
133                         <classifier>repo</classifier>
134                         <type>zip</type>
135                 </dependency>
136                 <dependency>
137                         <groupId>org.onap.ccsdk.sli.adaptors</groupId>
138                         <artifactId>sliadaptors-features-installer</artifactId>
139                         <version>${ccsdk.sli.adaptors.version}</version>
140                         <classifier>repo</classifier>
141                         <type>zip</type>
142                 </dependency>
143                 <dependency>
144                         <groupId>org.onap.ccsdk.sli.northbound</groupId>
145                         <artifactId>asdcApi-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>dataChange-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.northbound</groupId>
159                         <artifactId>lcm-installer</artifactId>
160                         <version>${ccsdk.sli.northbound.version}</version>
161                         <classifier>repo</classifier>
162                         <type>zip</type>
163                 </dependency>
164                 <dependency>
165                         <groupId>org.onap.ccsdk.sli.northbound</groupId>
166                         <artifactId>slinorthbound-features-installer</artifactId>
167                         <version>${ccsdk.sli.northbound.version}</version>
168                         <classifier>repo</classifier>
169                         <type>zip</type>
170                 </dependency>
171                 <dependency>
172                         <groupId>org.onap.ccsdk.sli.plugins</groupId>
173                         <artifactId>properties-node-installer</artifactId>
174                         <version>${ccsdk.sli.plugins.version}</version>
175                         <classifier>repo</classifier>
176                         <type>zip</type>
177                 </dependency>
178                 <dependency>
179                         <groupId>org.onap.ccsdk.sli.plugins</groupId>
180                         <artifactId>restapi-call-node-installer</artifactId>
181                         <version>${ccsdk.sli.plugins.version}</version>
182                         <classifier>repo</classifier>
183                         <type>zip</type>
184                 </dependency>
185                 <dependency>
186                         <groupId>org.onap.ccsdk.sli.plugins</groupId>
187                         <artifactId>restconf-client-installer</artifactId>
188                         <version>${ccsdk.sli.plugins.version}</version>
189                         <classifier>repo</classifier>
190                         <type>zip</type>
191                 </dependency>
192                 <dependency>
193                         <groupId>org.onap.ccsdk.sli.plugins</groupId>
194                         <artifactId>sshapi-call-node-installer</artifactId>
195                         <version>${ccsdk.sli.plugins.version}</version>
196                         <classifier>repo</classifier>
197                         <type>zip</type>
198                 </dependency>
199                 <dependency>
200                         <groupId>org.onap.ccsdk.sli.plugins</groupId>
201                         <artifactId>sliplugins-features-installer</artifactId>
202                         <version>${ccsdk.sli.plugins.version}</version>
203                         <classifier>repo</classifier>
204                         <type>zip</type>
205                 </dependency>
206         </dependencies>
207
208         <build>
209         <extensions>
210                 <extension>
211                         <!-- this extension is required by wagon in order to pass the proxy -->
212                         <groupId>org.apache.maven.wagon</groupId>
213                         <artifactId>wagon-http-lightweight</artifactId>
214                         <version>2.2</version>
215                 </extension>
216         </extensions>
217                 <plugins>
218
219
220                         <plugin>
221                                 <groupId>org.codehaus.groovy.maven</groupId>
222                                 <artifactId>gmaven-plugin</artifactId>
223                                 <executions>
224                                         <execution>
225                                                 <phase>validate</phase>
226                                                 <goals>
227                                                         <goal>execute</goal>
228                                                 </goals>
229                                                 <configuration>
230                                                         <source>
231                                                                 println project.properties['ccsdk.project.version'];
232                                                                 def versionArray;
233                                                                 if (project.properties['ccsdk.project.version'] != null ) {
234                                                                     versionArray = project.properties['ccsdk.project.version'].split('\\.');
235                                                                 }
236
237                                                                 if (project.properties['ccsdk.project.version'].endsWith("-SNAPSHOT"))
238                                                                 {
239                                                                     project.properties['project.docker.latesttag.version']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest";
240                                                                 } else {
241                                                                     project.properties['project.docker.latesttag.version']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest";
242                                                                 }
243
244                                                                 println 'New Tag for docker:' + project.properties['project.docker.latesttag.version'];
245                                                         </source>
246                                                 </configuration>
247                                         </execution>
248                                 </executions>
249                         </plugin>
250
251
252
253                         <plugin>
254                                 <artifactId>maven-resources-plugin</artifactId>
255                                 <version>2.6</version>
256                                 <executions>
257                                         <execution>
258                                                 <id>copy-dockerfile</id>
259                                                 <goals>
260                                                         <goal>copy-resources</goal>
261                                                 </goals><!-- here the phase you need -->
262                                                 <phase>validate</phase>
263                                                 <configuration>
264                                                         <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
265                                                         <resources>
266                                                                 <resource>
267                                                                         <directory>src/main/docker</directory>
268                                                                         <includes>
269                                                                                 <include>Dockerfile</include>
270                                                                         </includes>
271                                                                         <filtering>true</filtering>
272                                                                 </resource>
273                                                         </resources>
274                                                 </configuration>
275                                         </execution>
276
277                                         <execution>
278                                                 <id>copy-scripts</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/opt/onap/ccsdk/bin</outputDirectory>
285                                                         <resources>
286                                                                 <resource>
287                                                                         <directory>src/main/scripts</directory>
288                                                                         <includes>
289                                                                                 <include>*.sh</include>
290                                                                         </includes>
291                                                                         <filtering>false</filtering>
292                                                                 </resource>
293                                                         </resources>
294                                                 </configuration>
295                                         </execution>
296
297                                         <execution>
298                                                 <id>copy-odl-resources</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</outputDirectory>
305                                                         <resources>
306                                                                 <resource>
307                                                                         <directory>src/main/resources</directory>
308                                                                         <includes>
309                                                                                 <include>idmlight.db.mv.db</include>
310                                                                                 <include>org.ops4j.pax.logging.cfg</include>
311                                                                                 <include>install_ccsdk.yml</include>
312                                                                                 <include>ansible-sources.list</include>
313                                                                         </includes>
314                                                                         <filtering>false</filtering>
315                                                                 </resource>
316                                                         </resources>
317                                                 </configuration>
318                                         </execution>
319                                         <execution>
320                                                 <id>copy-config</id>
321                                                 <goals>
322                                                         <goal>copy-resources</goal>
323                                                 </goals><!-- here the phase you need -->
324                                                 <phase>validate</phase>
325                                                 <configuration>
326                                                         <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
327                                                         <resources>
328                                                                 <resource>
329                                                                         <directory>src/main/resources</directory>
330                                                                         <includes>
331                                                                                 <include>org.ops4j.pax.logging.cfg</include>
332                                                                         </includes>
333                                                                         <filtering>false</filtering>
334                                                                 </resource>
335                                                         </resources>
336                                                 </configuration>
337                                         </execution>
338                                         <execution>
339                                                 <id>copy-data</id>
340                                                 <goals>
341                                                         <goal>copy-resources</goal>
342                                                 </goals><!-- here the phase you need -->
343                                                 <phase>validate</phase>
344                                                 <configuration>
345                                                         <outputDirectory>${basedir}/target/docker-stage/opt/onap/ccsdk/data</outputDirectory>
346                                                         <resources>
347                                                                 <resource>
348                                                                         <directory>src/main/resources</directory>
349                                                                         <includes>
350                                                                                 <include>*.dump</include>
351                                                                         </includes>
352                                                                         <filtering>false</filtering>
353                                                                 </resource>
354                                                         </resources>
355                                                 </configuration>
356                                         </execution>
357                                         <execution>
358                                                 <id>copy-properties</id>
359                                                 <goals>
360                                                         <goal>copy-resources</goal>
361                                                 </goals><!-- here the phase you need -->
362                                                 <phase>validate</phase>
363                                                 <configuration>
364                                                         <outputDirectory>${basedir}/target/docker-stage/opt/onap/ccsdk/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                                         <execution>
377                                                 <id>copy-keystores</id>
378                                                 <goals>
379                                                         <goal>copy-resources</goal>
380                                                 </goals><!-- here the phase you need -->
381                                                 <phase>validate</phase>
382                                                 <configuration>
383                                                         <outputDirectory>${basedir}/target/docker-stage/opt/onap/ccsdk/data/stores</outputDirectory>
384                                                         <resources>
385                                                                 <resource>
386                                                                         <directory>src/main/stores</directory>
387                                                                         <includes>
388                                                                                 <include>*.jks</include>
389                                                                         </includes>
390                                                                         <filtering>false</filtering>
391                                                                 </resource>
392                                                         </resources>
393                                                 </configuration>
394                                         </execution>
395                                 </executions>
396                         </plugin>
397                         <plugin>
398                                 <groupId>org.apache.maven.plugins</groupId>
399                                 <artifactId>maven-dependency-plugin</artifactId>
400                                 <version>3.0.2</version>
401                                 <executions>
402                                         <execution>
403                                                 <id>unpack features</id>
404                                                 <phase>generate-sources</phase>
405                                                 <goals>
406                                                         <goal>unpack-dependencies</goal>
407                                                 </goals>
408                                                 <configuration>
409                                                         <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
410                                                         <excludeTransitive>true</excludeTransitive>
411                                                 </configuration>
412                                         </execution>
413                                         <execution>
414                                                 <id>unpack dgs</id>
415                                                 <phase>generate-sources</phase>
416                                                 <goals>
417                                                         <goal>unpack</goal>
418                                                 </goals>
419                                                 <configuration>
420                                                         <outputDirectory>${basedir}/target/docker-stage/opt/onap/ccsdk</outputDirectory>
421                                                         <artifactItems>
422                                                                 <artifactItem>
423                                                                         <groupId>${project.groupId}</groupId>
424                                                                         <artifactId>platform-logic-installer</artifactId>
425                                                                         <version>${project.version}</version>
426                                                                         <type>zip</type>
427                                                                 </artifactItem>
428                                                         </artifactItems>
429                                                 </configuration>
430                                         </execution>
431                                 </executions>
432                         </plugin>
433                         <plugin>
434                                 <groupId>org.codehaus.mojo</groupId>
435                                 <artifactId>exec-maven-plugin</artifactId>
436                                 <version>1.5.0</version>
437                                 <executions>
438
439                                         <execution>
440                                                 <id>change shell permissions</id>
441                                                 <phase>process-sources</phase>
442                                                 <goals>
443                                                         <goal>exec</goal>
444                                                 </goals>
445                                                 <configuration>
446                                                         <executable>/usr/bin/find</executable>
447                                                         <arguments>
448                                                                 <argument>${basedir}/target/docker-stage/opt/onap/ccsdk</argument>
449                                                                 <argument>-name</argument>
450                                                                 <argument>*.sh</argument>
451                                                                 <argument>-exec</argument>
452                                                                 <argument>chmod</argument>
453                                                                 <argument>+x</argument>
454                                                                 <argument>{}</argument>
455                                                                 <argument>;</argument>
456                                                         </arguments>
457                                                 </configuration>
458                                         </execution>
459                                 </executions>
460                         </plugin>
461
462
463                 </plugins>
464         </build>
465
466         <profiles>
467                 <profile>
468                         <id>docker</id>
469                         <build>
470                                 <plugins>
471                                         <plugin>
472                                                 <groupId>io.fabric8</groupId>
473                                                 <artifactId>docker-maven-plugin</artifactId>
474                                                 <version>0.16.5</version>
475                                                 <inherited>false</inherited>
476                                                 <configuration>
477                                                         <images>
478                                                                 <image>
479                                                                         <name>${image.name}</name>
480                                                                         <build>
481                                                                                 <cleanup>try</cleanup>
482                                                                                 <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
483                                                                                 <dockerFile>${basedir}/target/docker-stage/Dockerfile</dockerFile>
484                                                                                 <tags>
485                                                                                         <tag>${project.version}</tag>
486                                                                                         <tag>${project.version}-STAGING-${maven.build.timestamp}</tag>
487                                                                                         <tag>${project.docker.latesttag.version}</tag>
488                                                                                 </tags>
489                                                                         </build>
490                                                                 </image>
491                                                         </images>
492                                                 </configuration>
493                                                 <executions>
494                                                         <execution>
495                                                                 <id>generate-images</id>
496                                                                 <phase>package</phase>
497                                                                 <goals>
498                                                                         <goal>build</goal>
499                                                                 </goals>
500                                                         </execution>
501
502                                                         <execution>
503                                                                 <id>push-images</id>
504                                                                 <phase>${docker.push.phase}</phase>
505                                                                 <goals>
506                                                                         <goal>build</goal>
507                                                                         <goal>push</goal>
508                                                                 </goals>
509                                                         </execution>
510                                                 </executions>
511                                         </plugin>
512                                 </plugins>
513                         </build>
514                 </profile>
515         </profiles>
516 </project>

© 2017 ONAP. Copyright © The Linux Foundation ®. All Rights Reserved.
The Linux Foundation has registered trademarks and uses trademarks.
For a list of trademarks of The Linux Foundation, please see our Trademark Usage page.
Linux is a registered trademark of Linus Torvalds.
Privacy Policy and Terms of Use