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.1.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.1.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.1.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                          <contextDir>${basedir}/target/docker-stage</contextDir>
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                           <contextDir>${basedir}/target/docker-stage</contextDir>
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>*.jks</include>
194                                     </includes>
195                                     <filtering>false</filtering>
196                                 </resource>
197                             </resources>
198                         </configuration>
199                     </execution>
200                     <execution>
201                         <id>copy-data</id>
202                         <goals>
203                             <goal>copy-resources</goal>
204                         </goals><!-- here the phase you need -->
205                         <phase>validate</phase>
206                         <configuration>
207                             <outputDirectory>${basedir}/target/docker-stage/opt/onap/sdnc/data</outputDirectory>
208                             <resources>
209                                 <resource>
210                                     <directory>src/main/resources</directory>
211                                     <includes>
212                                         <include>*.dump</include>
213                                     </includes>
214                                     <filtering>false</filtering>
215                                 </resource>
216                             </resources>
217                         </configuration>
218                     </execution>
219                     <execution>
220                         <id>copy-properties</id>
221                         <goals>
222                             <goal>copy-resources</goal>
223                         </goals><!-- here the phase you need -->
224                         <phase>validate</phase>
225                         <configuration>
226                             <outputDirectory>${basedir}/target/docker-stage/opt/onap/sdnc/data/properties</outputDirectory>
227                             <resources>
228                                 <resource>
229                                     <directory>../src/main/properties</directory>
230                                     <includes>
231                                         <include>*.properties</include>
232                                         <include>*.props</include>
233                                         <include>*.csv</include>
234                                     </includes>
235                                     <filtering>false</filtering>
236                                 </resource>
237                             </resources>
238                         </configuration>
239                     </execution>
240                 </executions>
241             </plugin>
242             <plugin>
243                 <groupId>org.apache.maven.plugins</groupId>
244                 <artifactId>maven-dependency-plugin</artifactId>
245                 <version>3.0.2</version>
246                 <executions>
247                     <execution>
248                         <id>unpack sdnc features</id>
249                         <phase>generate-sources</phase>
250                         <goals>
251                             <goal>unpack-dependencies</goal>
252                         </goals>
253                         <configuration>
254                             <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
255                             <excludeTransitive>true</excludeTransitive>
256                         </configuration>
257                     </execution>
258                     <execution>
259                         <id>unpack dgs</id>
260                         <phase>generate-sources</phase>
261                         <goals>
262                             <goal>unpack</goal>
263                         </goals>
264                         <configuration>
265                             <outputDirectory>${basedir}/target/docker-stage/opt/onap/sdnc</outputDirectory>
266                             <artifactItems>
267                                 <artifactItem>
268                                     <groupId>${project.groupId}</groupId>
269                                     <artifactId>platform-logic-installer</artifactId>
270                                     <version>${project.version}</version>
271                                     <type>zip</type>
272                                 </artifactItem>
273                             </artifactItems>
274                         </configuration>
275                     </execution>
276                 </executions>
277             </plugin>
278             <plugin>
279                 <artifactId>exec-maven-plugin</artifactId>
280                 <groupId>org.codehaus.mojo</groupId>
281                 <version>1.5.0</version>
282                 <executions>
283                     <execution>
284                         <id>change shell permissions</id>
285                         <phase>process-sources</phase>
286                         <goals>
287                             <goal>exec</goal>
288                         </goals>
289                         <configuration>
290                             <executable>/usr/bin/find</executable>
291                             <arguments>
292                                 <argument>${basedir}/target/docker-stage/opt/onap/sdnc</argument>
293                                 <argument>-name</argument>
294                                 <argument>*.sh</argument>
295                                 <argument>-exec</argument>
296                                 <argument>chmod</argument>
297                                 <argument>+x</argument>
298                                 <argument>{}</argument>
299                                 <argument>;</argument>
300                             </arguments>
301                         </configuration>
302                     </execution>
303                 </executions>
304             </plugin>
305         </plugins>
306     </build>
307     <organization>
308         <name>ONAP</name>
309     </organization>
310 </project>