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