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