update docker plugin version
[dcaegen2/services/mapper.git] / UniversalVesAdapter / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!-- * ============LICENSE_START======================================================= 
3         * ONAP : DCAEGEN2/services/mapper * ================================================================================ 
4         * Copyright 2018 TechMahindra *================================================================================= 
5         * Licensed under the Apache License, Version 2.0 (the "License"); * you may 
6         not use this file except in compliance with the License. * You may obtain 
7         a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * 
8         * Unless required by applicable law or agreed to in writing, software * distributed 
9         under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES 
10         OR CONDITIONS OF ANY KIND, either express or implied. * See the License for 
11         the specific language governing permissions and * limitations under the License. 
12         * ============LICENSE_END========================================================= -->
13 <project xmlns="http://maven.apache.org/POM/4.0.0"
14         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
15         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
16         <modelVersion>4.0.0</modelVersion>
17
18         <groupId>org.onap.dcaegen2.services.mapper.vesadapter</groupId>
19         <artifactId>UniversalVesAdapter</artifactId>
20         <version>0.0.1-SNAPSHOT</version>
21
22
23         <parent>
24                 <groupId>org.onap.dcaegen2.services.mapper</groupId>
25                 <artifactId>mapper</artifactId>
26                 <version>0.0.1-SNAPSHOT</version>
27         </parent>
28
29         <properties>
30
31                 <!-- PROJECT SETTINGS -->
32                 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
33                 <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
34                 <java.version>8</java.version>
35                 <docker.image.name>onap/org.onap.dcaegen2.services.mapper.vesadapter.universalvesadaptor</docker.image.name>
36
37                 <!-- PLUGIN SETTINGS -->
38                 <dependency.locations.enabled>false</dependency.locations.enabled>
39
40                 <!-- NEXUS RELATED SETTINGS -->
41                 <nexusproxy>https://nexus.onap.org</nexusproxy>
42                 <snapshots.path>content/repositories/snapshots/</snapshots.path>
43                 <releases.path>content/repositories/releases/</releases.path>
44                 <site.path>
45             content/sites/site/org/onap/dcaegen2/services/mapper/${project.artifactId}/${project.version}
46         </site.path>
47                 <maven.build.timestamp.format>yyyyMMdd'T'HHmmss</maven.build.timestamp.format>
48
49         </properties>
50         <dependencies>
51                 <dependency>
52                         <groupId>com.google.guava</groupId>
53                         <artifactId>guava</artifactId>
54                 </dependency>
55                 <dependency>
56                         <groupId>commons-configuration</groupId>
57                         <artifactId>commons-configuration</artifactId>
58                         <version>1.10</version>
59                 </dependency>
60                 <dependency>
61                         <groupId>com.google.code.gson</groupId>
62                         <artifactId>gson</artifactId>
63                         <version>2.8.5</version>
64                 </dependency>
65                 <dependency>
66                         <groupId>com.google.inject</groupId>
67                         <artifactId>guice</artifactId>
68                         <version>4.2.0</version>
69                 </dependency>
70                 <dependency>
71                         <groupId>org.apache.commons</groupId>
72                         <artifactId>commons-lang3</artifactId>
73                         <version>3.5</version>
74                 </dependency>
75                 <dependency>
76                         <groupId>com.google.inject.extensions</groupId>
77                         <artifactId>guice-assistedinject</artifactId>
78                         <version>4.2.0</version>
79                 </dependency>
80                 <dependency>
81                         <groupId>org.milyn</groupId>
82                         <artifactId>milyn-smooks-all</artifactId>
83                         <version>1.7.0</version>
84                         <exclusions>
85                                 <exclusion>
86                                         <groupId>javax.servlet</groupId>
87                                         <artifactId>servlet-api</artifactId>
88                                 </exclusion>
89                         </exclusions>
90                 </dependency>
91                 <dependency>
92                         <groupId>org.onap.dmaap.messagerouter.dmaapclient</groupId>
93                         <artifactId>dmaapClient</artifactId>
94                         <version>1.1.3</version>
95                 </dependency>
96                 <!-- Database dependency -->
97                 <dependency>
98                         <groupId>org.postgresql</groupId>
99                         <artifactId>postgresql</artifactId>
100                         <version>42.2.4</version>
101                 </dependency>
102                 <dependency>
103                         <groupId>org.springframework</groupId>
104                         <artifactId>spring-jdbc</artifactId>
105                         <version>5.0.7.RELEASE</version>
106                 </dependency>
107                 <dependency>
108                         <groupId>org.springframework.boot</groupId>
109                         <artifactId>spring-boot-starter-web</artifactId>
110                         <version>2.0.4.RELEASE</version>
111                 </dependency>
112                 <dependency>
113                         <groupId>org.springframework.boot</groupId>
114                         <artifactId>spring-boot-starter-test</artifactId>
115                         <version>2.0.3.RELEASE</version>
116                         <scope>test</scope>
117                 </dependency>
118                 <dependency>
119                         <groupId>org.springframework.data</groupId>
120                         <artifactId>spring-data-commons</artifactId>
121                         <version>2.0.8.RELEASE</version>
122                 </dependency>
123                 <!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-api -->
124                 <dependency>
125                     <groupId>org.slf4j</groupId>
126                     <artifactId>slf4j-api</artifactId>
127                     <version>1.7.25</version>
128                 </dependency>
129                 <dependency>
130                         <groupId>org.codehaus.groovy</groupId>
131                         <artifactId>groovy-all</artifactId>
132                         <version>2.4.14</version>
133                 </dependency>
134                 <dependency>
135                         <groupId>com.jayway.jsonpath</groupId>
136                         <artifactId>json-path</artifactId>
137                         <version>2.4.0</version>
138                         <scope>test</scope>
139                 </dependency>
140                 <dependency>
141                         <groupId>com.fasterxml.jackson.core</groupId>
142                         <artifactId>jackson-databind</artifactId>
143                         <version>2.9.6</version>
144                 </dependency>
145                 <dependency>
146                         <groupId>hsqldb</groupId>
147                         <artifactId>hsqldb</artifactId>
148                         <version>1.8.0.10</version>
149                         <scope>test</scope>
150                 </dependency>
151                 <!-- https://mvnrepository.com/artifact/xalan/xalan -->
152                 <dependency>
153                         <groupId>xalan</groupId>
154                         <artifactId>xalan</artifactId>
155                         <version>2.7.2</version>
156                 </dependency>
157                 <!-- https://mvnrepository.com/artifact/xerces/xercesImpl -->
158                 <dependency>
159                         <groupId>xerces</groupId>
160                         <artifactId>xercesImpl</artifactId>
161                         <version>2.12.0</version>
162                 </dependency>
163                 <!-- https://mvnrepository.com/artifact/com.thoughtworks.xstream/xstream -->
164                 <dependency>
165                         <groupId>com.thoughtworks.xstream</groupId>
166                         <artifactId>xstream</artifactId>
167                         <version>1.4.10</version>
168                 </dependency>
169                 <!-- https://mvnrepository.com/artifact/xml-apis/xml-apis -->
170                 <dependency>
171                         <groupId>xml-apis</groupId>
172                         <artifactId>xml-apis</artifactId>
173                         <version>1.4.01</version>
174                 </dependency>
175                 <!-- http client -->
176                 <dependency>
177                         <groupId>org.apache.httpcomponents</groupId>
178                         <artifactId>httpclient</artifactId>
179                         <version>${httpclient.version}</version>
180                         <scope>compile</scope>
181                 </dependency>
182                 <dependency>
183                         <groupId>org.apache.httpcomponents</groupId>
184                         <artifactId>httpmime</artifactId>
185                         <version>${httpclient.version}</version>
186                         <scope>compile</scope>
187                 </dependency>
188                 <!-- <dependency> <groupId>org.onap.aai.event-client</groupId> <artifactId>event-client-dmaap</artifactId> 
189                         <version>1.2.0</version> </dependency> -->
190                 <dependency>
191                         <groupId>org.springframework.boot</groupId>
192                         <artifactId>spring-boot-configuration-processor</artifactId>
193                         <optional>true</optional>
194                         <version>2.0.4.RELEASE</version>
195                 </dependency>
196         </dependencies>
197
198         <build>
199                 <pluginManagement>
200                         <plugins>
201                                 <plugin>
202                                         <artifactId>maven-assembly-plugin</artifactId>
203                                         <version>3.1.0</version>
204                                 </plugin>
205                                 <plugin>
206                                         <groupId>com.spotify</groupId>
207                                         <artifactId>docker-maven-plugin</artifactId>
208                                         <version>1.0.0</version>
209                                 </plugin>
210                         </plugins>
211                 </pluginManagement>
212                 <plugins>
213                         <!-- <plugin>
214                                 <groupId>org.apache.maven.plugins</groupId>
215                                 <artifactId>maven-surefire-plugin</artifactId>
216                                 <configuration>
217                                         <reuseForks>false</reuseForks>
218                                         <forkCount>1</forkCount>
219                                 </configuration>
220                         </plugin> -->
221                         <plugin>
222                                 <artifactId>maven-assembly-plugin</artifactId>
223                                 <configuration>
224                                         <descriptors>
225                                                 <descriptor>src/assembly/dep.xml</descriptor>
226                                         </descriptors>
227                                         <attach>false</attach>
228                                         <appendAssemblyId>false</appendAssemblyId>
229                                         <updateOnly>true</updateOnly>
230                                 </configuration>
231                                 <executions>
232                                         <execution>
233                                                 <id>make-assembly</id>
234                                                 <phase>package</phase>
235                                                 <goals>
236                                                         <goal>single</goal>
237                                                 </goals>
238                                         </execution>
239                                 </executions>
240                         </plugin>
241                         <plugin>
242                                 <groupId>com.spotify</groupId>
243                                 <artifactId>docker-maven-plugin</artifactId>
244                                 <version>1.0.0</version>
245                                 <configuration>
246                                         <serverId>${onap.nexus.dockerregistry.daily}</serverId>
247                                         <imageName>${onap.nexus.dockerregistry.daily}/${docker.image.name}</imageName>
248                                         <imageTags>
249                                                 <tag>latest</tag>
250                                                 <tag>${project.version}-${maven.build.timestamp}Z</tag>
251                                                 <tag>${project.version}</tag>
252                                         </imageTags>
253                                         <baseImage>ubuntu:16.04</baseImage>
254                                         <env>
255                                                 <HOSTALIASES>/etc/host.aliases</HOSTALIASES>
256                                         </env>
257                                         <workdir>/opt/app/VESAdapter</workdir>
258                                         <resources>
259                                                 <resource>
260                                                         <targetPath>.</targetPath>
261                                                         <directory>${project.build.directory}/${project.artifactId}-${project.version}</directory>
262                                                 </resource>
263                                         </resources>
264                                         <runs>
265                                                 <run>chmod +x bin/run.sh</run>
266                                                 <run>
267                             <![CDATA[apt-get update && apt-get install -y curl && apt-get install -y openjdk-8-jdk  && apt-get install -y vim && apt-get clean all]]>
268                                                 </run>
269                                         </runs>
270                                         <exposes>
271                                                 <expose>8080</expose>
272                                                 <expose>8443</expose>
273                                         </exposes>
274                                         <entryPoint>bin/run.sh</entryPoint>
275
276                                 </configuration>
277                                 <!--<executions>
278                                         <execution>
279                                                 <id>build-image</id>
280                                                 <phase>package</phase>
281                                                 <goals>
282                                                         <goal>build</goal>
283                                                 </goals>
284                                         </execution>
285                                         <execution>
286                                                 <id>tag-and-push-image-latest</id>
287                                                 <phase>deploy</phase>
288                                                 <goals>
289                                                         <goal>tag</goal>
290                                                 </goals>
291                                                 <configuration>
292                                                         <image>${docker.image.name}:latest</image>
293                                                         <newName>${onap.nexus.dockerregistry.daily}/${docker.image.name}:latest</newName>
294                                                         <pushImage>true</pushImage>
295                                                 </configuration>
296                                         </execution>
297                                         <execution>
298                                                 <id>tag-and-push-image-with-version</id>
299                                                 <phase>deploy</phase>
300                                                 <goals>
301                                                         <goal>tag</goal>
302                                                 </goals>
303                                                 <configuration>
304                                                         <image>${docker.image.name}:latest</image>
305                                                         <newName>${onap.nexus.dockerregistry.daily}/${docker.image.name}:${project.version}
306                                                         </newName>
307                                                         <pushImage>true</pushImage>
308                                                 </configuration>
309                                         </execution>
310                                         <execution>
311                                                 <id>tag-and-push-image-with-version-and-date</id>
312                                                 <phase>deploy</phase>
313                                                 <goals>
314                                                         <goal>tag</goal>
315                                                 </goals>
316                                                 <configuration>
317                                                         <image>${docker.image.name}:latest</image>
318                                                         <newName>
319                                                                 ${onap.nexus.dockerregistry.daily}/${docker.image.name}:${project.version}-${maven.build.timestamp}Z
320                                                         </newName>
321                                                         <pushImage>true</pushImage>
322                                                 </configuration>
323                                         </execution>
324                                 </executions>-->
325                         </plugin>
326                         <plugin>
327                                 <groupId>org.springframework.boot</groupId>
328                                 <artifactId>spring-boot-maven-plugin</artifactId>
329                                 <version>2.0.0.RELEASE</version>
330                                 <executions>
331                                         <execution>
332                                                 <goals>
333                                                         <goal>repackage</goal>
334                                                 </goals>
335                                                 <configuration>
336                                                         <mainClass>org.onap.universalvesadapter.Application</mainClass>
337                                                 </configuration>
338                                         </execution>
339                                 </executions>
340                         </plugin>
341                         <plugin>
342                                 <groupId>org.codehaus.mojo</groupId>
343                                 <artifactId>build-helper-maven-plugin</artifactId>
344                                 <version>1.9.1</version>
345                                 <executions>
346                                         <execution>
347                                                 <id>add-source</id>
348                                                 <phase>generate-sources</phase>
349                                                 <goals>
350                                                         <goal>add-source</goal>
351                                                 </goals>
352                                                 <configuration>
353                                                         <sources>
354                                                                 <source>src/gen/java</source>
355                                                         </sources>
356                                                 </configuration>
357                                         </execution>
358                                         <!-- <execution> <id>regex-property</id> <goals> <goal>regex-property</goal> 
359                                                 </goals> <configuration> <name>docker.version</name> <value>${project.version}</value> 
360                                                 <regex>(^[0-9]+.[0-9]+.[0-9]+$)</regex> <replacement>$1-STAGING</replacement> 
361                                                 <failIfNoMatch>false</failIfNoMatch> </configuration> </execution> -->
362                                 </executions>
363                         </plugin>
364                 </plugins>
365                 <!-- <finalName>UniversalVesAdapter</finalName> -->
366         </build>
367
368         <profiles>
369                 <profile>
370                         <id>with-system-proxy</id>
371                         <build>
372                                 <plugins>
373                                         <plugin>
374                                                 <groupId>com.spotify</groupId>
375                                                 <artifactId>docker-maven-plugin</artifactId>
376                                                 <configuration>
377                                                         <buildArgs>
378                                                                 <http_proxy>${env.http_proxy}</http_proxy>
379                                                         </buildArgs>
380                                                 </configuration>
381                                         </plugin>
382                                 </plugins>
383                         </build>
384                 </profile>
385         </profiles>
386
387
388         <repositories>
389                 <repository>
390                         <id>spring-releases</id>
391                         <url>https://repo.spring.io/libs-release</url>
392                 </repository>
393         </repositories>
394         <pluginRepositories>
395                 <pluginRepository>
396                         <id>spring-releases</id>
397                         <url>https://repo.spring.io/libs-release</url>
398                 </pluginRepository>
399         </pluginRepositories>
400 </project>