[RELEASE] Roll to 1.1.1-SNAPSHOT
[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"
3         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
4
5         <parent>
6                 <groupId>org.openecomp.sdnc.oam</groupId>
7                 <artifactId>installation</artifactId>
8                 <version>1.1.1-SNAPSHOT</version>
9         </parent>
10
11         <modelVersion>4.0.0</modelVersion>
12         <packaging>pom</packaging>
13         <groupId>org.openecomp.sdnc.oam</groupId>
14         <artifactId>installation-sdnc</artifactId>
15         <version>1.1.1-SNAPSHOT</version>
16
17         <name>Installation - sdnc</name>
18         <description>Creates SDN Controller Docker container</description>
19
20         <properties>
21                 <image.name>openecomp/sdnc-image</image.name>
22                 <sdnc.project.version>${project.version}</sdnc.project.version>
23                 <sdnc.core.version>${project.version}</sdnc.core.version>
24                 <sdnc.adaptors.version>${project.version}</sdnc.adaptors.version>
25                 <sdnc.northbound.version>${project.version}</sdnc.northbound.version>
26                 <sdnc.plugins.version>${project.version}</sdnc.plugins.version>
27         </properties>
28
29
30         <build>
31                 <plugins>
32
33
34                         <plugin>
35                                 <groupId>org.codehaus.groovy.maven</groupId>
36                                 <artifactId>gmaven-plugin</artifactId>
37                                 <executions>
38                                         <execution>
39                                                 <phase>validate</phase>
40                                                 <goals>
41                                                         <goal>execute</goal>
42                                                 </goals>
43                                                 <configuration>
44                                                         <source>
45                                                                 println project.properties['sdnc.project.version'];
46                                                                 def versionArray;
47                                                                 if ( project.properties['sdnc.project.version'] != null ) {
48                                                                         versionArray =
49                                                                         project.properties['sdnc.project.version'].split('\\.');
50                                                                 }
51
52                                                                 if (project.properties['sdnc.project.version'].endsWith("-SNAPSHOT")) {
53                                                                         project.properties['project.docker.latesttag.version']=versionArray[0] + '.' + versionArray[1] + "-SNAPSHOT-latest";
54                                                                 } else {
55                                                                         project.properties['project.docker.latesttag.version']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest";
56                                                                 }
57
58                                                                 println 'New Tag for docker:' +
59                                                                 project.properties['project.docker.latesttag.version'];
60                                                         </source>
61                                                 </configuration>
62                                         </execution>
63                                 </executions>
64                         </plugin>
65                         <plugin>
66                                 <groupId>io.fabric8</groupId>
67                                 <artifactId>docker-maven-plugin</artifactId>
68                                 <version>0.16.5</version>
69                                 <inherited>false</inherited>
70                                 <configuration>
71
72                                         <images>
73                                                 <image>
74                                                         <name>${image.name}</name>
75                                                         <build>
76                                                                 <cleanup>try</cleanup>
77                                                                 <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
78                                                                 <dockerFile>${basedir}/target/docker-stage/Dockerfile</dockerFile>
79                                                                 <tags>
80                                                                         <tag>${project.version}</tag>
81                                                                         <tag>${project.version}-STAGING-${maven.build.timestamp}</tag>
82                                                                         <tag>${project.docker.latesttag.version}</tag>
83                                                                 </tags>
84                                                         </build>
85                                                 </image>
86                                         </images>
87                                 </configuration>
88                                 <executions>
89                                         <execution>
90                                                 <id>generate-images</id>
91                                                 <phase>package</phase>
92                                                 <goals>
93                                                         <goal>build</goal>
94                                                 </goals>
95                                         </execution>
96
97                                         <execution>
98                                                 <id>push-images</id>
99                                                 <phase>deploy</phase>
100                                                 <goals>
101                                                         <goal>build</goal>
102                                                         <goal>push</goal>
103                                                 </goals>
104                                         </execution>
105                                 </executions>
106                         </plugin>
107
108
109                         <plugin>
110                                 <groupId>org.apache.maven.plugins</groupId>
111                                 <artifactId>maven-dependency-plugin</artifactId>
112                                 <version>3.0.0</version>
113                                 <executions>
114                                         <execution>
115                                                 <id>get-odl-distribution</id>
116                                                 <phase>validate</phase>
117                                                 <goals>
118                                                         <goal>copy</goal>
119                                                 </goals>
120                                                 <configuration>
121                                                         <artifactItems>
122                                                                 <artifactItem>
123                                                                         <groupId>org.opendaylight.integration</groupId>
124                                                                         <artifactId>distribution-karaf</artifactId>
125                                                                         <version>0.5.1-Boron-SR1</version>
126                                                                         <type>tar.gz</type>
127
128                                                                         <overWrite>true</overWrite>
129                                                                         <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
130                                                                 </artifactItem>
131                                                         </artifactItems>
132                                                         <overWriteReleases>false</overWriteReleases>
133                                                         <overWriteSnapshots>true</overWriteSnapshots>
134                                                         <overWriteIfNewer>true</overWriteIfNewer>
135                                                 </configuration>
136                                         </execution>
137                                 </executions>
138                         </plugin>
139
140                         <plugin>
141                                 <artifactId>maven-resources-plugin</artifactId>
142                                 <version>2.6</version>
143                                 <executions>
144                                         <execution>
145                                                 <id>copy-dockerfile</id>
146                                                 <goals>
147                                                         <goal>copy-resources</goal>
148                                                 </goals><!-- here the phase you need -->
149                                                 <phase>validate</phase>
150                                                 <configuration>
151                                                         <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
152                                                         <resources>
153                                                                 <resource>
154                                                                         <directory>src/main/docker</directory>
155                                                                         <includes>
156                                                                                 <include>Dockerfile</include>
157                                                                         </includes>
158                                                                         <filtering>true</filtering>
159                                                                 </resource>
160                                                         </resources>
161                                                 </configuration>
162                                         </execution>
163
164                                         <execution>
165                                                 <id>copy-scripts</id>
166                                                 <goals>
167                                                         <goal>copy-resources</goal>
168                                                 </goals><!-- here the phase you need -->
169                                                 <phase>validate</phase>
170                                                 <configuration>
171                                                         <outputDirectory>${basedir}/target/docker-stage/opt/openecomp/sdnc/bin</outputDirectory>
172                                                         <resources>
173                                                                 <resource>
174                                                                         <directory>src/main/scripts</directory>
175                                                                         <includes>
176                                                                                 <include>*.sh</include>
177                                                                         </includes>
178                                                                         <filtering>false</filtering>
179                                                                 </resource>
180                                                         </resources>
181                                                 </configuration>
182                                         </execution>
183
184                                         <execution>
185                                                 <id>copy-tarballs</id>
186                                                 <goals>
187                                                         <goal>copy-resources</goal>
188                                                 </goals><!-- here the phase you need -->
189                                                 <phase>validate</phase>
190                                                 <configuration>
191                                                         <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
192                                                         <resources>
193                                                                 <resource>
194                                                                         <directory>src/main/resources</directory>
195                                                                         <includes>
196                                                                                 <include>*.tgz</include>
197                                                                                 <include>idmlight.db.mv.db</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/openecomp/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/openecomp/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/openecomp/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                                 <artifactId>exec-maven-plugin</artifactId>
265                                 <groupId>org.codehaus.mojo</groupId>
266                                 <version>1.5.0</version>
267                                 <executions>
268
269                                         <execution>
270                                                 <id>Get features</id>
271                                                 <phase>generate-sources</phase>
272                                                 <goals>
273                                                         <goal>exec</goal>
274                                                 </goals>
275                                                 <configuration>
276                                                         <executable>/bin/bash</executable>
277                                                         <environmentVariables>
278                                                                 <SDNC_CORE_VERSION>${sdnc.core.version}</SDNC_CORE_VERSION>
279                                                                 <SDNC_ADAPTORS_VERSION>${sdnc.adaptors.version}</SDNC_ADAPTORS_VERSION>
280                                                                 <SDNC_NORTHBOUND_VERSION>${sdnc.northbound.version}</SDNC_NORTHBOUND_VERSION>
281                                                                 <SDNC_PLUGINS_VERSION>${sdnc.plugins.version}</SDNC_PLUGINS_VERSION>
282                                                                 <SDNC_OAM_VERSION>${project.version}</SDNC_OAM_VERSION>
283                                                         </environmentVariables>
284                                                         <arguments>
285                                                                 <argument>${basedir}/src/main/scripts/installZips.sh</argument>
286                                                                 <argument>${basedir}/target/docker-stage/opt/openecomp/sdnc</argument>
287                                                         </arguments>
288                                                 </configuration>
289                                         </execution>
290
291                                         <execution>
292                                                 <id>change shell permissions</id>
293                                                 <phase>process-sources</phase>
294                                                 <goals>
295                                                         <goal>exec</goal>
296                                                 </goals>
297                                                 <configuration>
298                                                         <executable>/usr/bin/find</executable>
299                                                         <arguments>
300                                                                 <argument>${basedir}/target/docker-stage/opt/openecomp/sdnc</argument>
301                                                                 <argument>-name</argument>
302                                                                 <argument>*.sh</argument>
303                                                                 <argument>-exec</argument>
304                                                                 <argument>chmod</argument>
305                                                                 <argument>+x</argument>
306                                                                 <argument>{}</argument>
307                                                                 <argument>;</argument>
308                                                         </arguments>
309                                                 </configuration>
310                                         </execution>
311                                 </executions>
312                         </plugin>
313
314
315                 </plugins>
316
317         </build>
318         <organization>
319                 <name>openECOMP</name>
320         </organization>
321 </project>