Merge "INT-814 & 819 small, multi-cpu 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/maven-v4_0_0.xsd">
3
4         <parent>
5                 <groupId>org.onap.ccsdk.parent</groupId>
6                 <artifactId>odlparent-lite</artifactId>
7                 <version>1.2.1-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.5.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-image</image.name>
21                 <sdnc.project.version>${project.version}</sdnc.project.version>
22                 <sdnc.northbound.version>1.5.0-SNAPSHOT</sdnc.northbound.version>
23         <ccsdk.docker.version>0.4-STAGING-latest</ccsdk.docker.version>
24                 <docker.buildArg.https_proxy>${https_proxy}</docker.buildArg.https_proxy>
25                 <docker.push.phase>deploy</docker.push.phase>
26                 <docker.verbose>true</docker.verbose>
27                 <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
28         </properties>
29
30         <dependencies>
31                 <dependency>
32                         <groupId>org.onap.sdnc.northbound</groupId>
33                         <artifactId>generic-resource-api-installer</artifactId>
34                         <version>${sdnc.northbound.version}</version>
35                         <classifier>repo</classifier>
36                         <type>zip</type>
37                 </dependency>
38                 <dependency>
39                         <groupId>org.onap.sdnc.northbound</groupId>
40                         <artifactId>vnfapi-installer</artifactId>
41                         <version>${sdnc.northbound.version}</version>
42                         <classifier>repo</classifier>
43                         <type>zip</type>
44                 </dependency>
45                 <dependency>
46                         <groupId>org.onap.sdnc.northbound</groupId>
47                         <artifactId>vnftools-installer</artifactId>
48                         <version>${sdnc.northbound.version}</version>
49                         <classifier>repo</classifier>
50                         <type>zip</type>
51                 </dependency>
52                 <dependency>
53                         <groupId>org.onap.sdnc.northbound</groupId>
54                         <artifactId>sdnc-northbound-features-installer</artifactId>
55                         <version>${sdnc.northbound.version}</version>
56                         <classifier>repo</classifier>
57                         <type>zip</type>
58                 </dependency>
59         </dependencies>
60
61         <build>
62                 <plugins>
63
64
65                         <plugin>
66                                 <groupId>org.codehaus.groovy.maven</groupId>
67                                 <artifactId>gmaven-plugin</artifactId>
68                                 <executions>
69                                         <execution>
70                                                 <phase>validate</phase>
71                                                 <goals>
72                                                         <goal>execute</goal>
73                                                 </goals>
74                                                 <configuration>
75                                                         <source>
76                                                                 println project.properties['sdnc.project.version'];
77                                                                 def versionArray;
78                                                                 if ( project.properties['sdnc.project.version'] != null ) {
79                                                                    versionArray = project.properties['sdnc.project.version'].split('\\.');
80                                                                 }
81
82                                                                 if (project.properties['sdnc.project.version'].endsWith("-SNAPSHOT")) {
83                                                                     project.properties['project.docker.latesttag.version']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest";
84                                                                 } else {
85                                                                     project.properties['project.docker.latesttag.version']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest";
86                                                                 }
87
88                                                                 println 'New Tag for docker:' + project.properties['project.docker.latesttag.version'];
89                                                         </source>
90                                                 </configuration>
91                                         </execution>
92                                 </executions>
93                         </plugin>
94
95                         <plugin>
96                                 <groupId>io.fabric8</groupId>
97                                 <artifactId>docker-maven-plugin</artifactId>
98                                 <version>0.28.0</version>
99                                 <inherited>false</inherited>
100                                 <configuration>
101                                         <images>
102                                                 <image>
103                                                         <name>${image.name}</name>
104                                                         <build>
105                                                                 <cleanup>try</cleanup>
106                                                                 <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
107                                                                 <dockerFile>Dockerfile</dockerFile>
108                                                                 <tags>
109                                                                         <tag>${project.version}</tag>
110                                                                         <tag>${project.version}-STAGING-${maven.build.timestamp}</tag>
111                                                                         <tag>${project.docker.latesttag.version}</tag>
112                                                                 </tags>
113                                                         </build>
114                                                 </image>
115                                         </images>
116                                 </configuration>
117                                 <executions>
118                                         <execution>
119                                                 <id>generate-images</id>
120                                                 <phase>package</phase>
121                                                 <goals>
122                                                         <goal>build</goal>
123                                                 </goals>
124                                         </execution>
125
126                                         <execution>
127                                                 <id>push-images</id>
128                                                 <phase>${docker.push.phase}</phase>
129                                                 <goals>
130                                                         <goal>build</goal>
131                                                         <goal>push</goal>
132                                                 </goals>
133                                         </execution>
134                                 </executions>
135                         </plugin>
136
137
138
139                         <plugin>
140                                 <artifactId>maven-resources-plugin</artifactId>
141                                 <version>2.6</version>
142                                 <executions>
143                                         <execution>
144                                                 <id>copy-dockerfile</id>
145                                                 <goals>
146                                                         <goal>copy-resources</goal>
147                                                 </goals><!-- here the phase you need -->
148                                                 <phase>validate</phase>
149                                                 <configuration>
150                                                         <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
151                                                         <resources>
152                                                                 <resource>
153                                                                         <directory>src/main/docker</directory>
154                                                                         <includes>
155                                                                                 <include>Dockerfile</include>
156                                                                         </includes>
157                                                                         <filtering>true</filtering>
158                                                                 </resource>
159                                                         </resources>
160                                                 </configuration>
161                                         </execution>
162
163                                         <execution>
164                                                 <id>copy-scripts</id>
165                                                 <goals>
166                                                         <goal>copy-resources</goal>
167                                                 </goals><!-- here the phase you need -->
168                                                 <phase>validate</phase>
169                                                 <configuration>
170                                                         <outputDirectory>${basedir}/target/docker-stage/opt/onap/sdnc/bin</outputDirectory>
171                                                         <resources>
172                                                                 <resource>
173                                                                         <directory>src/main/scripts</directory>
174                                                                         <includes>
175                                                                                 <include>*.sh</include>
176                                                                         </includes>
177                                                                         <filtering>false</filtering>
178                                                                 </resource>
179                                                         </resources>
180                                                 </configuration>
181                                         </execution>
182
183                                         <execution>
184                                                 <id>copy-tarballs</id>
185                                                 <goals>
186                                                         <goal>copy-resources</goal>
187                                                 </goals><!-- here the phase you need -->
188                                                 <phase>validate</phase>
189                                                 <configuration>
190                                                         <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
191                                                         <resources>
192                                                                 <resource>
193                                                                         <directory>src/main/resources</directory>
194                                                                         <includes>
195                                                                                 <include>idmlight.db.mv.db</include>
196                                                                                 <include>AAF_RootCA.cer</include>
197                                                                                 <include>truststoreONAPall.jks</include>
198                                                                         </includes>
199                                                                         <filtering>false</filtering>
200                                                                 </resource>
201                                                         </resources>
202                                                 </configuration>
203                                         </execution>
204                                         <execution>
205                                                 <id>copy-data</id>
206                                                 <goals>
207                                                         <goal>copy-resources</goal>
208                                                 </goals><!-- here the phase you need -->
209                                                 <phase>validate</phase>
210                                                 <configuration>
211                                                         <outputDirectory>${basedir}/target/docker-stage/opt/onap/sdnc/data</outputDirectory>
212                                                         <resources>
213                                                                 <resource>
214                                                                         <directory>src/main/resources</directory>
215                                                                         <includes>
216                                                                                 <include>*.dump</include>
217                                                                         </includes>
218                                                                         <filtering>false</filtering>
219                                                                 </resource>
220                                                         </resources>
221                                                 </configuration>
222                                         </execution>
223                                         <execution>
224                                                 <id>copy-properties</id>
225                                                 <goals>
226                                                         <goal>copy-resources</goal>
227                                                 </goals><!-- here the phase you need -->
228                                                 <phase>validate</phase>
229                                                 <configuration>
230                                                         <outputDirectory>${basedir}/target/docker-stage/opt/onap/sdnc/data/properties</outputDirectory>
231                                                         <resources>
232                                                                 <resource>
233                                                                         <directory>../src/main/properties</directory>
234                                                                         <includes>
235                                                                                 <include>*.properties</include>
236                                                                         </includes>
237                                                                         <filtering>false</filtering>
238                                                                 </resource>
239                                                         </resources>
240                                                 </configuration>
241                                         </execution>
242                                         <execution>
243                                                 <id>copy-keystores</id>
244                                                 <goals>
245                                                         <goal>copy-resources</goal>
246                                                 </goals><!-- here the phase you need -->
247                                                 <phase>validate</phase>
248                                                 <configuration>
249                                                         <outputDirectory>${basedir}/target/docker-stage/opt/onap/sdnc/data/stores</outputDirectory>
250                                                         <resources>
251                                                                 <resource>
252                                                                         <directory>../src/main/stores</directory>
253                                                                         <includes>
254                                                                                 <include>*.jks</include>
255                                                                         </includes>
256                                                                         <filtering>false</filtering>
257                                                                 </resource>
258                                                         </resources>
259                                                 </configuration>
260                                         </execution>
261                                 </executions>
262                         </plugin>
263                         <plugin>
264                                 <groupId>org.apache.maven.plugins</groupId>
265                                 <artifactId>maven-dependency-plugin</artifactId>
266                                 <version>3.0.2</version>
267                                 <executions>
268                                         <execution>
269                                                 <id>unpack sdnc features</id>
270                                                 <phase>generate-sources</phase>
271                                                 <goals>
272                                                         <goal>unpack-dependencies</goal>
273                                                 </goals>
274                                                 <configuration>
275                                                         <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
276                                                         <excludeTransitive>true</excludeTransitive>
277                                                 </configuration>
278                                         </execution>
279                                         <execution>
280                                                 <id>unpack dgs</id>
281                                                 <phase>generate-sources</phase>
282                                                 <goals>
283                                                         <goal>unpack</goal>
284                                                 </goals>
285                                                 <configuration>
286                                                         <outputDirectory>${basedir}/target/docker-stage/opt/onap/sdnc</outputDirectory>
287                                                         <artifactItems>
288                                                                 <artifactItem>
289                                                                         <groupId>${project.groupId}</groupId>
290                                                                         <artifactId>platform-logic-installer</artifactId>
291                                                                         <version>${project.version}</version>
292                                                                         <type>zip</type>
293                                                                 </artifactItem>
294                                                         </artifactItems>
295                                                 </configuration>
296                                         </execution>
297                                 </executions>
298                         </plugin>
299                         <plugin>
300                                 <artifactId>exec-maven-plugin</artifactId>
301                                 <groupId>org.codehaus.mojo</groupId>
302                                 <version>1.5.0</version>
303                                 <executions>
304
305                                         <execution>
306                                                 <id>change shell permissions</id>
307                                                 <phase>process-sources</phase>
308                                                 <goals>
309                                                         <goal>exec</goal>
310                                                 </goals>
311                                                 <configuration>
312                                                         <executable>/usr/bin/find</executable>
313                                                         <arguments>
314                                                                 <argument>${basedir}/target/docker-stage/opt/onap/sdnc</argument>
315                                                                 <argument>-name</argument>
316                                                                 <argument>*.sh</argument>
317                                                                 <argument>-exec</argument>
318                                                                 <argument>chmod</argument>
319                                                                 <argument>+x</argument>
320                                                                 <argument>{}</argument>
321                                                                 <argument>;</argument>
322                                                         </arguments>
323                                                 </configuration>
324                                         </execution>
325                                 </executions>
326                         </plugin>
327
328
329                 </plugins>
330
331         </build>
332         <organization>
333                 <name>ONAP</name>
334         </organization>
335 </project>