Add missing ueb-listener docker container
[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.2.0-SNAPSHOT</version>
9     </parent>
10     <modelVersion>4.0.0</modelVersion>
11     <packaging>pom</packaging>
12     <artifactId>installation-ueb-listener</artifactId>
13     <version>1.2.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.project.version>0.1.0-SNAPSHOT</ccsdk.project.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.project.version}</version>
147                               </artifactItem>
148                             </artifactItems>
149                             <outputDirectory>${basedir}/target/docker-stage/opt/onap/sdnc/ueb-listener</outputDirectory>
150                             <excludes>bin/**</excludes>
151                             <overWriteReleases>true</overWriteReleases>
152                             <overWriteSnapshots>true</overWriteSnapshots>
153                         </configuration>
154                     </execution>
155                 </executions>
156             </plugin>
157
158
159         </plugins>
160
161     </build>
162
163     <profiles>
164         <profile>
165             <id>docker</id>
166             <build>
167                 <plugins>
168                     <plugin>
169                         <groupId>io.fabric8</groupId>
170                         <artifactId>docker-maven-plugin</artifactId>
171                         <version>0.16.5</version>
172                         <inherited>false</inherited>
173                         <configuration>
174                             <images>
175                                 <image>
176                                     <name>${image.name}</name>
177                                     <build>
178                                         <cleanup>try</cleanup>
179                                         <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
180                                         <dockerFile>${basedir}/target/docker-stage/Dockerfile</dockerFile>
181                                         <tags>
182                                             <tag>${project.version}</tag>
183                                             <tag>${project.version}-STAGING-${maven.build.timestamp}</tag>
184                                             <tag>${project.docker.latesttag.version}</tag>
185                                         </tags>
186                                     </build>
187                                 </image>
188                             </images>
189                         </configuration>
190                         <executions>
191                             <execution>
192                                 <id>generate-images</id>
193                                 <phase>package</phase>
194                                 <goals>
195                                     <goal>build</goal>
196                                 </goals>
197                             </execution>
198
199                             <execution>
200                                 <id>push-images</id>
201                                 <phase>deploy</phase>
202                                 <goals>
203                                     <goal>build</goal>
204                                     <goal>push</goal>
205                                 </goals>
206                             </execution>
207                         </executions>
208                     </plugin>
209                 </plugins>
210             </build>
211         </profile>
212     </profiles>
213     <organization>
214         <name>ONAP</name>
215     </organization>
216 </project>