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