Bump minor version
[ccsdk/distribution.git] / odlsli / 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.onap.ccsdk.distribution</groupId>
7         <artifactId>distribution-root</artifactId>
8         <version>0.2.0-SNAPSHOT</version>
9     </parent>
10     <modelVersion>4.0.0</modelVersion>
11     <packaging>pom</packaging>
12     <artifactId>distribution-odlsli</artifactId>
13     <version>0.2.0-SNAPSHOT</version>
14
15     <name>Distribution - odlsli</name>
16     <description>Creates SDN Controller Docker container</description>
17
18     <properties>
19         <image.name>onap/ccsdk-odlsli-image</image.name>
20         <ccsdk.project.version>${project.version}</ccsdk.project.version>
21         <docker.buildArg.https_proxy>${https_proxy}</docker.buildArg.https_proxy>
22     </properties>
23
24
25     <build>
26         <plugins>
27
28
29             <plugin>
30                 <groupId>org.codehaus.groovy.maven</groupId>
31                 <artifactId>gmaven-plugin</artifactId>
32                 <executions>
33                     <execution>
34                         <phase>validate</phase>
35                         <goals>
36                             <goal>execute</goal>
37                         </goals>
38                         <configuration>
39                             <source>
40                                 println project.properties['ccsdk.project.version'];
41                                 def versionArray;
42                                 if ( project.properties['ccsdk.project.version'] != null ) {
43                                     versionArray = project.properties['ccsdk.project.version'].split('\\.');
44                                 }
45
46                                 if (project.properties['ccsdk.project.version'].endsWith("-SNAPSHOT"))
47                                 {
48                                     project.properties['project.docker.latesttag.version']=versionArray[0]  + '.' + versionArray[1] + "-STAGING-latest";
49                                 } else {
50                                     project.properties['project.docker.latesttag.version']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest";
51                                 }
52
53                                 println 'New Tag for docker:' +
54                                 project.properties['project.docker.latesttag.version'];
55                             </source>
56                         </configuration>
57                     </execution>
58                 </executions>
59             </plugin>
60
61
62
63             <plugin>
64                 <artifactId>maven-resources-plugin</artifactId>
65                 <version>2.6</version>
66                 <executions>
67                     <execution>
68                         <id>copy-dockerfile</id>
69                         <goals>
70                             <goal>copy-resources</goal>
71                         </goals><!-- here the phase you need -->
72                         <phase>validate</phase>
73                         <configuration>
74                             <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
75                             <resources>
76                                 <resource>
77                                     <directory>src/main/docker</directory>
78                                     <includes>
79                                         <include>Dockerfile</include>
80                                     </includes>
81                                     <filtering>true</filtering>
82                                 </resource>
83                             </resources>
84                         </configuration>
85                     </execution>
86
87                     <execution>
88                         <id>copy-scripts</id>
89                         <goals>
90                             <goal>copy-resources</goal>
91                         </goals><!-- here the phase you need -->
92                         <phase>validate</phase>
93                         <configuration>
94                             <outputDirectory>${basedir}/target/docker-stage/opt/onap/sdnc/bin</outputDirectory>
95                             <resources>
96                                 <resource>
97                                     <directory>src/main/scripts</directory>
98                                     <includes>
99                                         <include>*.sh</include>
100                                     </includes>
101                                     <filtering>false</filtering>
102                                 </resource>
103                             </resources>
104                         </configuration>
105                     </execution>
106
107                     <execution>
108                         <id>copy-tarballs</id>
109                         <goals>
110                             <goal>copy-resources</goal>
111                         </goals><!-- here the phase you need -->
112                         <phase>validate</phase>
113                         <configuration>
114                             <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
115                             <resources>
116                                 <resource>
117                                     <directory>src/main/resources</directory>
118                                     <includes>
119                                         <include>idmlight.db.mv.db</include>
120                                     </includes>
121                                     <filtering>false</filtering>
122                                 </resource>
123                             </resources>
124                         </configuration>
125                     </execution>
126                     <execution>
127                         <id>copy-config</id>
128                         <goals>
129                             <goal>copy-resources</goal>
130                         </goals><!-- here the phase you need -->
131                         <phase>validate</phase>
132                         <configuration>
133                             <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
134                             <resources>
135                                 <resource>
136                                     <directory>src/main/resources</directory>
137                                     <includes>
138                                         <include>org.ops4j.pax.logging.cfg</include>
139                                     </includes>
140                                     <filtering>false</filtering>
141                                 </resource>
142                             </resources>
143                         </configuration>
144                     </execution>
145                     <execution>
146                         <id>copy-data</id>
147                         <goals>
148                             <goal>copy-resources</goal>
149                         </goals><!-- here the phase you need -->
150                         <phase>validate</phase>
151                         <configuration>
152                             <outputDirectory>${basedir}/target/docker-stage/opt/onap/sdnc/data</outputDirectory>
153                             <resources>
154                                 <resource>
155                                     <directory>src/main/resources</directory>
156                                     <includes>
157                                         <include>*.dump</include>
158                                     </includes>
159                                     <filtering>false</filtering>
160                                 </resource>
161                             </resources>
162                         </configuration>
163                     </execution>
164                     <execution>
165                         <id>copy-properties</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/onap/sdnc/data/properties</outputDirectory>
172                             <resources>
173                                 <resource>
174                                     <directory>src/main/properties</directory>
175                                     <includes>
176                                         <include>*.properties</include>
177                                     </includes>
178                                     <filtering>false</filtering>
179                                 </resource>
180                             </resources>
181                         </configuration>
182                     </execution>
183                     <execution>
184                         <id>copy-keystores</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/opt/onap/sdnc/data/stores</outputDirectory>
191                             <resources>
192                                 <resource>
193                                     <directory>src/main/stores</directory>
194                                     <includes>
195                                         <include>*.jks</include>
196                                     </includes>
197                                     <filtering>false</filtering>
198                                 </resource>
199                             </resources>
200                         </configuration>
201                     </execution>
202                 </executions>
203             </plugin>
204             <plugin>
205                 <artifactId>exec-maven-plugin</artifactId>
206                 <groupId>org.codehaus.mojo</groupId>
207                 <version>1.5.0</version>
208                 <executions>
209
210                     <execution>
211                         <id>Get features</id>
212                         <phase>generate-sources</phase>
213                         <goals>
214                             <goal>exec</goal>
215                         </goals>
216                         <configuration>
217                             <executable>/bin/bash</executable>
218                             <environmentVariables>
219                                 <SDNC_CORE_VERSION>${ccsdk.sli.core.version}</SDNC_CORE_VERSION>
220                                 <SDNC_ADAPTORS_VERSION>${ccsdk.sli.adaptors.version}</SDNC_ADAPTORS_VERSION>
221                                 <SDNC_NORTHBOUND_VERSION>${ccsdk.sli.northbound.version}</SDNC_NORTHBOUND_VERSION>
222                                 <SDNC_PLUGINS_VERSION>${ccsdk.sli.plugins.version}</SDNC_PLUGINS_VERSION>
223                                 <SDNC_OAM_VERSION>${project.version}</SDNC_OAM_VERSION>
224                             </environmentVariables>
225                             <arguments>
226                                 <argument>${basedir}/src/main/scripts/installZips.sh</argument>
227                                 <argument>${basedir}/target/docker-stage/opt/onap/sdnc</argument>
228                             </arguments>
229                         </configuration>
230                     </execution>
231
232                     <execution>
233                         <id>change shell permissions</id>
234                         <phase>process-sources</phase>
235                         <goals>
236                             <goal>exec</goal>
237                         </goals>
238                         <configuration>
239                             <executable>/usr/bin/find</executable>
240                             <arguments>
241                                 <argument>${basedir}/target/docker-stage/opt/onap/sdnc</argument>
242                                 <argument>-name</argument>
243                                 <argument>*.sh</argument>
244                                 <argument>-exec</argument>
245                                 <argument>chmod</argument>
246                                 <argument>+x</argument>
247                                 <argument>{}</argument>
248                                 <argument>;</argument>
249                             </arguments>
250                         </configuration>
251                     </execution>
252                 </executions>
253             </plugin>
254
255
256         </plugins>
257
258     </build>
259
260     <profiles>
261         <profile>
262             <id>docker</id>
263             <build>
264                 <plugins>
265                     <plugin>
266                         <groupId>io.fabric8</groupId>
267                         <artifactId>docker-maven-plugin</artifactId>
268                         <version>0.16.5</version>
269                         <inherited>false</inherited>
270                         <configuration>
271                             <images>
272                                 <image>
273                                     <name>${image.name}</name>
274                                     <build>
275                                         <cleanup>try</cleanup>
276                                         <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
277                                         <dockerFile>${basedir}/target/docker-stage/Dockerfile</dockerFile>
278                                         <tags>
279                                             <tag>${project.version}</tag>
280                                             <tag>${project.version}-STAGING-${maven.build.timestamp}</tag>
281                                             <tag>${project.docker.latesttag.version}</tag>
282                                         </tags>
283                                     </build>
284                                 </image>
285                             </images>
286                         </configuration>
287                         <executions>
288                             <execution>
289                                 <id>generate-images</id>
290                                 <phase>package</phase>
291                                 <goals>
292                                     <goal>build</goal>
293                                 </goals>
294                             </execution>
295
296                             <execution>
297                                 <id>push-images</id>
298                                 <phase>deploy</phase>
299                                 <goals>
300                                     <goal>build</goal>
301                                     <goal>push</goal>
302                                 </goals>
303                             </execution>
304                         </executions>
305                     </plugin>
306                 </plugins>
307             </build>
308         </profile>
309     </profiles>
310     <organization>
311         <name>openECOMP</name>
312     </organization>
313 </project>