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