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