Add logic to delete resource also from AAI
[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.2.4</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.5.4-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         <sdnc.build.timestamp>${maven.build.timestamp}</sdnc.build.timestamp>
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>${basedir}/../TagVersion.groovy</source>
44                         </configuration>
45                     </execution>
46                 </executions>
47             </plugin>
48
49
50
51             <plugin>
52                 <artifactId>maven-resources-plugin</artifactId>
53                 <version>2.6</version>
54                 <executions>
55                     <execution>
56                         <id>copy-dockerfile</id>
57                         <goals>
58                             <goal>copy-resources</goal>
59                         </goals><!-- here the phase you need -->
60                         <phase>validate</phase>
61                         <configuration>
62                             <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
63                             <resources>
64                                 <resource>
65                                     <directory>src/main/docker</directory>
66                                     <includes>
67                                         <include>Dockerfile</include>
68                                     </includes>
69                                     <filtering>true</filtering>
70                                 </resource>
71                             </resources>
72                         </configuration>
73                     </execution>
74
75                     <execution>
76                         <id>copy-scripts</id>
77                         <goals>
78                             <goal>copy-resources</goal>
79                         </goals><!-- here the phase you need -->
80                         <phase>validate</phase>
81                         <configuration>
82                             <outputDirectory>${basedir}/target/docker-stage/opt/onap/sdnc/ueb-listener/bin</outputDirectory>
83                             <resources>
84                                 <resource>
85                                     <directory>src/main/scripts</directory>
86                                     <includes>
87                                         <include>*.sh</include>
88                                     </includes>
89                                     <filtering>false</filtering>
90                                 </resource>
91                             </resources>
92                         </configuration>
93                     </execution>
94
95                     <execution>
96                         <id>copy-properties</id>
97                         <goals>
98                             <goal>copy-resources</goal>
99                         </goals><!-- here the phase you need -->
100                         <phase>validate</phase>
101                         <configuration>
102                             <outputDirectory>${basedir}/target/docker-stage/opt/onap/sdnc/data/properties</outputDirectory>
103                             <resources>
104                                 <resource>
105                                     <directory>src/main/properties</directory>
106                                     <includes>
107                                         <include>*</include>
108                                     </includes>
109                                     <filtering>false</filtering>
110                                 </resource>
111                             </resources>
112                         </configuration>
113                     </execution>
114
115                 </executions>
116             </plugin>
117             <plugin>
118                 <groupId>org.apache.maven.plugins</groupId>
119                 <artifactId>maven-dependency-plugin</artifactId>
120                 <executions>
121                     <execution>
122                         <id>unpack</id>
123                         <goals>
124                             <goal>unpack</goal>
125                         </goals>
126                         <phase>initialize</phase>
127                         <configuration>
128                             <artifactItems>
129                                 <artifactItem>
130                                     <groupId>org.onap.ccsdk.sli.northbound</groupId>
131                                     <artifactId>ueb-listener</artifactId>
132                                     <type>zip</type>
133                                     <version>${ccsdk.sli.northbound.version}</version>
134                                 </artifactItem>
135                             </artifactItems>
136                             <outputDirectory>${basedir}/target/docker-stage/opt/onap/sdnc/ueb-listener</outputDirectory>
137                             <excludes>bin/**,**/*-javadoc.jar,**/*-sources.jar</excludes>
138                             <overWriteReleases>true</overWriteReleases>
139                             <overWriteSnapshots>true</overWriteSnapshots>
140                         </configuration>
141                     </execution>
142                 </executions>
143             </plugin>
144
145             <plugin>
146                 <artifactId>exec-maven-plugin</artifactId>
147                 <groupId>org.codehaus.mojo</groupId>
148                 <version>1.5.0</version>
149                 <executions>
150
151
152
153                     <execution>
154                         <id>change shell permissions</id>
155                         <phase>process-sources</phase>
156                         <goals>
157                             <goal>exec</goal>
158                         </goals>
159                         <configuration>
160                             <executable>/usr/bin/find</executable>
161                             <arguments>
162                                 <argument>${basedir}/target/docker-stage/opt/onap/sdnc</argument>
163                                 <argument>-name</argument>
164                                 <argument>*.sh</argument>
165                                 <argument>-exec</argument>
166                                 <argument>chmod</argument>
167                                 <argument>+x</argument>
168                                 <argument>{}</argument>
169                                 <argument>;</argument>
170                             </arguments>
171                         </configuration>
172                     </execution>
173                 </executions>
174             </plugin>
175         </plugins>
176
177     </build>
178
179     <profiles>
180         <profile>
181             <id>docker</id>
182             <build>
183                 <plugins>
184                     <plugin>
185                         <groupId>io.fabric8</groupId>
186                         <artifactId>docker-maven-plugin</artifactId>
187                         <version>0.28.0</version>
188                         <inherited>false</inherited>
189                         <configuration>
190                             <images>
191                                 <image>
192                                     <name>${image.name}</name>
193                                     <build>
194                                         <cleanup>try</cleanup>
195                                         <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
196                                         <dockerFile>Dockerfile</dockerFile>
197                                         <tags>
198                                             <tag>${project.docker.latestminortag.version}</tag>
199                                             <tag>${project.docker.latestfulltag.version}</tag>
200                                             <tag>${project.docker.latesttagtimestamp.version}</tag>
201                                         </tags>
202                                     </build>
203                                 </image>
204                             </images>
205                         </configuration>
206                         <executions>
207                             <execution>
208                                 <id>generate-images</id>
209                                 <phase>package</phase>
210                                 <goals>
211                                     <goal>build</goal>
212                                 </goals>
213                             </execution>
214
215                             <execution>
216                                 <id>push-images</id>
217                                 <!--<phase>deploy</phase> -->
218                                 <phase>${docker.push.phase}</phase>
219                                 <goals>
220                                     <goal>build</goal>
221                                     <goal>push</goal>
222                                 </goals>
223                             </execution>
224                         </executions>
225                     </plugin>
226                 </plugins>
227             </build>
228         </profile>
229     </profiles>
230     <organization>
231         <name>ONAP</name>
232     </organization>
233 </project>