d500eafbd61045a4f10d9265bc630ac154524603
[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/collectors/ves/${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.1.1</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.1.1</version>
245                                 <configuration>
246                                         <serverId>${onap.nexus.dockerregistry.daily}</serverId>
247                                         <imageName>${docker.image.name}</imageName>
248                                         <imageTags>
249                                                 <tag>latest</tag>
250                                         </imageTags>
251                                         <baseImage>ubuntu:16.04</baseImage>
252                                         <env>
253                                                 <HOSTALIASES>/etc/host.aliases</HOSTALIASES>
254                                         </env>
255                                         <workdir>/opt/app/VESAdapter</workdir>
256                                         <resources>
257                                                 <resource>
258                                                         <targetPath>.</targetPath>
259                                                         <directory>${project.build.directory}/${project.artifactId}-${project.version}</directory>
260                                                 </resource>
261                                         </resources>
262                                         <runs>
263                                                 <run>chmod +x bin/run.sh</run>
264                                                 <run>
265                             <![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]]>
266                                                 </run>
267                                         </runs>
268                                         <exposes>
269                                                 <expose>8080</expose>
270                                                 <expose>8443</expose>
271                                         </exposes>
272                                         <entryPoint>bin/run.sh</entryPoint>
273
274                                 </configuration>
275                                 <executions>
276                                         <execution>
277                                                 <id>build-image</id>
278                                                 <phase>package</phase>
279                                                 <goals>
280                                                         <goal>build</goal>
281                                                 </goals>
282                                         </execution>
283                                         <execution>
284                                                 <id>tag-and-push-image-latest</id>
285                                                 <phase>deploy</phase>
286                                                 <goals>
287                                                         <goal>tag</goal>
288                                                 </goals>
289                                                 <configuration>
290                                                         <image>${docker.image.name}:latest</image>
291                                                         <newName>${onap.nexus.dockerregistry.daily}/${docker.image.name}:latest</newName>
292                                                         <pushImage>true</pushImage>
293                                                 </configuration>
294                                         </execution>
295                                         <execution>
296                                                 <id>tag-and-push-image-with-version</id>
297                                                 <phase>deploy</phase>
298                                                 <goals>
299                                                         <goal>tag</goal>
300                                                 </goals>
301                                                 <configuration>
302                                                         <image>${docker.image.name}:latest</image>
303                                                         <newName>${onap.nexus.dockerregistry.daily}/${docker.image.name}:${project.version}
304                                                         </newName>
305                                                         <pushImage>true</pushImage>
306                                                 </configuration>
307                                         </execution>
308                                         <execution>
309                                                 <id>tag-and-push-image-with-version-and-date</id>
310                                                 <phase>deploy</phase>
311                                                 <goals>
312                                                         <goal>tag</goal>
313                                                 </goals>
314                                                 <configuration>
315                                                         <image>${docker.image.name}:latest</image>
316                                                         <newName>
317                                                                 ${onap.nexus.dockerregistry.daily}/${docker.image.name}:${project.version}-${maven.build.timestamp}Z
318                                                         </newName>
319                                                         <pushImage>true</pushImage>
320                                                 </configuration>
321                                         </execution>
322                                 </executions>
323                         </plugin>
324                         <plugin>
325                                 <groupId>org.springframework.boot</groupId>
326                                 <artifactId>spring-boot-maven-plugin</artifactId>
327                                 <version>2.0.0.RELEASE</version>
328                                 <executions>
329                                         <execution>
330                                                 <goals>
331                                                         <goal>repackage</goal>
332                                                 </goals>
333                                                 <configuration>
334                                                         <mainClass>org.onap.universalvesadapter.Application</mainClass>
335                                                 </configuration>
336                                         </execution>
337                                 </executions>
338                         </plugin>
339                         <plugin>
340                                 <groupId>org.codehaus.mojo</groupId>
341                                 <artifactId>build-helper-maven-plugin</artifactId>
342                                 <version>1.9.1</version>
343                                 <executions>
344                                         <execution>
345                                                 <id>add-source</id>
346                                                 <phase>generate-sources</phase>
347                                                 <goals>
348                                                         <goal>add-source</goal>
349                                                 </goals>
350                                                 <configuration>
351                                                         <sources>
352                                                                 <source>src/gen/java</source>
353                                                         </sources>
354                                                 </configuration>
355                                         </execution>
356                                         <!-- <execution> <id>regex-property</id> <goals> <goal>regex-property</goal> 
357                                                 </goals> <configuration> <name>docker.version</name> <value>${project.version}</value> 
358                                                 <regex>(^[0-9]+.[0-9]+.[0-9]+$)</regex> <replacement>$1-STAGING</replacement> 
359                                                 <failIfNoMatch>false</failIfNoMatch> </configuration> </execution> -->
360                                 </executions>
361                         </plugin>
362                 </plugins>
363                 <!-- <finalName>UniversalVesAdapter</finalName> -->
364         </build>
365
366         <profiles>
367                 <profile>
368                         <id>with-system-proxy</id>
369                         <build>
370                                 <plugins>
371                                         <plugin>
372                                                 <groupId>com.spotify</groupId>
373                                                 <artifactId>docker-maven-plugin</artifactId>
374                                                 <configuration>
375                                                         <buildArgs>
376                                                                 <http_proxy>${env.http_proxy}</http_proxy>
377                                                         </buildArgs>
378                                                 </configuration>
379                                         </plugin>
380                                 </plugins>
381                         </build>
382                 </profile>
383         </profiles>
384
385
386         <repositories>
387                 <repository>
388                         <id>spring-releases</id>
389                         <url>https://repo.spring.io/libs-release</url>
390                 </repository>
391         </repositories>
392         <pluginRepositories>
393                 <pluginRepository>
394                         <id>spring-releases</id>
395                         <url>https://repo.spring.io/libs-release</url>
396                 </pluginRepository>
397         </pluginRepositories>
398 </project>