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