Merge "link the term memoization"
[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.ccsdk.parent</groupId>
7         <artifactId>odlparent-lite</artifactId>
8         <version>1.2.0-SNAPSHOT</version>
9     </parent>
10     <modelVersion>4.0.0</modelVersion>
11     <packaging>pom</packaging>
12     <groupId>org.onap.sdnc.oam</groupId>
13     <artifactId>installation-ueb-listener</artifactId>
14     <version>1.5.0-SNAPSHOT</version>
15
16     <name>sdnc-oam :: installation :: ${project.artifactId}</name>
17     <description>Creates ueb-listener Docker container</description>
18
19     <properties>
20         <image.name>onap/sdnc-ueb-listener-image</image.name>
21         <sdnc.project.version>${project.version}</sdnc.project.version>    
22         <ccsdk.docker.version>0.4-STAGING-latest</ccsdk.docker.version>
23         <docker.buildArg.https_proxy>${https_proxy}</docker.buildArg.https_proxy>
24             <docker.push.phase>deploy</docker.push.phase>
25         <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
26     </properties>
27
28
29     <build>
30         <plugins>
31
32
33             <plugin>
34                 <groupId>org.codehaus.groovy.maven</groupId>
35                 <artifactId>gmaven-plugin</artifactId>
36                 <executions>
37                     <execution>
38                         <phase>validate</phase>
39                         <goals>
40                             <goal>execute</goal>
41                         </goals>
42                         <configuration>
43                             <source>
44                                 println project.properties['sdnc.project.version'];
45                                 def versionArray;
46                                 if ( project.properties['sdnc.project.version'] != null ) {
47                                 versionArray = project.properties['sdnc.project.version'].split('\\.');
48                                 }
49
50                                 if (project.properties['sdnc.project.version'].endsWith("-SNAPSHOT"))
51                                 {
52                                 project.properties['project.docker.latesttag.version']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest";
53                                 } else {
54                                 project.properties['project.docker.latesttag.version']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest";
55                                 }
56
57                                 println 'New Tag for docker:' + 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>