Release version 2.1.2 dockers and roll version
[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.1.3-SNAPSHOT</version>
9     </parent>
10
11     <groupId>org.onap.sdnc.oam</groupId>
12     <artifactId>installation-ueb-listener</artifactId>
13     <version>2.1.3-SNAPSHOT</version>
14     <packaging>pom</packaging>
15
16     <name>sdnc-oam :: installation :: ${project.artifactId}</name>
17     <description>Creates ueb-listener Docker container</description>
18     <organization>
19         <name>ONAP</name>
20     </organization>
21
22     <properties>
23         <image.name>onap/sdnc-ueb-listener-image</image.name>
24         <sdnc.project.version>${project.version}</sdnc.project.version>
25         <sdnc.build.timestamp>${maven.build.timestamp}</sdnc.build.timestamp>
26         <ccsdk.docker.version>1.1.1</ccsdk.docker.version>
27         <docker.buildArg.https_proxy>${https_proxy}</docker.buildArg.https_proxy>
28         <docker.push.phase>deploy</docker.push.phase>
29         <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
30     </properties>
31
32     <build>
33         <plugins>
34
35
36             <plugin>
37                 <groupId>org.codehaus.groovy.maven</groupId>
38                 <artifactId>gmaven-plugin</artifactId>
39                 <executions>
40                     <execution>
41                         <phase>validate</phase>
42                         <goals>
43                             <goal>execute</goal>
44                         </goals>
45                         <configuration>
46                             <source>${basedir}/../TagVersion.groovy</source>
47                         </configuration>
48                     </execution>
49                 </executions>
50             </plugin>
51
52
53
54             <plugin>
55                 <artifactId>maven-resources-plugin</artifactId>
56                 <version>2.6</version>
57                 <executions>
58                     <execution>
59                         <id>copy-dockerfile</id>
60                         <goals>
61                             <goal>copy-resources</goal>
62                         </goals><!-- here the phase you need -->
63                         <phase>validate</phase>
64                         <configuration>
65                             <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
66                             <resources>
67                                 <resource>
68                                     <directory>src/main/docker</directory>
69                                     <includes>
70                                         <include>Dockerfile</include>
71                                     </includes>
72                                     <filtering>true</filtering>
73                                 </resource>
74                             </resources>
75                         </configuration>
76                     </execution>
77
78                     <execution>
79                         <id>copy-scripts</id>
80                         <goals>
81                             <goal>copy-resources</goal>
82                         </goals><!-- here the phase you need -->
83                         <phase>validate</phase>
84                         <configuration>
85                             <outputDirectory>${basedir}/target/docker-stage/opt/onap/sdnc/ueb-listener/bin</outputDirectory>
86                             <resources>
87                                 <resource>
88                                     <directory>src/main/scripts</directory>
89                                     <includes>
90                                         <include>*.sh</include>
91                                     </includes>
92                                     <filtering>false</filtering>
93                                 </resource>
94                             </resources>
95                         </configuration>
96                     </execution>
97
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>false</filtering>
113                                 </resource>
114                             </resources>
115                         </configuration>
116                     </execution>
117
118                 </executions>
119             </plugin>
120             <plugin>
121                 <groupId>org.apache.maven.plugins</groupId>
122                 <artifactId>maven-dependency-plugin</artifactId>
123                 <executions>
124                     <execution>
125                         <id>unpack</id>
126                         <goals>
127                             <goal>unpack</goal>
128                         </goals>
129                         <phase>initialize</phase>
130                         <configuration>
131                             <artifactItems>
132                                 <artifactItem>
133                                     <groupId>org.onap.ccsdk.sli.northbound</groupId>
134                                     <artifactId>ueb-listener</artifactId>
135                                     <type>zip</type>
136                                     <version>${ccsdk.sli.northbound.version}</version>
137                                 </artifactItem>
138                             </artifactItems>
139                             <outputDirectory>${basedir}/target/docker-stage/opt/onap/sdnc/ueb-listener</outputDirectory>
140                             <excludes>bin/**,**/*-javadoc.jar,**/*-sources.jar</excludes>
141                             <overWriteReleases>true</overWriteReleases>
142                             <overWriteSnapshots>true</overWriteSnapshots>
143                         </configuration>
144                     </execution>
145                 </executions>
146             </plugin>
147
148             <plugin>
149                 <groupId>org.codehaus.mojo</groupId>
150                 <artifactId>exec-maven-plugin</artifactId>
151                 <version>1.5.0</version>
152                 <executions>
153
154
155
156                     <execution>
157                         <id>change shell permissions</id>
158                         <phase>process-sources</phase>
159                         <goals>
160                             <goal>exec</goal>
161                         </goals>
162                         <configuration>
163                             <executable>/usr/bin/find</executable>
164                             <arguments>
165                                 <argument>${basedir}/target/docker-stage/opt/onap/sdnc</argument>
166                                 <argument>-name</argument>
167                                 <argument>*.sh</argument>
168                                 <argument>-exec</argument>
169                                 <argument>chmod</argument>
170                                 <argument>+x</argument>
171                                 <argument>{}</argument>
172                                 <argument>;</argument>
173                             </arguments>
174                         </configuration>
175                     </execution>
176                 </executions>
177             </plugin>
178         </plugins>
179     </build>
180
181     <profiles>
182         <profile>
183             <id>docker</id>
184             <build>
185                 <plugins>
186                     <plugin>
187                         <groupId>io.fabric8</groupId>
188                         <artifactId>docker-maven-plugin</artifactId>
189                         <version>0.28.0</version>
190                         <inherited>false</inherited>
191                         <configuration>
192                             <images>
193                                 <image>
194                                     <name>${image.name}</name>
195                                     <build>
196                                         <cleanup>try</cleanup>
197                                         <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
198                                         <dockerFile>Dockerfile</dockerFile>
199                                         <tags>
200                                             <tag>${project.docker.latestminortag.version}</tag>
201                                             <tag>${project.docker.latestfulltag.version}</tag>
202                                             <tag>${project.docker.latesttagtimestamp.version}</tag>
203                                         </tags>
204                                     </build>
205                                 </image>
206                             </images>
207                         </configuration>
208                         <executions>
209                             <execution>
210                                 <id>generate-images</id>
211                                 <phase>package</phase>
212                                 <goals>
213                                     <goal>build</goal>
214                                 </goals>
215                             </execution>
216
217                             <execution>
218                                 <id>push-images</id>
219                                 <!--<phase>deploy</phase> -->
220                                 <phase>${docker.push.phase}</phase>
221                                 <goals>
222                                     <goal>build</goal>
223                                     <goal>push</goal>
224                                 </goals>
225                             </execution>
226                         </executions>
227                     </plugin>
228                 </plugins>
229             </build>
230         </profile>
231     </profiles>
232 </project>