fix sonarcloud issues
[dcaegen2/services.git] / components / bbs-event-processor / 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/xsd/maven-4.0.0.xsd">
5     <modelVersion>4.0.0</modelVersion>
6
7     <parent>
8         <groupId>org.onap.oparent</groupId>
9         <artifactId>oparent</artifactId>
10         <version>2.0.0</version>
11     </parent>
12
13     <groupId>org.onap.dcaegen2.services.components</groupId>
14     <artifactId>bbs-event-processor</artifactId>
15     <version>1.1.0-SNAPSHOT</version>
16
17     <name>dcaegen2-services-bbs-event-processor</name>
18     <description>BBS Re-Registration and CPE Authentication Handler</description>
19     <packaging>jar</packaging>
20
21     <licenses>
22         <license>
23             <name>The Apache Software License, Version 2.0</name>
24             <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
25         </license>
26     </licenses>
27
28     <properties>
29         <java.version>8</java.version>
30         <immutables.version>2.7.5</immutables.version>
31         <spring-boot.version>2.1.3.RELEASE</spring-boot.version>
32         <tomcat.version>8.5.32</tomcat.version>
33         <slf4j.version>1.7.25</slf4j.version>
34         <junit-platform.version>1.1.0</junit-platform.version>
35         <jacoco.version>0.8.2</jacoco.version>
36         <dcae.sdk.version>1.1.4</dcae.sdk.version>
37         <wiremock.version>2.21.0</wiremock.version>
38         <springfox-swagger.version>2.8.0</springfox-swagger.version>
39         <maven.build.timestamp.format>yyyyMMdd'T'HHmmss</maven.build.timestamp.format>
40         <bbs-event-processor.main.class>org.onap.bbs.event.processor.Application</bbs-event-processor.main.class>
41         <dependency.dir.name>libs</dependency.dir.name>
42         <dependency.dir.location>${project.build.directory}/${dependency.dir.name}</dependency.dir.location>
43         <docker.image.name>onap/${project.groupId}.${project.artifactId}</docker.image.name>
44         <maven.build.timestamp.format>yyyyMMdd'T'HHmmss</maven.build.timestamp.format>
45         <sonar.coverage.jacoco.xmlReportPaths>
46           ${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml
47         </sonar.coverage.jacoco.xmlReportPaths>
48     </properties>
49
50     <dependencyManagement>
51         <dependencies>
52             <dependency>
53                 <groupId>org.onap.dcaegen2.services.sdk.rest.services</groupId>
54                 <artifactId>cbs-client</artifactId>
55                 <version>${dcae.sdk.version}</version>
56             </dependency>
57             <dependency>
58                 <groupId>org.onap.dcaegen2.services.sdk.rest.services</groupId>
59                 <artifactId>dmaap-client</artifactId>
60                 <version>${dcae.sdk.version}</version>
61             </dependency>
62             <dependency>
63                 <groupId>org.onap.dcaegen2.services.sdk.rest.services</groupId>
64                 <artifactId>common-dependency</artifactId>
65                 <version>${dcae.sdk.version}</version>
66             </dependency>
67             <dependency>
68                 <groupId>io.springfox</groupId>
69                 <artifactId>springfox-swagger2</artifactId>
70                 <version>${springfox-swagger.version}</version>
71             </dependency>
72             <dependency>
73                 <groupId>io.springfox</groupId>
74                 <artifactId>springfox-swagger-ui</artifactId>
75                 <version>${springfox-swagger.version}</version>
76             </dependency>
77             <dependency>
78                 <groupId>org.immutables</groupId>
79                 <artifactId>value</artifactId>
80                 <version>${immutables.version}</version>
81             </dependency>
82             <dependency>
83                 <groupId>org.immutables</groupId>
84                 <artifactId>gson</artifactId>
85                 <version>${immutables.version}</version>
86             </dependency>
87             <dependency>
88                 <groupId>org.springframework.boot</groupId>
89                 <artifactId>spring-boot-dependencies</artifactId>
90                 <version>${spring-boot.version}</version>
91                 <type>pom</type>
92                 <scope>import</scope>
93             </dependency>
94             <dependency>
95                 <groupId>com.github.tomakehurst</groupId>
96                 <artifactId>wiremock-jre8</artifactId>
97                 <version>${wiremock.version}</version>
98             </dependency>
99         </dependencies>
100     </dependencyManagement>
101
102     <dependencies>
103         <dependency>
104             <groupId>org.onap.dcaegen2.services.sdk.rest.services</groupId>
105             <artifactId>cbs-client</artifactId>
106         </dependency>
107         <dependency>
108             <groupId>org.onap.dcaegen2.services.sdk.rest.services</groupId>
109             <artifactId>dmaap-client</artifactId>
110         </dependency>
111         <dependency>
112             <groupId>org.onap.dcaegen2.services.sdk.rest.services</groupId>
113             <artifactId>common-dependency</artifactId>
114         </dependency>
115         <dependency>
116             <groupId>org.springframework.boot</groupId>
117             <artifactId>spring-boot-starter-web</artifactId>
118         </dependency>
119         <dependency>
120             <groupId>org.springframework.boot</groupId>
121             <artifactId>spring-boot-starter-webflux</artifactId>
122         </dependency>
123         <dependency>
124             <groupId>org.springframework.boot</groupId>
125             <artifactId>spring-boot-starter-test</artifactId>
126             <scope>test</scope>
127         </dependency>
128         <dependency>
129             <groupId>io.springfox</groupId>
130             <artifactId>springfox-swagger2</artifactId>
131         </dependency>
132         <dependency>
133             <groupId>io.springfox</groupId>
134             <artifactId>springfox-swagger-ui</artifactId>
135         </dependency>
136         <dependency>
137             <groupId>io.projectreactor</groupId>
138             <artifactId>reactor-core</artifactId>
139         </dependency>
140         <dependency>
141             <groupId>org.immutables</groupId>
142             <artifactId>value</artifactId>
143         </dependency>
144         <dependency>
145             <groupId>org.immutables</groupId>
146             <artifactId>gson</artifactId>
147         </dependency>
148         <dependency>
149             <groupId>org.junit.jupiter</groupId>
150             <artifactId>junit-jupiter-engine</artifactId>
151             <scope>test</scope>
152         </dependency>
153         <dependency>
154             <groupId>org.mockito</groupId>
155             <artifactId>mockito-core</artifactId>
156             <scope>test</scope>
157         </dependency>
158         <dependency>
159             <groupId>io.projectreactor</groupId>
160             <artifactId>reactor-test</artifactId>
161             <scope>test</scope>
162         </dependency>
163         <dependency>
164             <groupId>org.projectlombok</groupId>
165             <artifactId>lombok</artifactId>
166         </dependency>
167         <dependency>
168             <groupId>com.fasterxml.jackson.datatype</groupId>
169             <artifactId>jackson-datatype-jsr310</artifactId>
170             <scope>test</scope>
171         </dependency>
172         <dependency>
173             <groupId>com.github.tomakehurst</groupId>
174             <artifactId>wiremock-jre8</artifactId>
175             <scope>test</scope>
176             <exclusions>
177                 <exclusion>
178                     <groupId>com.fasterxml.jackson.core</groupId>
179                     <artifactId>jackson-core</artifactId>
180                 </exclusion>
181                 <exclusion>
182                     <groupId>com.fasterxml.jackson.core</groupId>
183                     <artifactId>jackson-annotations</artifactId>
184                 </exclusion>
185                 <exclusion>
186                     <groupId>com.fasterxml.jackson.core</groupId>
187                     <artifactId>jackson-databind</artifactId>
188                 </exclusion>
189             </exclusions>
190         </dependency>
191     </dependencies>
192
193     <build>
194         <pluginManagement>
195             <plugins>
196                 <plugin>
197                     <groupId>org.apache.maven.plugins</groupId>
198                     <artifactId>maven-compiler-plugin</artifactId>
199                     <version>3.7.0</version>
200                     <configuration>
201                         <source>${java.version}</source>
202                         <target>${java.version}</target>
203                         <encoding>${project.build.sourceEncoding}</encoding>
204                         <showWarnings>true</showWarnings>
205                         <showDeprecation>true</showDeprecation>
206                     </configuration>
207                 </plugin>
208                 <plugin>
209                     <groupId>org.apache.maven.plugins</groupId>
210                     <artifactId>maven-resources-plugin</artifactId>
211                     <version>3.1.0</version>
212                     <configuration>
213                         <encoding>${project.build.sourceEncoding}</encoding>
214                     </configuration>
215                 </plugin>
216                 <plugin>
217                     <groupId>org.apache.maven.plugins</groupId>
218                     <artifactId>maven-enforcer-plugin</artifactId>
219                     <configuration>
220                         <skip>true</skip>
221                     </configuration>
222                 </plugin>
223                 <plugin>
224                     <groupId>org.apache.maven.plugins</groupId>
225                     <artifactId>maven-deploy-plugin</artifactId>
226                 </plugin>
227                 <plugin>
228                     <groupId>org.springframework.boot</groupId>
229                     <artifactId>spring-boot-maven-plugin</artifactId>
230                     <version>${spring-boot.version}</version>
231                     <executions>
232                         <execution>
233                             <goals>
234                                 <goal>repackage</goal>
235                             </goals>
236                         </execution>
237                     </executions>
238                 </plugin>
239                 <plugin>
240                     <groupId>pl.project13.maven</groupId>
241                     <artifactId>git-commit-id-plugin</artifactId>
242                     <version>2.2.6</version>
243                 </plugin>
244                 <plugin>
245                     <groupId>org.apache.maven.plugins</groupId>
246                     <artifactId>maven-jar-plugin</artifactId>
247                     <version>3.1.1</version>
248                 </plugin>
249                 <plugin>
250                     <groupId>com.spotify</groupId>
251                     <artifactId>dockerfile-maven-plugin</artifactId>
252                     <version>1.4.10</version>
253                 </plugin>
254                 <plugin>
255                     <groupId>org.apache.maven.plugins</groupId>
256                     <artifactId>maven-surefire-plugin</artifactId>
257                     <version>2.19.1</version>
258                     <dependencies>
259                         <dependency>
260                             <groupId>org.junit.platform</groupId>
261                             <artifactId>junit-platform-surefire-provider</artifactId>
262                             <version>${junit-platform.version}</version>
263                         </dependency>
264                     </dependencies>
265                 </plugin>
266             </plugins>
267         </pluginManagement>
268         <plugins>
269             <plugin>
270                 <groupId>pl.project13.maven</groupId>
271                 <artifactId>git-commit-id-plugin</artifactId>
272                 <configuration>
273                     <dateFormat>${maven.build.timestamp.format}</dateFormat>
274                     <generateGitPropertiesFile>true</generateGitPropertiesFile>
275                     <format>json</format>
276                     <generateGitPropertiesFilename>${project.build.outputDirectory}/git_info.json</generateGitPropertiesFilename>
277                 </configuration>
278                 <executions>
279                     <execution>
280                         <id>get-git-info</id>
281                         <goals>
282                             <goal>revision</goal>
283                         </goals>
284                     </execution>
285                 </executions>
286             </plugin>
287             <plugin>
288                 <groupId>org.apache.maven.plugins</groupId>
289                 <artifactId>maven-jar-plugin</artifactId>
290                 <configuration>
291                     <archive>
292                         <manifest>
293                             <addClasspath>true</addClasspath>
294                             <classpathPrefix>./${dependency.dir.name}/</classpathPrefix>
295                             <useUniqueVersions>false</useUniqueVersions>
296                             <mainClass>${bbs-event-processor.main.class}</mainClass>
297                             <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
298                         </manifest>
299                         <manifestEntries>
300                             <Build-Time>${maven.build.timestamp}</Build-Time>
301                         </manifestEntries>
302                     </archive>
303                 </configuration>
304             </plugin>
305             <plugin>
306                 <groupId>org.apache.maven.plugins</groupId>
307                 <artifactId>maven-dependency-plugin</artifactId>
308                 <configuration>
309                     <outputDirectory>${dependency.dir.location}</outputDirectory>
310                     <includeScope>runtime</includeScope>
311                     <silent>true</silent>
312                 </configuration>
313                 <executions>
314                     <execution>
315                         <id>copy-external-dependencies</id>
316                         <phase>package</phase>
317                         <goals>
318                             <goal>copy-dependencies</goal>
319                         </goals>
320                     </execution>
321                 </executions>
322             </plugin>
323             <plugin>
324                 <groupId>com.spotify</groupId>
325                 <artifactId>dockerfile-maven-plugin</artifactId>
326                 <configuration>
327                     <contextDirectory>${project.basedir}</contextDirectory>
328                     <repository>${docker.image.name}</repository>
329                     <tag>latest</tag>
330                     <buildArgs>
331                         <PROJECT_BUILD_DIR_NAME>target</PROJECT_BUILD_DIR_NAME>
332                         <DEPENDENCIES_DIR>${dependency.dir.name}</DEPENDENCIES_DIR>
333                         <DOCKER_ARTIFACT_DIR>/opt</DOCKER_ARTIFACT_DIR>
334                         <FINAL_JAR>${project.build.finalName}.jar</FINAL_JAR>
335                     </buildArgs>
336                 </configuration>
337                 <executions>
338                     <execution>
339                         <id>build-bbs-event-processor-image</id>
340                         <phase>deploy</phase>
341                         <goals>
342                             <goal>build</goal>
343                         </goals>
344                     </execution>
345                     <execution>
346                         <id>tag-and-push-image-latest</id>
347                         <phase>deploy</phase>
348                         <goals>
349                             <goal>tag</goal>
350                             <goal>push</goal>
351                         </goals>
352                         <configuration>
353                             <repository>${onap.nexus.dockerregistry.daily}/${docker.image.name}</repository>
354                             <tag>latest</tag>
355                             <useMavenSettingsForAuth>true</useMavenSettingsForAuth>
356                         </configuration>
357                     </execution>
358                     <execution>
359                         <id>tag-and-push-image-with-version</id>
360                         <phase>deploy</phase>
361                         <goals>
362                             <goal>tag</goal>
363                             <goal>push</goal>
364                         </goals>
365                         <configuration>
366                             <repository>${onap.nexus.dockerregistry.daily}/${docker.image.name}</repository>
367                             <tag>${project.version}</tag>
368                             <useMavenSettingsForAuth>true</useMavenSettingsForAuth>
369                         </configuration>
370                     </execution>
371                     <execution>
372                         <id>tag-and-push-image-with-version-and-date</id>
373                         <phase>deploy</phase>
374                         <goals>
375                             <goal>tag</goal>
376                             <goal>push</goal>
377                         </goals>
378                         <configuration>
379                             <repository>${onap.nexus.dockerregistry.daily}/${docker.image.name}</repository>
380                             <tag>${project.version}-${maven.build.timestamp}Z</tag>
381                             <useMavenSettingsForAuth>true</useMavenSettingsForAuth>
382                         </configuration>
383                     </execution>
384                 </executions>
385             </plugin>
386         </plugins>
387     </build>
388 </project>