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