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