eb30b6bdad5647df53523fd45f79ac7c44462221
[nonrtric.git] / dmaap-mediator-producer / pom.xml
1 <!--
2   ============LICENSE_START=======================================================
3    Copyright (C) 2021 Nordix Foundation.
4   ================================================================================
5   Licensed under the Apache License, Version 2.0 (the "License");
6   you may not use this file except in compliance with the License.
7   You may obtain a copy of the License at
8
9        http://www.apache.org/licenses/LICENSE-2.0
10
11   Unless required by applicable law or agreed to in writing, software
12   distributed under the License is distributed on an "AS IS" BASIS,
13   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14   See the License for the specific language governing permissions and
15   limitations under the License.
16
17   SPDX-License-Identifier: Apache-2.0
18   ============LICENSE_END=========================================================
19 -->
20 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
21     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
22     <modelVersion>4.0.0</modelVersion>
23
24     <groupId>oransc.org</groupId>
25     <artifactId>dmaapmediatorproducer</artifactId>
26     <version>1.1.0</version>
27     <properties>
28         <docker-maven-plugin.version>0.30.0</docker-maven-plugin.version>
29     </properties>
30
31      <build>
32         <plugins>
33             <plugin>
34               <artifactId>exec-maven-plugin</artifactId>
35               <groupId>org.codehaus.mojo</groupId>
36               <executions>
37                   <execution>
38                       <id>Build Go binary</id>
39                       <phase>generate-sources</phase>
40                       <goals>
41                           <goal>exec</goal>
42                       </goals>
43                       <configuration>
44                           <executable>${basedir}/build_and_test.sh</executable>
45                       </configuration>
46                   </execution>
47               </executions>
48           </plugin>
49             <plugin>
50                 <groupId>io.fabric8</groupId>
51                 <artifactId>docker-maven-plugin</artifactId>
52                 <version>${docker-maven-plugin.version}</version>
53                 <inherited>false</inherited>
54                 <executions>
55                     <execution>
56                         <id>generate-nonrtric-dmaap-mediator-producer-image</id>
57                         <phase>package</phase>
58                         <goals>
59                             <goal>build</goal>
60                         </goals>
61                         <configuration>
62                             <pullRegistry>${env.CONTAINER_PULL_REGISTRY}</pullRegistry>
63                             <images>
64                                 <image>
65                                     <name>o-ran-sc/nonrtric-dmaap-mediator-producer:${project.version}</name>
66                                     <build>
67                                         <cleanup>try</cleanup>
68                                         <contextDir>${basedir}</contextDir>
69                                         <dockerFile>Dockerfile</dockerFile>
70                                         <args>
71                                             <JAR>${project.build.finalName}.jar</JAR>
72                                         </args>
73                                         <tags>
74                                             <tag>${project.version}</tag>
75                                         </tags>
76                                     </build>
77                                 </image>
78                             </images>
79                         </configuration>
80                     </execution>
81                     <execution>
82                         <id>push-nonrtric-dmaap-mediator-producer-image</id>
83                         <goals>
84                             <goal>build</goal>
85                             <goal>push</goal>
86                         </goals>
87                         <configuration>
88                             <pullRegistry>${env.CONTAINER_PULL_REGISTRY}</pullRegistry>
89                             <pushRegistry>${env.CONTAINER_PUSH_REGISTRY}</pushRegistry>
90                             <images>
91                                 <image>
92                                     <name>o-ran-sc/nonrtric-dmaap-mediator-producer:${project.version}</name>
93                                     <build>
94                                         <contextDir>${basedir}</contextDir>
95                                         <dockerFile>Dockerfile</dockerFile>
96                                         <args>
97                                             <JAR>${project.build.finalName}.jar</JAR>
98                                         </args>
99                                         <tags>
100                                             <tag>${project.version}</tag>
101                                             <tag>latest</tag>
102                                         </tags>
103                                     </build>
104                                 </image>
105                             </images>
106                         </configuration>
107                     </execution>
108                 </executions>
109             </plugin>
110       </plugins>
111     </build>
112 </project>