Merge "Update to use released version 0.6.0"
[ccsdk/distribution.git] / lighty / lighty-ubuntu-docker / 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.distribution</groupId>
9                 <artifactId>distribution-lighty</artifactId>
10                 <version>0.6.0-SNAPSHOT</version>
11         </parent>
12
13         <artifactId>distribution-lighty-ubuntu-docker</artifactId>
14         <packaging>pom</packaging>
15
16         <name>ccsdk-distribution :: lighty :: ${project.artifactId}</name>
17         <description>Creates Lighty container</description>
18         <organization>
19                 <name>ONAP</name>
20         </organization>
21
22         <properties>
23                 <image.name>onap/ccsdk-lighty-ubuntu-image</image.name>
24                 <lighty.app.name>ccsdk-lighty-distribution-${project.version}</lighty.app.name>
25                 <lighty.app.zip>${lighty.app.name}-bin.zip</lighty.app.zip>
26                 <lighty.app.jar>${lighty.app.name}.jar</lighty.app.jar>
27                 <ccsdk.project.version>${project.version}</ccsdk.project.version>
28                 <ccsdk.build.timestamp>${maven.build.timestamp}</ccsdk.build.timestamp>
29                 <docker.buildArg.https_proxy>${https_proxy}</docker.buildArg.https_proxy>
30                 <docker.push.phase>deploy</docker.push.phase>
31         </properties>
32
33         <dependencyManagement>
34                 <dependencies>
35                         <dependency>
36                                 <groupId>org.onap.ccsdk.sli.core</groupId>
37                                 <artifactId>ccsdk-lighty-dependency-versions</artifactId>
38                                 <version>${project.version}</version>
39                                 <type>pom</type>
40                                 <scope>import</scope>
41                         </dependency>
42                 </dependencies>
43         </dependencyManagement>
44
45         <build>
46                 <plugins>
47
48
49                         <plugin>
50                                 <groupId>org.codehaus.groovy.maven</groupId>
51                                 <artifactId>gmaven-plugin</artifactId>
52                                 <executions>
53                                         <execution>
54                                                 <phase>validate</phase>
55                                                 <goals>
56                                                         <goal>execute</goal>
57                                                 </goals>
58                                                 <configuration>
59                                                         <source>${basedir}/../../src/main/scripts/TagVersion.groovy</source>
60                                                 </configuration>
61                                         </execution>
62                                 </executions>
63                         </plugin>
64
65
66
67                         <plugin>
68                                 <groupId>org.apache.maven.plugins</groupId>
69                                 <artifactId>maven-dependency-plugin</artifactId>
70                                 <version>3.0.2</version>
71                                 <executions>
72                                         <execution>
73                                                 <id>unpack dgs</id>
74                                                 <phase>generate-sources</phase>
75                                                 <goals>
76                                                         <goal>unpack</goal>
77                                                 </goals>
78                                                 <configuration>
79                                                         <outputDirectory>${basedir}/target/docker-stage/opt/onap/ccsdk</outputDirectory>
80                                                         <artifactItems>
81                                                                 <artifactItem>
82                                                                         <groupId>${project.groupId}</groupId>
83                                                                         <artifactId>platform-logic-installer</artifactId>
84                                                                         <version>${project.version}</version>
85                                                                         <type>zip</type>
86                                                                 </artifactItem>
87                                                         </artifactItems>
88                                                 </configuration>
89                                         </execution>
90                                 </executions>
91                         </plugin>
92
93                         <plugin>
94                                 <artifactId>maven-resources-plugin</artifactId>
95                                 <version>2.6</version>
96                                 <executions>
97                                         <execution>
98                                                 <id>copy-dockerfile</id>
99                                                 <goals>
100                                                         <goal>copy-resources</goal>
101                                                 </goals><!-- here the phase you need -->
102                                                 <phase>validate</phase>
103                                                 <configuration>
104                                                         <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
105                                                         <resources>
106                                                                 <resource>
107                                                                         <directory>src/main/docker</directory>
108                                                                         <includes>
109                                                                                 <include>Dockerfile</include>
110                                                                         </includes>
111                                                                         <filtering>true</filtering>
112                                                                 </resource>
113                                                         </resources>
114                                                 </configuration>
115                                         </execution>
116
117                                         <execution>
118                                                 <id>copy-ccsdk-lighty-zip</id>
119                                                 <goals>
120                                                         <goal>copy-resources</goal>
121                                                 </goals>
122                                                 <phase>validate</phase>
123                                                 <configuration>
124                                                         <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
125                                                         <resources>
126                                                                 <resource>
127                                                                         <directory>${basedir}/../ccsdk-lighty-distribution/target</directory>
128                                                                         <includes>
129                                                                                 <include>${lighty.app.zip}</include>
130                                                                         </includes>
131                                                                         <filtering>false</filtering>
132                                                                 </resource>
133                                                         </resources>
134                                                 </configuration>
135                                         </execution>
136
137                                         <execution>
138                                                 <id>copy-scripts</id>
139                                                 <goals>
140                                                         <goal>copy-resources</goal>
141                                                 </goals><!-- here the phase you need -->
142                                                 <phase>validate</phase>
143                                                 <configuration>
144                                                         <outputDirectory>${basedir}/target/docker-stage/opt/onap/ccsdk/bin</outputDirectory>
145                                                         <resources>
146                                                                 <resource>
147                                                                         <directory>./src/main/scripts</directory>
148                                                                         <includes>
149                                                                                 <include>*.sh</include>
150                                                                         </includes>
151                                                                         <filtering>false</filtering>
152                                                                 </resource>
153                                                         </resources>
154                                                 </configuration>
155                                         </execution>
156
157                                         <execution>
158                                                 <id>copy-odl-resources</id>
159                                                 <goals>
160                                                         <goal>copy-resources</goal>
161                                                 </goals><!-- here the phase you need -->
162                                                 <phase>validate</phase>
163                                                 <configuration>
164                                                         <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
165                                                         <resources>
166                                                                 <resource>
167                                                                         <directory>./src/main/resources</directory>
168                                                                         <includes>
169                                                                                 <include>idmlight.db.mv.db</include>
170                                                                                 <include>org.ops4j.pax.logging.cfg</include>
171                                                                                 <include>install_ccsdk.yml</include>
172                                                                                 <include>ansible-sources.list</include>
173                                                                         </includes>
174                                                                         <filtering>false</filtering>
175                                                                 </resource>
176                                                         </resources>
177                                                 </configuration>
178                                         </execution>
179                                         <execution>
180                                                 <id>copy-config</id>
181                                                 <goals>
182                                                         <goal>copy-resources</goal>
183                                                 </goals><!-- here the phase you need -->
184                                                 <phase>validate</phase>
185                                                 <configuration>
186                                                         <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
187                                                         <resources>
188                                                                 <resource>
189                                                                         <directory>./src/main/resources</directory>
190                                                                         <includes>
191                                                                                 <include>org.ops4j.pax.logging.cfg</include>
192                                                                         </includes>
193                                                                         <filtering>false</filtering>
194                                                                 </resource>
195                                                         </resources>
196                                                 </configuration>
197                                         </execution>
198                                         <execution>
199                                                 <id>copy-data</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/opt/onap/ccsdk/data</outputDirectory>
206                                                         <resources>
207                                                                 <resource>
208                                                                         <directory>./src/main/resources</directory>
209                                                                         <includes>
210                                                                                 <include>*.dump</include>
211                                                                         </includes>
212                                                                         <filtering>false</filtering>
213                                                                 </resource>
214                                                         </resources>
215                                                 </configuration>
216                                         </execution>
217                                         <execution>
218                                                 <id>copy-properties</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/opt/onap/ccsdk/data/properties</outputDirectory>
225                                                         <resources>
226                                                                 <resource>
227                                                                         <directory>./src/main/properties</directory>
228                                                                         <includes>
229                                                                                 <include>*.properties</include>
230                                                                                 <include>*.json</include>
231                                                                         </includes>
232                                                                         <filtering>false</filtering>
233                                                                 </resource>
234                                                         </resources>
235                                                 </configuration>
236                                         </execution>
237                                         <execution>
238                                                 <id>copy-keystores</id>
239                                                 <goals>
240                                                         <goal>copy-resources</goal>
241                                                 </goals><!-- here the phase you need -->
242                                                 <phase>validate</phase>
243                                                 <configuration>
244                                                         <outputDirectory>${basedir}/target/docker-stage/opt/onap/ccsdk/data/stores</outputDirectory>
245                                                         <resources>
246                                                                 <resource>
247                                                                         <directory>./src/main/stores</directory>
248                                                                         <includes>
249                                                                                 <include>*.jks</include>
250                                                                         </includes>
251                                                                         <filtering>false</filtering>
252                                                                 </resource>
253                                                         </resources>
254                                                 </configuration>
255                                         </execution>
256                                 </executions>
257                         </plugin>
258
259                         <plugin>
260                                 <groupId>org.codehaus.mojo</groupId>
261                                 <artifactId>exec-maven-plugin</artifactId>
262                                 <version>1.5.0</version>
263                                 <executions>
264
265                                         <execution>
266                                                 <id>change shell permissions</id>
267                                                 <phase>process-sources</phase>
268                                                 <goals>
269                                                         <goal>exec</goal>
270                                                 </goals>
271                                                 <configuration>
272                                                         <executable>/usr/bin/find</executable>
273                                                         <arguments>
274                                                                 <argument>${basedir}/target/docker-stage/opt/onap/ccsdk</argument>
275                                                                 <argument>-name</argument>
276                                                                 <argument>*.sh</argument>
277                                                                 <argument>-exec</argument>
278                                                                 <argument>chmod</argument>
279                                                                 <argument>+x</argument>
280                                                                 <argument>{}</argument>
281                                                                 <argument>;</argument>
282                                                         </arguments>
283                                                 </configuration>
284                                         </execution>
285                                 </executions>
286                         </plugin>
287
288                 </plugins>
289         </build>
290
291         <profiles>
292                 <profile>
293                         <id>docker</id>
294                         <build>
295                                 <plugins>
296                                         <plugin>
297                                                 <groupId>io.fabric8</groupId>
298                                                 <artifactId>docker-maven-plugin</artifactId>
299                                                 <version>0.28.0</version>
300                                                 <inherited>false</inherited>
301                                                 <configuration>
302                                                         <images>
303                                                                 <image>
304                                                                         <name>${image.name}</name>
305                                                                         <build>
306                                                                                 <cleanup>try</cleanup>
307                                                                                 <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
308                                                                                 <dockerFile>Dockerfile</dockerFile>
309                                                                                 <tags>
310                                                                                         <tag>${project.docker.latestminortag.version}</tag>
311                                                                                         <tag>${project.docker.latestfulltag.version}</tag>
312                                                                                         <tag>${project.docker.latesttagtimestamp.version}</tag>
313                                                                                 </tags>
314                                                                         </build>
315                                                                 </image>
316                                                         </images>
317                                                 </configuration>
318                                                 <executions>
319                                                         <execution>
320                                                                 <id>generate-images</id>
321                                                                 <phase>package</phase>
322                                                                 <goals>
323                                                                         <goal>build</goal>
324                                                                 </goals>
325                                                         </execution>
326
327                                                         <execution>
328                                                                 <id>push-images</id>
329                                                                 <phase>${docker.push.phase}</phase>
330                                                                 <goals>
331                                                                         <goal>build</goal>
332                                                                         <goal>push</goal>
333                                                                 </goals>
334                                                         </execution>
335                                                 </executions>
336                                         </plugin>
337
338                                 </plugins>
339                         </build>
340                 </profile>
341
342         </profiles>
343 </project>