Release nonrtric
[nonrtric.git] / sdnc-a1-controller / oam / installation / sdnc-a1 / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3   ============LICENSE_START=======================================================
4    Modifications Copyright (C) 2019 Nordix Foundation.
5   ================================================================================
6   Licensed under the Apache License, Version 2.0 (the "License");
7   you may not use this file except in compliance with the License.
8   You may obtain a copy of the License at
9
10        http://www.apache.org/licenses/LICENSE-2.0
11
12   Unless required by applicable law or agreed to in writing, software
13   distributed under the License is distributed on an "AS IS" BASIS,
14   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15   See the License for the specific language governing permissions and
16   limitations under the License.
17
18   SPDX-License-Identifier: Apache-2.0
19   ============LICENSE_END=========================================================
20 -->
21 <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">
22
23     <parent>
24         <groupId>org.onap.ccsdk.parent</groupId>
25         <artifactId>odlparent-lite</artifactId>
26         <version>1.5.1</version>
27     </parent>
28
29     <modelVersion>4.0.0</modelVersion>
30     <packaging>pom</packaging>
31     <groupId>org.o-ran-sc.nonrtric.sdnc-a1.oam</groupId>
32     <artifactId>installation-sdnc-a1</artifactId>
33     <version>2.0.0</version>
34
35     <name>sdnc-a1-oam :: installation :: ${project.artifactId}</name>
36     <description>Creates SDN Controller Docker container</description>
37
38     <properties>
39      <standalone.image.name>o-ran-sc/nonrtric-a1-controller</standalone.image.name>
40      <standalone.image.version>2.0.0</standalone.image.version>
41      <sdnc.project.version>${project.version}</sdnc.project.version>
42      <sdnc.build.timestamp>${maven.build.timestamp}</sdnc.build.timestamp>
43      <sdnc.northbound.version>2.0.0</sdnc.northbound.version>
44      <ccsdk.docker.version>0.7.0</ccsdk.docker.version>
45      <docker.push.phase>deploy</docker.push.phase>
46     </properties>
47
48     <dependencies>
49         <dependency>
50             <groupId>org.o-ran-sc.nonrtric.sdnc-a1.northbound</groupId>
51             <artifactId>nonrt-ric-api-installer</artifactId>
52             <version>${sdnc.northbound.version}</version>
53             <classifier>repo</classifier>
54             <type>zip</type>
55         </dependency>
56         <dependency>
57             <groupId>org.o-ran-sc.nonrtric.sdnc-a1.northbound</groupId>
58             <artifactId>sdnc-a1-northbound-features-installer</artifactId>
59             <version>${sdnc.northbound.version}</version>
60             <classifier>repo</classifier>
61             <type>zip</type>
62         </dependency>
63     </dependencies>
64
65     <build>
66         <plugins>
67
68             <plugin>
69                 <groupId>org.codehaus.groovy.maven</groupId>
70                 <artifactId>gmaven-plugin</artifactId>
71                 <executions>
72                     <execution>
73                         <phase>validate</phase>
74                         <goals>
75                             <goal>execute</goal>
76                         </goals>
77                         <configuration>
78                             <source>${basedir}/../TagVersion.groovy</source>
79                         </configuration>
80                     </execution>
81                 </executions>
82             </plugin>
83
84             <plugin>
85                 <groupId>io.fabric8</groupId>
86                 <artifactId>docker-maven-plugin</artifactId>
87                 <version>0.30.0</version>
88                 <inherited>false</inherited>
89                 <executions>
90                    <execution>
91                      <id>generate-standalone-images</id>
92                      <phase>package</phase>
93                      <goals>
94                       <goal>build</goal>
95                      </goals>
96                      <configuration>
97                       <images>
98                        <image>
99                         <name>${standalone.image.name}:${standalone.image.version}</name>
100                         <build>
101                          <cleanup>try</cleanup>
102                          <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
103                          <dockerFile>standalone.Dockerfile</dockerFile>
104                          <tags>
105                              <tag>${standalone.image.version}</tag>
106                          </tags>
107                         </build>
108                        </image>
109                       </images>
110                      </configuration>
111                    </execution>
112                    <execution>
113                      <id>push-standalone-images</id>
114                      <phase>${docker.push.phase}</phase>
115                      <goals>
116                       <goal>build</goal>
117                       <goal>push</goal>
118                      </goals>
119                      <configuration>
120                        <pushRegistry>${env.CONTAINER_PUSH_REGISTRY}</pushRegistry>
121                        <images>
122                         <image>
123                          <name>${standalone.image.name}:${standalone.image.version}</name>
124                          <build>
125                           <cleanup>try</cleanup>
126                           <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
127                           <dockerFile>standalone.Dockerfile</dockerFile>
128                           <tags>
129                              <tag>${standalone.image.version}</tag>
130                           </tags>
131                          </build>
132                         </image>
133                        </images>
134                      </configuration>
135                   </execution>
136                 </executions>
137             </plugin>
138             <plugin>
139                 <artifactId>maven-resources-plugin</artifactId>
140                 <version>2.6</version>
141                 <executions>
142                     <execution>
143                         <id>copy-dockerfile</id>
144                         <goals>
145                             <goal>copy-resources</goal>
146                         </goals><!-- here the phase you need -->
147                         <phase>validate</phase>
148                         <configuration>
149                             <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
150                             <resources>
151                                 <resource>
152                                     <directory>src/main/docker</directory>
153                                     <includes>
154                                         <include>standalone.Dockerfile</include>
155                                     </includes>
156                                     <filtering>true</filtering>
157                                 </resource>
158                             </resources>
159                         </configuration>
160                     </execution>
161                     <execution>
162                         <id>copy-scripts</id>
163                         <goals>
164                             <goal>copy-resources</goal>
165                         </goals><!-- here the phase you need -->
166                         <phase>validate</phase>
167                         <configuration>
168                             <outputDirectory>${basedir}/target/docker-stage/opt/onap/sdnc/bin</outputDirectory>
169                             <resources>
170                                 <resource>
171                                     <directory>src/main/scripts</directory>
172                                     <includes>
173                                         <include>*.py</include>
174                                         <include>*.sh</include>
175                                     </includes>
176                                     <filtering>false</filtering>
177                                 </resource>
178                             </resources>
179                         </configuration>
180                     </execution>
181                     <execution>
182                         <id>copy-tarballs</id>
183                         <goals>
184                             <goal>copy-resources</goal>
185                         </goals><!-- here the phase you need -->
186                         <phase>validate</phase>
187                         <configuration>
188                             <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
189                             <resources>
190                                 <resource>
191                                     <directory>src/main/resources</directory>
192                                     <includes>
193                                         <include>idmlight.db.mv.db</include>
194                                         <include>keystore.jks</include>
195                                         <include>aaa-app-config.xml</include>
196                                     </includes>
197                                     <filtering>false</filtering>
198                                 </resource>
199                             </resources>
200                         </configuration>
201                     </execution>
202                     <execution>
203                         <id>copy-data</id>
204                         <goals>
205                             <goal>copy-resources</goal>
206                         </goals><!-- here the phase you need -->
207                         <phase>validate</phase>
208                         <configuration>
209                             <outputDirectory>${basedir}/target/docker-stage/opt/onap/sdnc/data</outputDirectory>
210                             <resources>
211                                 <resource>
212                                     <directory>src/main/resources</directory>
213                                     <includes>
214                                         <include>*.dump</include>
215                                     </includes>
216                                     <filtering>false</filtering>
217                                 </resource>
218                             </resources>
219                         </configuration>
220                     </execution>
221                     <execution>
222                         <id>copy-properties</id>
223                         <goals>
224                             <goal>copy-resources</goal>
225                         </goals><!-- here the phase you need -->
226                         <phase>validate</phase>
227                         <configuration>
228                             <outputDirectory>${basedir}/target/docker-stage/opt/onap/sdnc/data/properties</outputDirectory>
229                             <resources>
230                                 <resource>
231                                     <directory>../src/main/properties</directory>
232                                     <includes>
233                                         <include>*.properties</include>
234                                         <include>*.props</include>
235                                         <include>*.csv</include>
236                                     </includes>
237                                     <filtering>false</filtering>
238                                 </resource>
239                             </resources>
240                         </configuration>
241                     </execution>
242                 </executions>
243             </plugin>
244             <plugin>
245                 <groupId>org.apache.maven.plugins</groupId>
246                 <artifactId>maven-dependency-plugin</artifactId>
247                 <version>3.0.2</version>
248                 <executions>
249                     <execution>
250                         <id>unpack sdnc features</id>
251                         <phase>generate-sources</phase>
252                         <goals>
253                             <goal>unpack-dependencies</goal>
254                         </goals>
255                         <configuration>
256                             <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
257                             <excludeTransitive>true</excludeTransitive>
258                         </configuration>
259                     </execution>
260                     <execution>
261                         <id>unpack dgs</id>
262                         <phase>generate-sources</phase>
263                         <goals>
264                             <goal>unpack</goal>
265                         </goals>
266                         <configuration>
267                             <outputDirectory>${basedir}/target/docker-stage/opt/onap/sdnc</outputDirectory>
268                             <artifactItems>
269                                 <artifactItem>
270                                     <groupId>${project.groupId}</groupId>
271                                     <artifactId>platform-logic-installer</artifactId>
272                                     <version>${project.version}</version>
273                                     <type>zip</type>
274                                 </artifactItem>
275                             </artifactItems>
276                         </configuration>
277                     </execution>
278                 </executions>
279             </plugin>
280             <plugin>
281                 <artifactId>exec-maven-plugin</artifactId>
282                 <groupId>org.codehaus.mojo</groupId>
283                 <version>1.5.0</version>
284                 <executions>
285                     <execution>
286                         <id>change shell permissions</id>
287                         <phase>process-sources</phase>
288                         <goals>
289                             <goal>exec</goal>
290                         </goals>
291                         <configuration>
292                             <executable>/usr/bin/find</executable>
293                             <arguments>
294                                 <argument>${basedir}/target/docker-stage/opt/onap/sdnc</argument>
295                                 <argument>-name</argument>
296                                 <argument>*.sh</argument>
297                                 <argument>-exec</argument>
298                                 <argument>chmod</argument>
299                                 <argument>+x</argument>
300                                 <argument>{}</argument>
301                                 <argument>;</argument>
302                             </arguments>
303                         </configuration>
304                     </execution>
305                 </executions>
306             </plugin>
307         </plugins>
308     </build>
309     <organization>
310         <name>ONAP</name>
311     </organization>
312 </project>