1f9442dcb4678395bbe97c71c06aee783f162070
[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"
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/maven-v4_0_0.xsd">
5
6         <parent>
7                 <groupId>org.onap.ccsdk.parent</groupId>
8                 <artifactId>odlparent-lite</artifactId>
9                 <version>1.1.2</version>
10         </parent>
11
12         <modelVersion>4.0.0</modelVersion>
13         <packaging>pom</packaging>
14         <groupId>org.onap.sdnc.oam</groupId>
15         <artifactId>installation-sdnc</artifactId>
16         <version>1.4.2-SNAPSHOT</version>
17
18         <name>sdnc-oam :: installation :: ${project.artifactId}</name>
19         <description>Creates SDN Controller Docker container</description>
20
21         <properties>
22                 <image.name>onap/sdnc-image</image.name>
23                 <sdnc.project.version>${project.version}</sdnc.project.version>
24                 <sdnc.northbound.version>1.4.2-SNAPSHOT</sdnc.northbound.version>
25                 <ccsdk.docker.version>0.3-STAGING-latest</ccsdk.docker.version>
26                 <sdnc.keystore>keystore.sdnc.p12</sdnc.keystore>
27                 <sdnc.keypass>onap3.0</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>
81                                                                 println project.properties['sdnc.project.version'];
82                                                                 def versionArray;
83                                                                 if ( project.properties['sdnc.project.version'] != null ) {
84                                                                     versionArray = project.properties['sdnc.project.version'].split('\\.');
85                                                                 }
86
87                                                                 if (project.properties['sdnc.project.version'].endsWith("-SNAPSHOT"))
88                                                                 {
89                                                                     project.properties['project.docker.latesttag.version']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest";
90                                                                 } else {
91                                                                     project.properties['project.docker.latesttag.version']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest";
92                                                                 }
93
94                                                                 println 'New Tag for docker:' + project.properties['project.docker.latesttag.version'];
95                                                         </source>
96                                                 </configuration>
97                                         </execution>
98                                 </executions>
99                         </plugin>
100
101                         <plugin>
102                                 <groupId>io.fabric8</groupId>
103                                 <artifactId>docker-maven-plugin</artifactId>
104                                 <version>0.16.5</version>
105                                 <inherited>false</inherited>
106                                 <configuration>
107                                         <images>
108                                                 <image>
109                                                         <name>${image.name}</name>
110                                                         <build>
111                                                                 <cleanup>try</cleanup>
112                                                                 <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
113                                                                 <dockerFile>${basedir}/target/docker-stage/Dockerfile</dockerFile>
114                                                                 <tags>
115                                                                         <tag>${project.version}</tag>
116                                                                         <tag>${project.version}-STAGING-${maven.build.timestamp}</tag>
117                                                                         <tag>${project.docker.latesttag.version}</tag>
118                                                                 </tags>
119                                                         </build>
120                                                 </image>
121                                         </images>
122                                 </configuration>
123                                 <executions>
124                                         <execution>
125                                                 <id>generate-images</id>
126                                                 <phase>package</phase>
127                                                 <goals>
128                                                         <goal>build</goal>
129                                                 </goals>
130                                         </execution>
131
132                                         <execution>
133                                                 <id>push-images</id>
134                                                 <phase>${docker.push.phase}</phase>
135                                                 <goals>
136                                                         <goal>build</goal>
137                                                         <goal>push</goal>
138                                                 </goals>
139                                         </execution>
140                                 </executions>
141                         </plugin>
142
143
144
145                         <plugin>
146                                 <artifactId>maven-resources-plugin</artifactId>
147                                 <version>2.6</version>
148                                 <executions>
149                                         <execution>
150                                                 <id>copy-dockerfile</id>
151                                                 <goals>
152                                                         <goal>copy-resources</goal>
153                                                 </goals><!-- here the phase you need -->
154                                                 <phase>validate</phase>
155                                                 <configuration>
156                                                         <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
157                                                         <resources>
158                                                                 <resource>
159                                                                         <directory>src/main/docker</directory>
160                                                                         <includes>
161                                                                                 <include>Dockerfile</include>
162                                                                         </includes>
163                                                                         <filtering>true</filtering>
164                                                                 </resource>
165                                                         </resources>
166                                                 </configuration>
167                                         </execution>
168
169                                         <execution>
170                                                 <id>copy-scripts</id>
171                                                 <goals>
172                                                         <goal>copy-resources</goal>
173                                                 </goals><!-- here the phase you need -->
174                                                 <phase>validate</phase>
175                                                 <configuration>
176                                                         <outputDirectory>${basedir}/target/docker-stage/opt/onap/sdnc/bin</outputDirectory>
177                                                         <resources>
178                                                                 <resource>
179                                                                         <directory>src/main/scripts</directory>
180                                                                         <includes>
181                                                                                 <include>*.sh</include>
182                                                                         </includes>
183                                                                         <filtering>false</filtering>
184                                                                 </resource>
185                                                         </resources>
186                                                 </configuration>
187                                         </execution>
188
189                                         <execution>
190                                                 <id>copy-tarballs</id>
191                                                 <goals>
192                                                         <goal>copy-resources</goal>
193                                                 </goals><!-- here the phase you need -->
194                                                 <phase>validate</phase>
195                                                 <configuration>
196                                                         <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
197                                                         <resources>
198                                                                 <resource>
199                                                                         <directory>src/main/resources</directory>
200                                                                         <includes>
201                                                                                 <include>idmlight.db.mv.db</include>
202                                                                                 <include>AAF_RootCA.cer</include>
203                                                                                 <include>truststoreONAPall.jks</include>
204                                                                         </includes>
205                                                                         <filtering>false</filtering>
206                                                                 </resource>
207                                                         </resources>
208                                                 </configuration>
209                                         </execution>
210                                         <execution>
211                                                 <id>copy-data</id>
212                                                 <goals>
213                                                         <goal>copy-resources</goal>
214                                                 </goals><!-- here the phase you need -->
215                                                 <phase>validate</phase>
216                                                 <configuration>
217                                                         <outputDirectory>${basedir}/target/docker-stage/opt/onap/sdnc/data</outputDirectory>
218                                                         <resources>
219                                                                 <resource>
220                                                                         <directory>src/main/resources</directory>
221                                                                         <includes>
222                                                                                 <include>*.dump</include>
223                                                                         </includes>
224                                                                         <filtering>false</filtering>
225                                                                 </resource>
226                                                         </resources>
227                                                 </configuration>
228                                         </execution>
229                                         <execution>
230                                                 <id>copy-properties</id>
231                                                 <goals>
232                                                         <goal>copy-resources</goal>
233                                                 </goals><!-- here the phase you need -->
234                                                 <phase>validate</phase>
235                                                 <configuration>
236                                                         <outputDirectory>${basedir}/target/docker-stage/opt/onap/sdnc/data/properties</outputDirectory>
237                                                         <resources>
238                                                                 <resource>
239                                                                         <directory>../src/main/properties</directory>
240                                                                         <includes>
241                                                                                 <include>*.properties</include>
242                                                                         </includes>
243                                                                         <filtering>false</filtering>
244                                                                 </resource>
245                                                         </resources>
246                                                 </configuration>
247                                         </execution>
248                                         <execution>
249                                                 <id>copy-keystores</id>
250                                                 <goals>
251                                                         <goal>copy-resources</goal>
252                                                 </goals><!-- here the phase you need -->
253                                                 <phase>validate</phase>
254                                                 <configuration>
255                                                         <outputDirectory>${basedir}/target/docker-stage/opt/onap/sdnc/data/stores</outputDirectory>
256                                                         <resources>
257                                                                 <resource>
258                                                                         <directory>../src/main/stores</directory>
259                                                                         <includes>
260                                                                                 <include>*.jks</include>
261                                                                         </includes>
262                                                                         <filtering>false</filtering>
263                                                                 </resource>
264                                                         </resources>
265                                                 </configuration>
266                                         </execution>
267                                 </executions>
268                         </plugin>
269                         <plugin>
270                                 <groupId>org.apache.maven.plugins</groupId>
271                                 <artifactId>maven-dependency-plugin</artifactId>
272                                 <version>3.0.2</version>
273                                 <executions>
274                                         <execution>
275                                                 <id>unpack sdnc features</id>
276                                                 <phase>generate-sources</phase>
277                                                 <goals>
278                                                         <goal>unpack-dependencies</goal>
279                                                 </goals>
280                                                 <configuration>
281                                                         <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
282                                                         <excludeTransitive>true</excludeTransitive>
283                                                 </configuration>
284                                         </execution>
285                                         <execution>
286                                                 <id>unpack dgs</id>
287                                                 <phase>generate-sources</phase>
288                                                 <goals>
289                                                         <goal>unpack</goal>
290                                                 </goals>
291                                                 <configuration>
292                                                         <outputDirectory>${basedir}/target/docker-stage/opt/onap/sdnc</outputDirectory>
293                                                         <artifactItems>
294                                                                 <artifactItem>
295                                                                         <groupId>${project.groupId}</groupId>
296                                                                         <artifactId>platform-logic-installer</artifactId>
297                                                                         <version>${project.version}</version>
298                                                                         <type>zip</type>
299                                                                 </artifactItem>
300                                                         </artifactItems>
301                                                 </configuration>
302                                         </execution>
303                                 </executions>
304                         </plugin>
305                         <plugin>
306                                 <artifactId>exec-maven-plugin</artifactId>
307                                 <groupId>org.codehaus.mojo</groupId>
308                                 <version>1.5.0</version>
309                                 <executions>
310
311                                         <execution>
312                                                 <id>change shell permissions</id>
313                                                 <phase>process-sources</phase>
314                                                 <goals>
315                                                         <goal>exec</goal>
316                                                 </goals>
317                                                 <configuration>
318                                                         <executable>/usr/bin/find</executable>
319                                                         <arguments>
320                                                                 <argument>${basedir}/target/docker-stage/opt/onap/sdnc</argument>
321                                                                 <argument>-name</argument>
322                                                                 <argument>*.sh</argument>
323                                                                 <argument>-exec</argument>
324                                                                 <argument>chmod</argument>
325                                                                 <argument>+x</argument>
326                                                                 <argument>{}</argument>
327                                                                 <argument>;</argument>
328                                                         </arguments>
329                                                 </configuration>
330                                         </execution>
331                                 </executions>
332                         </plugin>
333
334
335                 </plugins>
336
337         </build>
338         <organization>
339                 <name>ONAP</name>
340         </organization>
341 </project>