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