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