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