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