0ba074f21246dd4b4ed80362829a79b87c642e9c
[dcaegen2/collectors/ves.git] / pom.xml
1 <!--
2 ================================================================================
3 Copyright (c) 2017-2018 AT&T Intellectual Property. All rights reserved.
4 Copyright (c) 2018 Nokia. All rights reserved.
5 ================================================================================
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
9
10     http://www.apache.org/licenses/LICENSE-2.0
11
12 Unless required by applicable law or agreed to in writing, software
13 distributed under the License is distributed on an "AS IS" BASIS,
14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 See the License for the specific language governing permissions and
16 limitations under the License.
17 ============LICENSE_END=========================================================
18 -->
19
20 <project xmlns="http://maven.apache.org/POM/4.0.0"
21   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
22   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
23     <modelVersion>4.0.0</modelVersion>
24
25     <parent>
26         <groupId>org.onap.oparent</groupId>
27         <artifactId>oparent</artifactId>
28         <version>0.1.1</version>
29         <relativePath/>
30     </parent>
31
32     <groupId>org.onap.dcaegen2.collectors.ves</groupId>
33     <artifactId>VESCollector</artifactId>
34     <version>1.3.0-SNAPSHOT</version>
35
36     <name>dcaegen2-collectors-ves</name>
37     <description>VESCollector</description>
38
39     <properties>
40         <!-- PROJECT SETTINGS -->
41         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
42         <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
43         <java.version>8</java.version>
44         <docker.image.name>onap/org.onap.dcaegen2.collectors.ves.vescollector</docker.image.name>
45
46         <!-- TEST SETTINGS -->
47         <surefire.redirectTestOutputToFile>true</surefire.redirectTestOutputToFile>
48
49         <!-- PLUGIN SETTINGS -->
50         <dependency.locations.enabled>false</dependency.locations.enabled>
51
52         <!-- NEXUS RELATED SETTINGS -->
53         <nexusproxy>https://nexus.onap.org</nexusproxy>
54         <snapshots.path>content/repositories/snapshots/</snapshots.path>
55         <releases.path>content/repositories/releases/</releases.path>
56         <site.path>
57             content/sites/site/org/onap/dcaegen2/collectors/ves/${project.artifactId}/${project.version}
58         </site.path>
59         <maven.build.timestamp.format>yyyyMMdd'T'HHmmss</maven.build.timestamp.format>
60
61     </properties>
62
63     <build>
64         <pluginManagement>
65             <plugins>
66                 <plugin>
67                     <groupId>org.springframework.boot</groupId>
68                     <artifactId>spring-boot-maven-plugin</artifactId>
69                     <version>2.0.2.RELEASE</version>
70                     <executions>
71                         <execution>
72                             <goals>
73                                 <goal>repackage</goal>
74                             </goals>
75                         </execution>
76                     </executions>
77                 </plugin>
78                 <plugin>
79                     <artifactId>maven-compiler-plugin</artifactId>
80                     <version>3.7.0</version>
81                 </plugin>
82                 <plugin>
83                     <artifactId>maven-source-plugin</artifactId>
84                     <version>3.0.1</version>
85                 </plugin>
86                 <plugin>
87                     <artifactId>maven-jar-plugin</artifactId>
88                     <version>3.1.0</version>
89                 </plugin>
90                 <plugin>
91                     <artifactId>maven-assembly-plugin</artifactId>
92                     <version>3.1.0</version>
93                 </plugin>
94                 <plugin>
95                     <artifactId>maven-javadoc-plugin</artifactId>
96                     <version>3.0.1</version>
97                 </plugin>
98                 <plugin>
99                     <artifactId>maven-project-info-reports-plugin</artifactId>
100                     <version>2.9</version>
101                 </plugin>
102                 <plugin>
103                     <groupId>com.spotify</groupId>
104                     <artifactId>docker-maven-plugin</artifactId>
105                     <version>1.1.1</version>
106                 </plugin>
107             </plugins>
108         </pluginManagement>
109
110         <plugins>
111             <plugin>
112                 <artifactId>maven-compiler-plugin</artifactId>
113                 <configuration>
114                     <source>${java.version}</source>
115                     <target>${java.version}</target>
116                     <showWarnings>true</showWarnings>
117                     <showDeprecation>true</showDeprecation>
118                 </configuration>
119             </plugin>
120
121             <plugin>
122                 <artifactId>maven-source-plugin</artifactId>
123                 <configuration>
124                     <excludeResources>true</excludeResources>
125                 </configuration>
126                 <executions>
127                     <execution>
128                         <id>attach-sources</id>
129                         <phase>verify</phase>
130                         <goals>
131                             <goal>jar-no-fork</goal>
132                         </goals>
133                     </execution>
134                 </executions>
135             </plugin>
136
137             <plugin>
138                 <artifactId>maven-jar-plugin</artifactId>
139                 <configuration>
140                     <archive>
141                         <manifest>
142                             <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
143                         </manifest>
144                         <manifestEntries>
145                             <Implementation-Build-Version>${project.version}</Implementation-Build-Version>
146                         </manifestEntries>
147                     </archive>
148                 </configuration>
149             </plugin>
150
151             <plugin>
152                 <artifactId>maven-assembly-plugin</artifactId>
153                 <configuration>
154                     <descriptors>
155                         <descriptor>src/assembly/dep.xml</descriptor>
156                     </descriptors>
157                     <attach>false</attach>
158                     <appendAssemblyId>false</appendAssemblyId>
159                     <updateOnly>true</updateOnly>
160                 </configuration>
161                 <executions>
162                     <execution>
163                         <id>make-assembly</id>
164                         <phase>package</phase>
165                         <goals>
166                             <goal>single</goal>
167                         </goals>
168                     </execution>
169                 </executions>
170             </plugin>
171
172             <plugin>
173                 <artifactId>maven-javadoc-plugin</artifactId>
174                 <configuration>
175                     <!-- minimize console output messages -->
176                     <quiet>true</quiet>
177                     <verbose>false</verbose>
178                     <useStandardDocletOptions>false</useStandardDocletOptions>
179                 </configuration>
180                 <executions>
181                     <execution>
182                         <id>aggregate</id>
183                         <phase>site</phase>
184                         <goals>
185                             <goal>aggregate</goal>
186                         </goals>
187                     </execution>
188                     <execution>
189                         <id>attach-javadoc</id>
190                         <goals>
191                             <goal>jar</goal>
192                         </goals>
193                     </execution>
194                 </executions>
195             </plugin>
196
197             <plugin>
198                 <groupId>com.spotify</groupId>
199                 <artifactId>docker-maven-plugin</artifactId>
200                 <configuration>
201                     <serverId>${onap.nexus.dockerregistry.daily}</serverId>
202                     <imageName>${docker.image.name}</imageName>
203                     <imageTags>
204                         <tag>latest</tag>
205                     </imageTags>
206                     <baseImage>openjdk:8-jre-slim</baseImage>
207                     <env>
208                         <HOSTALIASES>/etc/host.aliases</HOSTALIASES>
209                     </env>
210                     <workdir>/opt/app/VESCollector</workdir>
211                     <resources>
212                         <resource>
213                             <targetPath>.</targetPath>
214                             <directory>${project.build.directory}/${project.artifactId}-${project.version}</directory>
215                         </resource>
216                     </resources>
217                     <runs>
218                         <run>chmod +x bin/*.sh</run> <!-- Maven is loosing file permissions during artifacts copy -->
219                         <run>
220                             <![CDATA[apt-get update && apt-get install -y --no-install-recommends logrotate && apt-get install -y procps && apt-get install -y vim && apt-get clean all]]>
221                         </run>
222                         <run>chmod 0644 etc/logrotate.conf</run>
223                     </runs>
224                     <exposes>
225                         <expose>8080</expose>
226                         <expose>8443</expose>
227                     </exposes>
228                     <entryPoint>bin/docker-entry.sh</entryPoint>
229                 </configuration>
230
231                 <executions>
232                     <execution>
233                         <id>build-image</id>
234                         <phase>package</phase>
235                         <goals>
236                             <goal>build</goal>
237                         </goals>
238                     </execution>
239                     <execution>
240                         <id>tag-and-push-image-latest</id>
241                         <phase>deploy</phase>
242                         <goals>
243                             <goal>tag</goal>
244                         </goals>
245                         <configuration>
246                             <image>${docker.image.name}:latest</image>
247                             <newName>${onap.nexus.dockerregistry.daily}/${docker.image.name}:latest</newName>
248                             <pushImage>true</pushImage>
249                         </configuration>
250                     </execution>
251                     <execution>
252                         <id>tag-and-push-image-with-version</id>
253                         <phase>deploy</phase>
254                         <goals>
255                             <goal>tag</goal>
256                         </goals>
257                         <configuration>
258                             <image>${docker.image.name}:latest</image>
259                             <newName>${onap.nexus.dockerregistry.daily}/${docker.image.name}:${project.version}
260                             </newName>
261                             <pushImage>true</pushImage>
262                         </configuration>
263                     </execution>
264                     <execution>
265                         <id>tag-and-push-image-with-version-and-date</id>
266                         <phase>deploy</phase>
267                         <goals>
268                             <goal>tag</goal>
269                         </goals>
270                         <configuration>
271                             <image>${docker.image.name}:latest</image>
272                             <newName>
273                                 ${onap.nexus.dockerregistry.daily}/${docker.image.name}:${project.version}-${maven.build.timestamp}Z
274                             </newName>
275                             <pushImage>true</pushImage>
276                         </configuration>
277                     </execution>
278                 </executions>
279             </plugin>
280         </plugins>
281     </build>
282
283     <profiles>
284         <profile>
285             <id>with-system-proxy</id>
286             <build>
287                 <plugins>
288                     <plugin>
289                         <groupId>com.spotify</groupId>
290                         <artifactId>docker-maven-plugin</artifactId>
291                         <configuration>
292                             <buildArgs>
293                                 <http_proxy>${env.http_proxy}</http_proxy>
294                             </buildArgs>
295                         </configuration>
296                     </plugin>
297                 </plugins>
298             </build>
299         </profile>
300     </profiles>
301
302     <reporting>
303         <plugins>
304             <plugin>
305                 <artifactId>maven-project-info-reports-plugin</artifactId>
306                 <reportSets>
307                     <reportSet>
308                         <reports>
309                             <report>dependencies</report>
310                             <report>license</report>
311                         </reports>
312                     </reportSet>
313                 </reportSets>
314             </plugin>
315
316             <plugin>
317                 <artifactId>maven-javadoc-plugin</artifactId>
318                 <configuration>
319                     <failOnError>false</failOnError>
320                     <doclet>org.umlgraph.doclet.UmlGraphDoc</doclet>
321                     <docletArtifact>
322                         <groupId>org.umlgraph</groupId>
323                         <artifactId>umlgraph</artifactId>
324                         <version>5.6</version>
325                     </docletArtifact>
326                     <additionalparam>-views</additionalparam>
327                     <useStandardDocletOptions>true</useStandardDocletOptions>
328                 </configuration>
329             </plugin>
330         </plugins>
331     </reporting>
332
333     <dependencyManagement>
334         <dependencies>
335             <dependency>
336                 <!-- Import dependency management from Spring Boot -->
337                 <groupId>org.springframework.boot</groupId>
338                 <artifactId>spring-boot-dependencies</artifactId>
339                 <version>2.0.3.RELEASE</version>
340                 <type>pom</type>
341                 <scope>import</scope>
342             </dependency>
343         </dependencies>
344     </dependencyManagement>
345
346     <dependencies>
347         <!-- JSON RELATED -->
348         <dependency>
349             <groupId>com.googlecode.json-simple</groupId>
350             <artifactId>json-simple</artifactId>
351             <version>1.1.1</version>
352         </dependency>
353         <dependency>
354             <groupId>com.github.fge</groupId>
355             <artifactId>json-schema-validator</artifactId>
356             <version>2.2.6</version>
357         </dependency>
358         <dependency>
359             <groupId>com.github.fge</groupId>
360             <artifactId>json-schema-core</artifactId>
361             <version>1.2.5</version>
362         </dependency>
363         <dependency>
364             <groupId>com.google.code.gson</groupId>
365             <artifactId>gson</artifactId>
366             <version>2.3.1</version>
367         </dependency>
368         <dependency>
369             <groupId>org.json</groupId>
370             <artifactId>json</artifactId>
371             <version>20160810</version>
372         </dependency>
373
374         <!-- REST API RELATED -->
375         <dependency>
376             <groupId>com.att.nsa</groupId>
377             <artifactId>cambriaClient</artifactId>
378             <version>0.0.1</version>
379         </dependency>
380         <dependency>
381             <groupId>com.mashape.unirest</groupId>
382             <artifactId>unirest-java</artifactId>
383             <version>1.4.9</version>
384         </dependency>
385
386         <!-- MISCELLANEOUS -->
387         <dependency>
388             <groupId>commons-collections</groupId>
389             <artifactId>commons-collections</artifactId>
390             <version>3.2.2</version>
391         </dependency>
392         <dependency>
393             <groupId>commons-configuration</groupId>
394             <artifactId>commons-configuration</artifactId>
395             <version>1.10</version>
396         </dependency>
397         <dependency>
398             <groupId>io.vavr</groupId>
399             <artifactId>vavr</artifactId>
400             <version>0.9.2</version>
401         </dependency>
402
403         <dependency>
404             <groupId>org.springframework.boot</groupId>
405             <artifactId>spring-boot-starter-security</artifactId>
406             <exclusions>
407                 <exclusion>
408                     <groupId>org.springframework.boot</groupId>
409                     <artifactId>spring-boot-starter-logging</artifactId>
410                 </exclusion>
411             </exclusions>
412         </dependency>
413         <dependency>
414             <groupId>org.springframework.boot</groupId>
415             <artifactId>spring-boot-starter-web</artifactId>
416         </dependency>
417         <dependency>
418             <groupId>org.springframework.security</groupId>
419             <artifactId>spring-security-config</artifactId>
420         </dependency>
421         <dependency>
422             <groupId>org.springframework.boot</groupId>
423             <artifactId>spring-boot-starter-log4j</artifactId>
424             <version>1.3.8.RELEASE</version>
425         </dependency>
426
427         <!-- TESTING -->
428         <dependency>
429             <groupId>org.mockito</groupId>
430             <artifactId>mockito-core</artifactId>
431             <version>2.18.0</version>
432             <scope>test</scope>
433         </dependency>
434         <dependency>
435             <groupId>junit</groupId>
436             <artifactId>junit</artifactId>
437             <version>4.12</version>
438             <scope>test</scope>
439         </dependency>
440         <dependency>
441             <groupId>org.assertj</groupId>
442             <artifactId>assertj-core</artifactId>
443             <version>3.8.0</version>
444             <scope>test</scope>
445         </dependency>
446         <dependency>
447             <groupId>com.google.jimfs</groupId>
448             <artifactId>jimfs</artifactId>
449             <version>1.1</version>
450             <scope>test</scope>
451         </dependency>
452         <dependency>
453             <groupId>com.github.tomakehurst</groupId>
454             <artifactId>wiremock-standalone</artifactId>
455             <version>2.17.0</version>
456             <scope>test</scope>
457         </dependency>
458     </dependencies>
459
460     <repositories>
461         <repository>
462             <id>external-repository</id>
463             <url>https://oss.sonatype.org/content/repositories</url>
464         </repository>
465     </repositories>
466
467     <pluginRepositories>
468         <!-- Black Duck plugin dependencies -->
469         <pluginRepository>
470             <id>JCenter</id>
471             <name>JCenter Repository</name>
472             <url>http://jcenter.bintray.com</url>
473         </pluginRepository>
474         <pluginRepository>
475             <id>Restlet</id>
476             <name>Restlet Repository</name>
477             <url>http://maven.restlet.com</url>
478         </pluginRepository>
479     </pluginRepositories>
480
481 </project>