Chore: Add gerrit maven verify GHA workflow
[sdnc/oam.git] / installation / dmaap-listener / 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" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3     <modelVersion>4.0.0</modelVersion>
4
5     <parent>
6         <groupId>org.onap.sdnc.oam</groupId>
7         <artifactId>installation</artifactId>
8         <version>2.7.0-SNAPSHOT</version>
9     </parent>
10
11     <artifactId>installation-dmaap-listener</artifactId>
12     <packaging>pom</packaging>
13
14     <name>sdnc-oam :: installation :: ${project.artifactId}</name>
15     <description>Creates dmaap-listener Docker container</description>
16     <organization>
17         <name>ONAP</name>
18     </organization>
19
20     <properties>
21         <image.name>onap/sdnc-dmaap-listener-image</image.name>
22         <sdnc.project.version>${project.version}</sdnc.project.version>
23         <sdnc.build.timestamp>${maven.build.timestamp}</sdnc.build.timestamp>
24         <ccsdk.docker.version>${ccsdk.docker.alpine.j11.version}</ccsdk.docker.version>
25         <docker.buildArg.https_proxy>${https_proxy}</docker.buildArg.https_proxy>
26         <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
27     </properties>
28
29     <dependencies>
30         <dependency>
31             <groupId>org.onap.ccsdk.sli.northbound</groupId>
32             <artifactId>dmaap-listener</artifactId>
33             <type>zip</type>
34             <version>${ccsdk.sli.northbound.version}</version>
35         </dependency>
36         <dependency>
37             <groupId>org.apache.logging.log4j</groupId>
38             <artifactId>log4j-core</artifactId>
39             <version>${log4j.version}</version>
40         </dependency>
41     </dependencies>
42
43     <build>
44         <plugins>
45             <plugin>
46                 <groupId>org.codehaus.gmaven</groupId>
47                 <artifactId>groovy-maven-plugin</artifactId>
48                 <version>2.1.1</version>
49                 <executions>
50                     <execution>
51                         <phase>validate</phase>
52                         <goals>
53                             <goal>execute</goal>
54                         </goals>
55                         <configuration>
56                             <source>${basedir}/../TagVersion.groovy</source>
57                         </configuration>
58                     </execution>
59                 </executions>
60             </plugin>
61             <plugin>
62                 <artifactId>maven-resources-plugin</artifactId>
63                 <version>2.6</version>
64                 <executions>
65                     <execution>
66                         <id>copy-dockerfile</id>
67                         <goals>
68                             <goal>copy-resources</goal>
69                         </goals><!-- here the phase you need -->
70                         <phase>validate</phase>
71                         <configuration>
72                             <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
73                             <resources>
74                                 <resource>
75                                     <directory>src/main/docker</directory>
76                                     <includes>
77                                         <include>Dockerfile</include>
78                                     </includes>
79                                     <filtering>true</filtering>
80                                 </resource>
81                             </resources>
82                         </configuration>
83                     </execution>
84                     <execution>
85                         <id>copy-scripts</id>
86                         <goals>
87                             <goal>copy-resources</goal>
88                         </goals><!-- here the phase you need -->
89                         <phase>validate</phase>
90                         <configuration>
91                             <outputDirectory>${basedir}/target/docker-stage/opt/onap/sdnc/dmaap-listener/bin</outputDirectory>
92                             <resources>
93                                 <resource>
94                                     <directory>src/main/scripts</directory>
95                                     <includes>
96                                         <include>*.sh</include>
97                                     </includes>
98                                     <filtering>true</filtering>
99                                 </resource>
100                             </resources>
101                         </configuration>
102                     </execution>
103                     <execution>
104                         <id>copy-properties</id>
105                         <goals>
106                             <goal>copy-resources</goal>
107                         </goals><!-- here the phase you need -->
108                         <phase>validate</phase>
109                         <configuration>
110                             <outputDirectory>${basedir}/target/docker-stage/opt/onap/sdnc/data/properties</outputDirectory>
111                             <resources>
112                                 <resource>
113                                     <directory>src/main/properties</directory>
114                                     <includes>
115                                         <include>*</include>
116                                     </includes>
117                                     <filtering>true</filtering>
118                                 </resource>
119                             </resources>
120                         </configuration>
121                     </execution>
122                 </executions>
123             </plugin>
124             <plugin>
125                 <groupId>org.apache.maven.plugins</groupId>
126                 <artifactId>maven-dependency-plugin</artifactId>
127                 <executions>
128                     <execution>
129                         <id>unpack</id>
130                         <goals>
131                             <goal>unpack-dependencies</goal>
132                         </goals>
133                         <phase>initialize</phase>
134                         <configuration>
135                             <outputDirectory>${basedir}/target/docker-stage/opt/onap/sdnc/dmaap-listener</outputDirectory>
136                             <excludes>bin/**,**/*-javadoc.jar,**/*-sources.jar</excludes>
137                             <overWriteReleases>true</overWriteReleases>
138                             <overWriteSnapshots>true</overWriteSnapshots>
139                         </configuration>
140                     </execution>
141                 </executions>
142             </plugin>
143             <plugin>
144                 <groupId>org.apache.maven.plugins</groupId>
145                 <artifactId>maven-antrun-plugin</artifactId>
146                 <version>1.8</version>
147                 <executions>
148                     <execution>
149                         <id>change-shell-permissions</id>
150                         <phase>process-sources</phase>
151                         <configuration>
152                             <target>
153                                 <chmod dir="${basedir}/target/docker-stage/opt/onap/sdnc" perm="+x" includes="**/*.sh"/>
154                             </target>
155                         </configuration>
156                         <goals>
157                             <goal>run</goal>
158                         </goals>
159                     </execution>
160                 </executions>
161             </plugin>
162         </plugins>
163     </build>
164
165     <profiles>
166         <profile>
167             <id>docker</id>
168             <build>
169                 <plugins>
170                     <plugin>
171                         <groupId>io.fabric8</groupId>
172                         <artifactId>docker-maven-plugin</artifactId>
173                         <version>0.34.0</version>
174                         <inherited>false</inherited>
175                         <configuration>
176                             <images>
177                                 <image>
178                                     <name>${image.name}</name>
179                                     <build>
180                                         <cleanup>try</cleanup>
181                                         <noCache>true</noCache>
182                                         <contextDir>${basedir}/target/docker-stage</contextDir>
183                                         <dockerFile>Dockerfile</dockerFile>
184                                         <tags>
185                                             <tag>${project.docker.latestminortag.version}</tag>
186                                             <tag>${project.docker.latestfulltag.version}</tag>
187                                             <tag>${project.docker.latesttagtimestamp.version}</tag>
188                                         </tags>
189                                     </build>
190                                 </image>
191                             </images>
192                             <verbose>${docker.verbose}</verbose>
193                             <skipPush>${docker.skip.push}</skipPush>
194                         </configuration>
195                         <executions>
196                             <execution>
197                                 <id>build-push-images</id>
198                                 <goals>
199                                     <goal>build</goal>
200                                     <goal>push</goal>
201                                 </goals>
202                             </execution>
203                         </executions>
204                     </plugin>
205                 </plugins>
206             </build>
207         </profile>
208     </profiles>
209 </project>