Bump minor 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"
3     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
4
5     <parent>
6         <groupId>org.onap.sdnc.oam</groupId>
7         <artifactId>installation</artifactId>
8         <version>1.3.0-SNAPSHOT</version>
9     </parent>
10     <modelVersion>4.0.0</modelVersion>
11     <packaging>pom</packaging>
12     <artifactId>installation-ueb-listener</artifactId>
13     <version>1.3.0-SNAPSHOT</version>
14
15     <name>Installation - ueb-listener</name>
16     <description>Creates ueb-listener Docker container</description>
17
18     <properties>
19         <image.name>onap/sdnc-ueb-listener-image</image.name>
20         <sdnc.project.version>${project.version}</sdnc.project.version>
21         <ccsdk.sli.northbound.version>0.2.0-SNAPSHOT</ccsdk.sli.northbound.version>
22         <docker.buildArg.https_proxy>${https_proxy}</docker.buildArg.https_proxy>
23     </properties>
24
25
26     <build>
27         <plugins>
28
29
30             <plugin>
31                 <groupId>org.codehaus.groovy.maven</groupId>
32                 <artifactId>gmaven-plugin</artifactId>
33                 <executions>
34                     <execution>
35                         <phase>validate</phase>
36                         <goals>
37                             <goal>execute</goal>
38                         </goals>
39                         <configuration>
40                             <source>
41                                 println project.properties['sdnc.project.version'];
42                                 def versionArray;
43                                 if ( project.properties['sdnc.project.version'] != null ) {
44                                     versionArray = project.properties['sdnc.project.version'].split('\\.');
45                                 }
46
47                                 if (project.properties['sdnc.project.version'].endsWith("-SNAPSHOT"))
48                                 {
49                                     project.properties['project.docker.latesttag.version']=versionArray[0]  + '.' + versionArray[1] + "-STAGING-latest";
50                                 } else {
51                                     project.properties['project.docker.latesttag.version']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest";
52                                 }
53
54                                 println 'New Tag for docker:' +
55                                 project.properties['project.docker.latesttag.version'];
56                             </source>
57                         </configuration>
58                     </execution>
59                 </executions>
60             </plugin>
61
62
63
64             <plugin>
65                 <artifactId>maven-resources-plugin</artifactId>
66                 <version>2.6</version>
67                 <executions>
68                     <execution>
69                         <id>copy-dockerfile</id>
70                         <goals>
71                             <goal>copy-resources</goal>
72                         </goals><!-- here the phase you need -->
73                         <phase>validate</phase>
74                         <configuration>
75                             <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
76                             <resources>
77                                 <resource>
78                                     <directory>src/main/docker</directory>
79                                     <includes>
80                                         <include>Dockerfile</include>
81                                     </includes>
82                                     <filtering>true</filtering>
83                                 </resource>
84                             </resources>
85                         </configuration>
86                     </execution>
87
88                     <execution>
89                         <id>copy-scripts</id>
90                         <goals>
91                             <goal>copy-resources</goal>
92                         </goals><!-- here the phase you need -->
93                         <phase>validate</phase>
94                         <configuration>
95                             <outputDirectory>${basedir}/target/docker-stage/opt/onap/sdnc/ueb-listener/bin</outputDirectory>
96                             <resources>
97                                 <resource>
98                                     <directory>src/main/scripts</directory>
99                                     <includes>
100                                         <include>*.sh</include>
101                                     </includes>
102                                     <filtering>false</filtering>
103                                 </resource>
104                             </resources>
105                         </configuration>
106                     </execution>
107
108                     <execution>
109                         <id>copy-properties</id>
110                         <goals>
111                             <goal>copy-resources</goal>
112                         </goals><!-- here the phase you need -->
113                         <phase>validate</phase>
114                         <configuration>
115                             <outputDirectory>${basedir}/target/docker-stage/opt/onap/sdnc/data/properties</outputDirectory>
116                             <resources>
117                                 <resource>
118                                     <directory>src/main/properties</directory>
119                                     <includes>
120                                         <include>*</include>
121                                     </includes>
122                                     <filtering>false</filtering>
123                                 </resource>
124                             </resources>
125                         </configuration>
126                     </execution>
127
128                 </executions>
129             </plugin>
130             <plugin>
131                 <groupId>org.apache.maven.plugins</groupId>
132                 <artifactId>maven-dependency-plugin</artifactId>
133                 <executions>
134                     <execution>
135                         <id>unpack</id>
136                         <goals>
137                             <goal>unpack</goal>
138                         </goals>
139                         <phase>initialize</phase>
140                         <configuration>
141                             <artifactItems>
142                               <artifactItem>
143                                 <groupId>org.onap.ccsdk.sli.northbound</groupId>
144                                 <artifactId>ueb-listener</artifactId>
145                                 <type>zip</type>
146                                 <version>${ccsdk.sli.northbound.version}</version>
147                               </artifactItem>
148                             </artifactItems>
149                             <outputDirectory>${basedir}/target/docker-stage/opt/onap/sdnc/ueb-listener</outputDirectory>
150                             <excludes>bin/**,**/*-javadoc.jar,**/*-sources.jar</excludes>
151                             <overWriteReleases>true</overWriteReleases>
152                             <overWriteSnapshots>true</overWriteSnapshots>
153                         </configuration>
154                     </execution>
155                 </executions>
156             </plugin>
157
158             <plugin>
159                 <artifactId>exec-maven-plugin</artifactId>
160                 <groupId>org.codehaus.mojo</groupId>
161                 <version>1.5.0</version>
162                 <executions>
163
164
165
166                     <execution>
167                         <id>change shell permissions</id>
168                         <phase>process-sources</phase>
169                         <goals>
170                             <goal>exec</goal>
171                         </goals>
172                         <configuration>
173                             <executable>/usr/bin/find</executable>
174                             <arguments>
175                                 <argument>${basedir}/target/docker-stage/opt/onap/sdnc</argument>
176                                 <argument>-name</argument>
177                                 <argument>*.sh</argument>
178                                 <argument>-exec</argument>
179                                 <argument>chmod</argument>
180                                 <argument>+x</argument>
181                                 <argument>{}</argument>
182                                 <argument>;</argument>
183                             </arguments>
184                         </configuration>
185                     </execution>
186                 </executions>
187             </plugin>
188         </plugins>
189
190     </build>
191
192     <profiles>
193         <profile>
194             <id>docker</id>
195             <build>
196                 <plugins>
197                     <plugin>
198                         <groupId>io.fabric8</groupId>
199                         <artifactId>docker-maven-plugin</artifactId>
200                         <version>0.16.5</version>
201                         <inherited>false</inherited>
202                         <configuration>
203                             <images>
204                                 <image>
205                                     <name>${image.name}</name>
206                                     <build>
207                                         <cleanup>try</cleanup>
208                                         <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
209                                         <dockerFile>${basedir}/target/docker-stage/Dockerfile</dockerFile>
210                                         <tags>
211                                             <tag>${project.version}</tag>
212                                             <tag>${project.version}-STAGING-${maven.build.timestamp}</tag>
213                                             <tag>${project.docker.latesttag.version}</tag>
214                                         </tags>
215                                     </build>
216                                 </image>
217                             </images>
218                         </configuration>
219                         <executions>
220                             <execution>
221                                 <id>generate-images</id>
222                                 <phase>package</phase>
223                                 <goals>
224                                     <goal>build</goal>
225                                 </goals>
226                             </execution>
227
228                             <execution>
229                                 <id>push-images</id>
230                                 <phase>deploy</phase>
231                                 <goals>
232                                     <goal>build</goal>
233                                     <goal>push</goal>
234                                 </goals>
235                             </execution>
236                         </executions>
237                     </plugin>
238                 </plugins>
239             </build>
240         </profile>
241     </profiles>
242     <organization>
243         <name>ONAP</name>
244     </organization>
245 </project>