fdff6698f630a63c092e7e3f985b63a9ff4ec0d7
[sdnc/oam.git] / installation / sdnc / 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" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
3
4     <parent>
5         <groupId>org.onap.ccsdk.parent</groupId>
6         <artifactId>odlparent-lite</artifactId>
7         <version>1.3.0-SNAPSHOT</version>
8     </parent>
9
10     <modelVersion>4.0.0</modelVersion>
11     <packaging>pom</packaging>
12     <groupId>org.onap.sdnc.oam</groupId>
13     <artifactId>installation-sdnc</artifactId>
14     <version>1.6.0-SNAPSHOT</version>
15
16     <name>sdnc-oam :: installation :: ${project.artifactId}</name>
17     <description>Creates SDN Controller Docker container</description>
18
19     <properties>
20         <image.name>onap/sdnc-aaf-image</image.name>
21         <standalone.image.name>onap/sdnc-image</standalone.image.name>
22         <sdnc.project.version>${project.version}</sdnc.project.version>
23         <sdnc.build.timestamp>${maven.build.timestamp}</sdnc.build.timestamp>
24         <sdnc.northbound.version>1.6.0-SNAPSHOT</sdnc.northbound.version>
25         <ccsdk.docker.version>0.5.0-STAGING-latest</ccsdk.docker.version>
26         <sdnc.keystore>org.onap.sdnc.p12</sdnc.keystore>
27         <sdnc.keypass><![CDATA[?w5&!M;8v1XF;:Xd;g*%S\$IY]]></sdnc.keypass>
28         <sdnc.secureport>8443</sdnc.secureport>
29         <docker.buildArg.https_proxy>${https_proxy}</docker.buildArg.https_proxy>
30         <docker.push.phase>deploy</docker.push.phase>
31         <docker.verbose>true</docker.verbose>
32         <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
33     </properties>
34
35     <dependencies>
36         <dependency>
37             <groupId>org.onap.sdnc.northbound</groupId>
38             <artifactId>generic-resource-api-installer</artifactId>
39             <version>${sdnc.northbound.version}</version>
40             <classifier>repo</classifier>
41             <type>zip</type>
42         </dependency>
43         <dependency>
44             <groupId>org.onap.sdnc.northbound</groupId>
45             <artifactId>vnfapi-installer</artifactId>
46             <version>${sdnc.northbound.version}</version>
47             <classifier>repo</classifier>
48             <type>zip</type>
49         </dependency>
50         <dependency>
51             <groupId>org.onap.sdnc.northbound</groupId>
52             <artifactId>vnftools-installer</artifactId>
53             <version>${sdnc.northbound.version}</version>
54             <classifier>repo</classifier>
55             <type>zip</type>
56         </dependency>
57         <dependency>
58             <groupId>org.onap.sdnc.northbound</groupId>
59             <artifactId>sdnc-northbound-features-installer</artifactId>
60             <version>${sdnc.northbound.version}</version>
61             <classifier>repo</classifier>
62             <type>zip</type>
63         </dependency>
64     </dependencies>
65
66     <build>
67         <plugins>
68
69
70             <plugin>
71                 <groupId>org.codehaus.groovy.maven</groupId>
72                 <artifactId>gmaven-plugin</artifactId>
73                 <executions>
74                     <execution>
75                         <phase>validate</phase>
76                         <goals>
77                             <goal>execute</goal>
78                         </goals>
79                         <configuration>
80                             <source>${basedir}/../TagVersion.groovy</source>
81                         </configuration>
82                     </execution>
83                 </executions>
84             </plugin>
85
86             <plugin>
87                 <groupId>io.fabric8</groupId>
88                 <artifactId>docker-maven-plugin</artifactId>
89                 <version>0.28.0</version>
90                 <inherited>false</inherited>
91                 <executions>
92                     <execution>
93                         <id>generate-images</id>
94                         <phase>package</phase>
95                         <goals>
96                             <goal>build</goal>
97                         </goals>
98                         <configuration>
99                            <images>
100                             <image>
101                              <name>${image.name}</name>
102                              <build>
103                               <cleanup>try</cleanup>
104                               <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
105                               <dockerFile>Dockerfile</dockerFile>
106                               <tags>
107                                  <tag>${project.docker.latestminortag.version}</tag>
108                                  <tag>${project.docker.latestfulltag.version}</tag>
109                                  <tag>${project.docker.latesttagtimestamp.version}</tag>
110                               </tags>
111                              </build>
112                             </image>
113                            </images>
114                           </configuration>
115                     </execution>
116                     <execution>
117                       <id>push-images</id>
118                       <phase>${docker.push.phase}</phase>
119                       <goals>
120                        <goal>build</goal>
121                        <goal>push</goal>
122                       </goals>
123                        <configuration>
124                         <images>
125                          <image>
126                           <name>${image.name}</name>
127                           <build>
128                            <cleanup>try</cleanup>
129                            <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
130                            <dockerFile>Dockerfile</dockerFile>
131                            <tags>
132                               <tag>${project.docker.latestminortag.version}</tag>
133                               <tag>${project.docker.latestfulltag.version}</tag>
134                               <tag>${project.docker.latesttagtimestamp.version}</tag>
135                            </tags>
136                           </build>
137                          </image>
138                         </images>
139                        </configuration>
140                    </execution>
141                    <execution>
142                      <id>generate-standalone-images</id>
143                      <phase>package</phase>
144                      <goals>
145                       <goal>build</goal>
146                      </goals>
147                      <configuration>
148                       <images>
149                        <image>
150                         <name>${standalone.image.name}</name>
151                         <build>
152                          <cleanup>try</cleanup>
153                          <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
154                          <dockerFile>standalone.Dockerfile</dockerFile>
155                          <tags>
156                              <tag>${project.docker.latestminortag.version}</tag>
157                              <tag>${project.docker.latestfulltag.version}</tag>
158                              <tag>${project.docker.latesttagtimestamp.version}</tag>
159                          </tags>
160                         </build>
161                        </image>
162                       </images>
163                      </configuration>
164                    </execution>
165                    <execution>
166                      <id>push-standalone-images</id>
167                      <phase>${docker.push.phase}</phase>
168                      <goals>
169                       <goal>build</goal>
170                       <goal>push</goal>
171                      </goals>
172                      <configuration>
173                        <images>
174                         <image>
175                          <name>${standalone.image.name}</name>
176                          <build>
177                           <cleanup>try</cleanup>
178                           <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
179                           <dockerFile>standalone.Dockerfile</dockerFile>
180                           <tags>
181                              <tag>${project.docker.latestminortag.version}</tag>
182                              <tag>${project.docker.latestfulltag.version}</tag>
183                              <tag>${project.docker.latesttagtimestamp.version}</tag>
184                           </tags>
185                          </build>
186                         </image>
187                        </images>
188                      </configuration>
189                   </execution>
190                 </executions>
191             </plugin>
192             <plugin>
193                 <artifactId>maven-resources-plugin</artifactId>
194                 <version>2.6</version>
195                 <executions>
196                     <execution>
197                         <id>copy-dockerfile</id>
198                         <goals>
199                             <goal>copy-resources</goal>
200                         </goals><!-- here the phase you need -->
201                         <phase>validate</phase>
202                         <configuration>
203                             <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
204                             <resources>
205                                 <resource>
206                                     <directory>src/main/docker</directory>
207                                     <includes>
208                                         <include>Dockerfile</include>
209                                         <include>standalone.Dockerfile</include>
210                                     </includes>
211                                     <filtering>true</filtering>
212                                 </resource>
213                             </resources>
214                         </configuration>
215                     </execution>
216                     <execution>
217                         <id>copy-scripts</id>
218                         <goals>
219                             <goal>copy-resources</goal>
220                         </goals><!-- here the phase you need -->
221                         <phase>validate</phase>
222                         <configuration>
223                             <outputDirectory>${basedir}/target/docker-stage/opt/onap/sdnc/bin</outputDirectory>
224                             <resources>
225                                 <resource>
226                                     <directory>src/main/scripts</directory>
227                                     <includes>
228                                         <include>*.py</include>
229                                         <include>*.sh</include>
230                                     </includes>
231                                     <filtering>false</filtering>
232                                 </resource>
233                             </resources>
234                         </configuration>
235                     </execution>
236                     <execution>
237                         <id>copy-tarballs</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</outputDirectory>
244                             <resources>
245                                 <resource>
246                                     <directory>src/main/resources</directory>
247                                     <includes>
248                                         <include>idmlight.db.mv.db</include>
249                                         <include>truststoreONAPall.jks</include>
250                                         <include>aaa-app-config.xml</include>
251                                     </includes>
252                                     <filtering>false</filtering>
253                                 </resource>
254                             </resources>
255                         </configuration>
256                     </execution>
257                     <execution>
258                         <id>copy-data</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/opt/onap/sdnc/data</outputDirectory>
265                             <resources>
266                                 <resource>
267                                     <directory>src/main/resources</directory>
268                                     <includes>
269                                         <include>*.dump</include>
270                                     </includes>
271                                     <filtering>false</filtering>
272                                 </resource>
273                             </resources>
274                         </configuration>
275                     </execution>
276                     <execution>
277                         <id>copy-properties</id>
278                         <goals>
279                             <goal>copy-resources</goal>
280                         </goals><!-- here the phase you need -->
281                         <phase>validate</phase>
282                         <configuration>
283                             <outputDirectory>${basedir}/target/docker-stage/opt/onap/sdnc/data/properties</outputDirectory>
284                             <resources>
285                                 <resource>
286                                     <directory>../src/main/properties</directory>
287                                     <includes>
288                                         <include>*.properties</include>
289                                         <include>*.props</include>
290                                         <include>*.csv</include>
291                                     </includes>
292                                     <filtering>false</filtering>
293                                 </resource>
294                             </resources>
295                         </configuration>
296                     </execution>
297                     <execution>
298                         <id>copy-keystores</id>
299                         <goals>
300                             <goal>copy-resources</goal>
301                         </goals><!-- here the phase you need -->
302                         <phase>validate</phase>
303                         <configuration>
304                             <outputDirectory>${basedir}/target/docker-stage/opt/onap/sdnc/data/stores</outputDirectory>
305                             <resources>
306                                 <resource>
307                                     <directory>../src/main/stores</directory>
308                                     <includes>
309                                         <include>*.jks</include>
310                                         <include>*.keyfile</include>
311                                         <include>*.p12</include>
312                                     </includes>
313                                     <filtering>false</filtering>
314                                 </resource>
315                             </resources>
316                         </configuration>
317                     </execution>
318                 </executions>
319             </plugin>
320             <plugin>
321                 <groupId>org.apache.maven.plugins</groupId>
322                 <artifactId>maven-dependency-plugin</artifactId>
323                 <version>3.0.2</version>
324                 <executions>
325                     <execution>
326                         <id>unpack sdnc features</id>
327                         <phase>generate-sources</phase>
328                         <goals>
329                             <goal>unpack-dependencies</goal>
330                         </goals>
331                         <configuration>
332                             <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
333                             <excludeTransitive>true</excludeTransitive>
334                         </configuration>
335                     </execution>
336                     <execution>
337                         <id>unpack dgs</id>
338                         <phase>generate-sources</phase>
339                         <goals>
340                             <goal>unpack</goal>
341                         </goals>
342                         <configuration>
343                             <outputDirectory>${basedir}/target/docker-stage/opt/onap/sdnc</outputDirectory>
344                             <artifactItems>
345                                 <artifactItem>
346                                     <groupId>${project.groupId}</groupId>
347                                     <artifactId>platform-logic-installer</artifactId>
348                                     <version>${project.version}</version>
349                                     <type>zip</type>
350                                 </artifactItem>
351                             </artifactItems>
352                         </configuration>
353                     </execution>
354                     <execution>
355                         <id>unpack migration utility</id>
356                         <phase>generate-sources</phase>
357                         <goals>
358                             <goal>unpack</goal>
359                         </goals>
360                         <configuration>
361                             <outputDirectory>${basedir}/target/docker-stage/opt/onap/sdnc/data-migrator</outputDirectory>
362                             <artifactItems>
363                                 <artifactItem>
364                                     <groupId>org.onap.sdnc.oam</groupId>
365                                     <artifactId>data-migrator</artifactId>
366                                     <version>1.5.1-SNAPSHOT</version>
367                                     <type>zip</type>
368                                 </artifactItem>
369                             </artifactItems>
370                         </configuration>
371                     </execution>
372                 </executions>
373             </plugin>
374             <plugin>
375                 <artifactId>exec-maven-plugin</artifactId>
376                 <groupId>org.codehaus.mojo</groupId>
377                 <version>1.5.0</version>
378                 <executions>
379                     <execution>
380                         <id>change shell permissions</id>
381                         <phase>process-sources</phase>
382                         <goals>
383                             <goal>exec</goal>
384                         </goals>
385                         <configuration>
386                             <executable>/usr/bin/find</executable>
387                             <arguments>
388                                 <argument>${basedir}/target/docker-stage/opt/onap/sdnc</argument>
389                                 <argument>-name</argument>
390                                 <argument>*.sh</argument>
391                                 <argument>-exec</argument>
392                                 <argument>chmod</argument>
393                                 <argument>+x</argument>
394                                 <argument>{}</argument>
395                                 <argument>;</argument>
396                             </arguments>
397                         </configuration>
398                     </execution>
399                 </executions>
400             </plugin>
401         </plugins>
402     </build>
403     <organization>
404         <name>ONAP</name>
405     </organization>
406 </project>