c0d3ee78bc3d4e91cdcce379131ccd944e3f642d
[dcaegen2/services/pm-mapper.git] / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3   ============LICENSE_START=======================================================
4    Copyright (C) 2019 Nordix Foundation.
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
18   SPDX-License-Identifier: Apache-2.0
19   ============LICENSE_END=========================================================
20 -->
21
22 <project xmlns="http://maven.apache.org/POM/4.0.0"
23          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
24          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
25     <modelVersion>4.0.0</modelVersion>
26
27     <groupId>org.onap.dcaegen2.services</groupId>
28     <artifactId>pm-mapper</artifactId>
29     <version>1.2.0-SNAPSHOT</version>
30
31     <parent>
32         <groupId>org.onap.oparent</groupId>
33         <artifactId>oparent</artifactId>
34         <version>2.0.0</version>
35     </parent>
36
37     <name>dcaegen2-services-pm-mapper</name>
38     <description>Maps PM measurement data from XML to VES</description>
39     <packaging>jar</packaging>
40
41     <properties>
42         <!-- Dependency Versions -->
43         <lombok.version>1.18.4</lombok.version>
44         <sl4j.version>1.7.25</sl4j.version>
45         <logback.version>1.2.3</logback.version>
46         <reactor.version>3.2.3.RELEASE</reactor.version>
47         <undertow.version>2.0.16.Final</undertow.version>
48         <gson.version>2.8.5</gson.version>
49         <freemarker.version>2.3.28</freemarker.version>
50         <commons.io.version>2.6</commons.io.version>
51         <!-- Testing.Test Dependencies -->
52         <junit.version>5.3.2</junit.version>
53         <mockito.version>2.23.4</mockito.version>
54         <mockito-ju5-ext.version>2.23.4</mockito-ju5-ext.version>
55         <powermock.version>2.0.0</powermock.version>
56         <mockserver.version>3.10.8</mockserver.version>
57         <junit4.version>4.12</junit4.version>
58         <jsonschema.version>1.3.0</jsonschema.version>
59         <xerces.version>2.11.0</xerces.version>
60         <reactor.test>3.1.0.RELEASE</reactor.test>
61         <!-- Plugin Versions -->
62         <jacoco.version>0.8.2</jacoco.version>
63         <surefire.version>2.22.0</surefire.version>
64         <git-commit.version>3.0.0</git-commit.version>
65         <build-helper.version>3.0.0</build-helper.version>
66         <docker-maven.version>0.30.0</docker-maven.version>
67         <maven-jar.version>3.1.2</maven-jar.version>
68         <dependencies.version>3.1.1</dependencies.version>
69         <!-- Plugin Settings -->
70         <image-name>${docker.push.registry}/onap/${project.groupId}.${project.artifactId}</image-name>
71         <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
72         <timestamp>${maven.build.timestamp}</timestamp>
73         <sonar.language>java</sonar.language>
74         <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
75         <sonar.surefire.reportsPath>${project.build.directory}/surefire-reports</sonar.surefire.reportsPath>
76         <sonar.jacoco.reportPaths>${project.build.directory}/coverage-reports/jacoco.exec</sonar.jacoco.reportPaths>
77         <sonar.jacoco.itReportPath>${project.build.directory}/coverage-reports/jacoco-it.exec</sonar.jacoco.itReportPath>
78         <sonar.projectVersion>${project.version}</sonar.projectVersion>
79         <compiler.target.version>1.8</compiler.target.version>
80         <compiler.source.version>1.8</compiler.source.version>
81         <onap.logging.version>1.2.2</onap.logging.version>
82         <classpath.separator>@@</classpath.separator>
83         <pmmapper.main.class>org.onap.dcaegen2.services.pmmapper.App</pmmapper.main.class>
84         <dep.dir.name>libs</dep.dir.name>
85         <ext.dep.dir.path>${dep.dir.name}/external</ext.dep.dir.path>
86     </properties>
87
88     <dependencies>
89         <dependency>
90             <groupId>org.projectlombok</groupId>
91             <artifactId>lombok</artifactId>
92             <version>${lombok.version}</version>
93             <scope>provided</scope>
94         </dependency>
95         <dependency>
96             <groupId>io.projectreactor</groupId>
97             <artifactId>reactor-core</artifactId>
98             <version>${reactor.version}</version>
99         </dependency>
100         <dependency>
101             <groupId>io.undertow</groupId>
102             <artifactId>undertow-core</artifactId>
103             <version>${undertow.version}</version>
104         </dependency>
105         <dependency>
106             <groupId>org.slf4j</groupId>
107             <artifactId>slf4j-api</artifactId>
108             <version>${sl4j.version}</version>
109         </dependency>
110         <dependency>
111             <groupId>ch.qos.logback</groupId>
112             <artifactId>logback-classic</artifactId>
113             <version>${logback.version}</version>
114         </dependency>
115         <dependency>
116             <groupId>org.onap.logging-analytics</groupId>
117             <artifactId>logging-slf4j</artifactId>
118             <version>${onap.logging.version}</version>
119         </dependency>
120         <dependency>
121             <groupId>javax.servlet</groupId>
122             <artifactId>servlet-api</artifactId>
123             <version>2.5</version>
124             <scope>provided</scope>
125         </dependency>
126         <dependency>
127             <groupId>com.google.code.gson</groupId>
128             <artifactId>gson</artifactId>
129             <version>${gson.version}</version>
130         </dependency>
131         <dependency>
132             <groupId>org.freemarker</groupId>
133             <artifactId>freemarker</artifactId>
134             <version>${freemarker.version}</version>
135         </dependency>
136         <dependency>
137             <groupId>commons-io</groupId>
138             <artifactId>commons-io</artifactId>
139             <version>${commons.io.version}</version>
140         </dependency>
141         <dependency>
142             <groupId>org.junit.jupiter</groupId>
143             <artifactId>junit-jupiter-engine</artifactId>
144             <version>${junit.version}</version>
145             <scope>test</scope>
146         </dependency>
147         <dependency>
148             <groupId>org.mockito</groupId>
149             <artifactId>mockito-junit-jupiter</artifactId>
150             <version>${mockito-ju5-ext.version}</version>
151             <scope>test</scope>
152         </dependency>
153
154         <dependency>
155             <groupId>org.mockito</groupId>
156             <artifactId>mockito-core</artifactId>
157             <version>${mockito.version}</version>
158             <scope>test</scope>
159         </dependency>
160         <dependency>
161             <groupId>org.powermock</groupId>
162             <artifactId>powermock-module-junit4</artifactId>
163             <version>${powermock.version}</version>
164             <scope>test</scope>
165         </dependency>
166         <dependency>
167             <groupId>org.junit.vintage</groupId>
168             <artifactId>junit-vintage-engine</artifactId>
169             <version>${junit.version}</version>
170             <scope>test</scope>
171         </dependency>
172         <dependency>
173             <groupId>org.powermock</groupId>
174             <artifactId>powermock-api-mockito2</artifactId>
175             <version>${powermock.version}</version>
176             <scope>test</scope>
177         </dependency>
178         <dependency>
179             <groupId>org.mock-server</groupId>
180             <artifactId>mockserver-netty</artifactId>
181             <version>${mockserver.version}</version>
182             <scope>test</scope>
183         </dependency>
184         <dependency>
185             <groupId>org.mock-server</groupId>
186             <artifactId>mockserver-client-java</artifactId>
187             <version>${mockserver.version}</version>
188             <scope>test</scope>
189         </dependency>
190         <dependency>
191             <groupId>org.junit.jupiter</groupId>
192             <artifactId>junit-jupiter-params</artifactId>
193             <version>${junit.version}</version>
194             <scope>test</scope>
195         </dependency>
196         <dependency>
197             <groupId>io.projectreactor</groupId>
198             <artifactId>reactor-test</artifactId>
199             <version>${reactor.test}</version>
200             <scope>test</scope>
201         </dependency>
202         <dependency>
203             <groupId>org.everit.json</groupId>
204             <artifactId>org.everit.json.schema</artifactId>
205             <version>${jsonschema.version}</version>
206             <scope>test</scope>
207         </dependency>
208         <dependency>
209             <groupId>xerces</groupId>
210             <artifactId>xercesImpl</artifactId>
211             <version>${xerces.version}</version>
212             <scope>test</scope>
213         </dependency>
214     </dependencies>
215
216     <build>
217         <plugins>
218             <plugin>
219                 <groupId>pl.project13.maven</groupId>
220                 <artifactId>git-commit-id-plugin</artifactId>
221                 <version>${git-commit.version}</version>
222                 <configuration>
223                     <dateFormat>${maven.build.timestamp.format}</dateFormat>
224                 </configuration>
225                 <executions>
226                     <execution>
227                         <id>get-git-info</id>
228                         <goals>
229                             <goal>revision</goal>
230                         </goals>
231                     </execution>
232                 </executions>
233             </plugin>
234             <plugin>
235                 <groupId>org.apache.maven.plugins</groupId>
236                 <artifactId>maven-dependency-plugin</artifactId>
237                 <version>${dependencies.version}</version>
238                 <configuration>
239                     <silent>true</silent>
240                     <includeScope>runtime</includeScope>
241                     <pathSeparator>${classpath.separator}</pathSeparator>
242                 </configuration>
243                 <executions>
244                     <execution>
245                         <id>copy-external-dependencies</id>
246                         <phase>prepare-package</phase>
247                         <goals>
248                             <goal>copy-dependencies</goal>
249                             <goal>build-classpath</goal>
250                         </goals>
251                         <configuration>
252                             <excludeGroupIds>${project.parent.groupId}</excludeGroupIds>
253                             <outputDirectory>${project.build.directory}/${ext.dep.dir.path}</outputDirectory>
254                             <prefix>./${ext.dep.dir.path}</prefix>
255                             <outputProperty>classpath.external</outputProperty>
256                         </configuration>
257                     </execution>
258                 </executions>
259             </plugin>
260             <plugin>
261                 <groupId>org.codehaus.mojo</groupId>
262                 <artifactId>build-helper-maven-plugin</artifactId>
263                 <version>${build-helper.version}</version>
264                 <executions>
265                     <execution>
266                         <id>fix-classpath-separator</id>
267                         <phase>prepare-package</phase>
268                         <goals>
269                             <goal>regex-properties</goal>
270                         </goals>
271                         <configuration>
272                             <regexPropertySettings>
273                                 <regexPropertySetting>
274                                     <name>classpath.external</name>
275                                     <value>${classpath.external}</value>
276                                     <regex>${classpath.separator}</regex>
277                                     <replacement xml:space="preserve"> </replacement>
278                                 </regexPropertySetting>
279                             </regexPropertySettings>
280                         </configuration>
281                     </execution>
282                 </executions>
283             </plugin>
284             <plugin>
285                 <groupId>io.fabric8</groupId>
286                 <artifactId>docker-maven-plugin</artifactId>
287                 <version>${docker-maven.version}</version>
288                 <configuration>
289                     <images>
290                         <image>
291                             <name>onap/${project.groupId}.${project.artifactId}</name>
292                             <registry>${onap.nexus.dockerregistry.daily}</registry>
293                             <build>
294                                 <contextDir>${project.basedir}</contextDir>
295                                 <dockerFile>${project.build.outputDirectory}/Dockerfile</dockerFile>
296                                 <args>
297                                     <JAR>${project.build.finalName}.jar</JAR>
298                                 </args>
299                                 <cleanup>none</cleanup>
300                                 <tags>
301                                     <tag>${project.version}</tag>
302                                     <tag>${project.version}-${maven.build.timestamp}Z</tag>
303                                 </tags>
304                             </build>
305                         </image>
306                     </images>
307                 </configuration>
308             </plugin>
309             <plugin>
310                 <groupId>org.apache.maven.plugins</groupId>
311                 <artifactId>maven-jar-plugin</artifactId>
312                 <version>${maven-jar.version}</version>
313                 <configuration>
314                     <archive>
315                         <manifest>
316                             <mainClass>${pmmapper.main.class}</mainClass>
317                             <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
318                             <addBuildEnvironmentEntries>true</addBuildEnvironmentEntries>
319                             <useUniqueVersions>false</useUniqueVersions> <!-- workaround for MJAR-156 -->
320                         </manifest>
321                         <manifestEntries>
322                             <Class-Path>${classpath.external}</Class-Path>
323                             <Git-Branch>${git.branch}</Git-Branch>
324                             <Git-Build-Host>${git.build.host}</Git-Build-Host>
325                             <Git-Build-Time>${git.build.time}</Git-Build-Time>
326                             <Git-Build-User-Email>${git.build.user.email}</Git-Build-User-Email>
327                             <Git-Build-User-Name>${git.build.user.name}</Git-Build-User-Name>
328                             <Git-Build-Version>${git.build.version}</Git-Build-Version>
329                             <Git-Closest-Tag-Name>${git.closest.tag.name}</Git-Closest-Tag-Name>
330                             <Git-Commit-Id>${git.commit.id}</Git-Commit-Id>
331                             <Git-Commit-Message-Short>${git.commit.message.short}</Git-Commit-Message-Short>
332                             <Git-Commit-Time>${git.commit.time}</Git-Commit-Time>
333                             <Git-Commit-User-Email>${git.commit.user.email}</Git-Commit-User-Email>
334                             <Git-Commit-User-Name>${git.commit.user.name}</Git-Commit-User-Name>
335                         </manifestEntries>
336                     </archive>
337                 </configuration>
338             </plugin>
339             <plugin>
340                 <groupId>org.apache.maven.plugins</groupId>
341                 <artifactId>maven-surefire-plugin</artifactId>
342                 <version>${surefire.version}</version>
343                 <configuration combine.self="override">
344                     <useSystemClassLoader>false</useSystemClassLoader>
345                 </configuration>
346             </plugin>
347             <plugin>
348                 <groupId>org.apache.maven.plugins</groupId>
349                 <artifactId>maven-failsafe-plugin</artifactId>
350                 <version>${surefire.version}</version>
351             </plugin>
352             <plugin>
353                 <groupId>org.apache.maven.plugins</groupId>
354                 <artifactId>maven-compiler-plugin</artifactId>
355                 <configuration>
356                     <source>${maven.compiler.source}</source>
357                     <target>${maven.compiler.target}</target>
358                 </configuration>
359             </plugin>
360             <plugin>
361                 <groupId>org.jacoco</groupId>
362                 <artifactId>jacoco-maven-plugin</artifactId>
363                 <version>${jacoco.version}</version>
364                 <executions>
365                     <execution>
366                         <id>jacoco-instrument</id>
367                         <goals>
368                             <goal>instrument</goal>
369                         </goals>
370                     </execution>
371                     <execution>
372                         <id>jacoco-restore-instrumented-classes</id>
373                         <goals>
374                             <goal>restore-instrumented-classes</goal>
375                         </goals>
376                     </execution>
377                     <execution>
378                         <goals>
379                             <goal>prepare-agent</goal>
380                         </goals>
381                         <configuration>
382                             <excludes>
383                                 <exclude>*</exclude>
384                             </excludes>
385                         </configuration>
386                     </execution>
387                     <execution>
388                         <id>report</id>
389                         <phase>prepare-package</phase>
390                         <goals>
391                             <goal>report</goal>
392                         </goals>
393                     </execution>
394                 </executions>
395             </plugin>
396         </plugins>
397     </build>
398
399 </project>