Externalized Logging Level. Corrected tag name for images
[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>1.2.3</version>
11     </parent>
12
13     <groupId>org.onap.dcaegen2.services.components</groupId>
14     <artifactId>bbs-event-processor</artifactId>
15     <version>1.0.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.version>5.1.2.RELEASE</spring.version>
32         <spring-boot.version>2.1.0.RELEASE</spring-boot.version>
33         <tomcat.version>8.5.32</tomcat.version>
34         <slf4j.version>1.7.25</slf4j.version>
35         <junit-platform.version>1.1.0</junit-platform.version>
36         <jacoco.version>0.8.2</jacoco.version>
37         <sdk.version>1.1.2-SNAPSHOT</sdk.version>
38         <common.sdk.version>1.1.3</common.sdk.version>
39         <cbs.version>1.1.3</cbs.version>
40         <hibernate-validator.version>5.2.4.Final</hibernate-validator.version>
41         <wiremock.version>2.21.0</wiremock.version>
42         <springfox-swagger.version>2.8.0</springfox-swagger.version>
43         <maven.build.timestamp.format>yyyyMMdd'T'HHmmss</maven.build.timestamp.format>
44         <bbs-event-processor.main.class>org.onap.bbs.event.processor.Application</bbs-event-processor.main.class>
45         <dependency.dir.name>libs</dependency.dir.name>
46         <dependency.dir.location>${project.build.directory}/${dependency.dir.name}</dependency.dir.location>
47         <docker.artifact.dir>/opt</docker.artifact.dir>
48         <docker.image.name>onap/${project.groupId}.${project.artifactId}</docker.image.name>
49         <maven.build.timestamp.format>yyyyMMdd'T'HHmmss</maven.build.timestamp.format>
50     </properties>
51
52     <dependencyManagement>
53         <dependencies>
54             <dependency>
55                 <groupId>org.onap.dcaegen2.services.sdk.rest.services</groupId>
56                 <artifactId>cbs-client</artifactId>
57                 <version>${cbs.version}</version>
58             </dependency>
59             <dependency>
60                 <groupId>org.onap.dcaegen2.services.sdk.rest.services</groupId>
61                 <artifactId>aai-client</artifactId>
62                 <version>${sdk.version}</version>
63             </dependency>
64             <dependency>
65                 <groupId>org.onap.dcaegen2.services.sdk.rest.services</groupId>
66                 <artifactId>dmaap-client</artifactId>
67                 <version>${sdk.version}</version>
68             </dependency>
69             <dependency>
70                 <groupId>org.onap.dcaegen2.services.sdk.rest.services</groupId>
71                 <artifactId>common-dependency</artifactId>
72                 <version>${common.sdk.version}</version>
73             </dependency>
74             <dependency>
75                 <groupId>io.springfox</groupId>
76                 <artifactId>springfox-swagger2</artifactId>
77                 <version>${springfox-swagger.version}</version>
78             </dependency>
79             <dependency>
80                 <groupId>io.springfox</groupId>
81                 <artifactId>springfox-swagger-ui</artifactId>
82                 <version>${springfox-swagger.version}</version>
83             </dependency>
84             <dependency>
85                 <groupId>org.immutables</groupId>
86                 <artifactId>value</artifactId>
87                 <version>${immutables.version}</version>
88             </dependency>
89             <dependency>
90                 <groupId>org.immutables</groupId>
91                 <artifactId>gson</artifactId>
92                 <version>${immutables.version}</version>
93             </dependency>
94             <dependency>
95                 <groupId>org.hibernate</groupId>
96                 <artifactId>hibernate-validator</artifactId>
97                 <version>${hibernate-validator.version}</version>
98             </dependency>
99             <dependency>
100                 <groupId>org.springframework.boot</groupId>
101                 <artifactId>spring-boot-dependencies</artifactId>
102                 <version>${spring-boot.version}</version>
103                 <type>pom</type>
104                 <scope>import</scope>
105             </dependency>
106             <dependency>
107                 <groupId>com.github.tomakehurst</groupId>
108                 <artifactId>wiremock-jre8</artifactId>
109                 <version>${wiremock.version}</version>
110             </dependency>
111         </dependencies>
112     </dependencyManagement>
113
114     <dependencies>
115         <dependency>
116             <groupId>org.onap.dcaegen2.services.sdk.rest.services</groupId>
117             <artifactId>cbs-client</artifactId>
118         </dependency>
119         <dependency>
120             <groupId>org.onap.dcaegen2.services.sdk.rest.services</groupId>
121             <artifactId>aai-client</artifactId>
122         </dependency>
123         <dependency>
124             <groupId>org.onap.dcaegen2.services.sdk.rest.services</groupId>
125             <artifactId>dmaap-client</artifactId>
126         </dependency>
127         <dependency>
128             <groupId>org.onap.dcaegen2.services.sdk.rest.services</groupId>
129             <artifactId>common-dependency</artifactId>
130         </dependency>
131         <dependency>
132             <groupId>org.springframework.boot</groupId>
133             <artifactId>spring-boot-starter-web</artifactId>
134         </dependency>
135         <dependency>
136             <groupId>org.springframework.boot</groupId>
137             <artifactId>spring-boot-starter-webflux</artifactId>
138         </dependency>
139         <dependency>
140             <groupId>org.springframework.boot</groupId>
141             <artifactId>spring-boot-starter-test</artifactId>
142             <scope>test</scope>
143         </dependency>
144         <dependency>
145             <groupId>io.springfox</groupId>
146             <artifactId>springfox-swagger2</artifactId>
147         </dependency>
148         <dependency>
149             <groupId>io.springfox</groupId>
150             <artifactId>springfox-swagger-ui</artifactId>
151         </dependency>
152         <dependency>
153             <groupId>io.projectreactor</groupId>
154             <artifactId>reactor-core</artifactId>
155         </dependency>
156         <dependency>
157             <groupId>org.apache.tomcat.embed</groupId>
158             <artifactId>tomcat-embed-core</artifactId>
159         </dependency>
160         <dependency>
161             <groupId>org.apache.tomcat.embed</groupId>
162             <artifactId>tomcat-embed-el</artifactId>
163         </dependency>
164         <dependency>
165             <groupId>org.apache.tomcat.embed</groupId>
166             <artifactId>tomcat-embed-websocket</artifactId>
167         </dependency>
168         <dependency>
169             <groupId>org.immutables</groupId>
170             <artifactId>value</artifactId>
171         </dependency>
172         <dependency>
173             <groupId>org.immutables</groupId>
174             <artifactId>gson</artifactId>
175         </dependency>
176         <dependency>
177             <groupId>org.junit.jupiter</groupId>
178             <artifactId>junit-jupiter-engine</artifactId>
179             <scope>test</scope>
180         </dependency>
181         <dependency>
182             <groupId>org.mockito</groupId>
183             <artifactId>mockito-core</artifactId>
184             <scope>test</scope>
185         </dependency>
186         <dependency>
187             <groupId>io.projectreactor</groupId>
188             <artifactId>reactor-test</artifactId>
189             <scope>test</scope>
190         </dependency>
191         <dependency>
192             <groupId>org.projectlombok</groupId>
193             <artifactId>lombok</artifactId>
194         </dependency>
195         <dependency>
196             <groupId>org.hibernate</groupId>
197             <artifactId>hibernate-validator</artifactId>
198         </dependency>
199         <dependency>
200             <groupId>com.github.tomakehurst</groupId>
201             <artifactId>wiremock-jre8</artifactId>
202             <scope>test</scope>
203         </dependency>
204     </dependencies>
205
206     <build>
207         <pluginManagement>
208             <plugins>
209                 <plugin>
210                     <groupId>org.apache.maven.plugins</groupId>
211                     <artifactId>maven-compiler-plugin</artifactId>
212                     <version>3.7.0</version>
213                     <configuration>
214                         <source>${java.version}</source>
215                         <target>${java.version}</target>
216                         <encoding>${project.build.sourceEncoding}</encoding>
217                         <showWarnings>true</showWarnings>
218                         <showDeprecation>true</showDeprecation>
219                     </configuration>
220                 </plugin>
221                 <plugin>
222                     <groupId>org.apache.maven.plugins</groupId>
223                     <artifactId>maven-resources-plugin</artifactId>
224                     <version>3.1.0</version>
225                     <configuration>
226                         <encoding>${project.build.sourceEncoding}</encoding>
227                     </configuration>
228                 </plugin>
229                 <plugin>
230                     <groupId>org.apache.maven.plugins</groupId>
231                     <artifactId>maven-enforcer-plugin</artifactId>
232                     <configuration>
233                         <skip>true</skip>
234                     </configuration>
235                 </plugin>
236                 <plugin>
237                     <groupId>org.apache.maven.plugins</groupId>
238                     <artifactId>maven-deploy-plugin</artifactId>
239                     <configuration>
240                         <skip>true</skip>
241                     </configuration>
242                 </plugin>
243                 <plugin>
244                     <groupId>org.springframework.boot</groupId>
245                     <artifactId>spring-boot-maven-plugin</artifactId>
246                     <version>${spring-boot.version}</version>
247                     <executions>
248                         <execution>
249                             <goals>
250                                 <goal>repackage</goal>
251                             </goals>
252                         </execution>
253                     </executions>
254                 </plugin>
255                 <plugin>
256                     <groupId>pl.project13.maven</groupId>
257                     <artifactId>git-commit-id-plugin</artifactId>
258                     <version>2.2.6</version>
259                 </plugin>
260                 <plugin>
261                     <groupId>org.apache.maven.plugins</groupId>
262                     <artifactId>maven-jar-plugin</artifactId>
263                     <version>3.1.1</version>
264                 </plugin>
265                 <plugin>
266                     <groupId>com.spotify</groupId>
267                     <artifactId>docker-maven-plugin</artifactId>
268                     <version>1.2.0</version>
269                 </plugin>
270                 <plugin>
271                     <groupId>org.apache.maven.plugins</groupId>
272                     <artifactId>maven-surefire-plugin</artifactId>
273                     <version>2.19.1</version>
274                     <dependencies>
275                         <dependency>
276                             <groupId>org.junit.platform</groupId>
277                             <artifactId>junit-platform-surefire-provider</artifactId>
278                             <version>${junit-platform.version}</version>
279                         </dependency>
280                     </dependencies>
281                 </plugin>
282             </plugins>
283         </pluginManagement>
284         <plugins>
285             <plugin>
286                 <groupId>pl.project13.maven</groupId>
287                 <artifactId>git-commit-id-plugin</artifactId>
288                 <configuration>
289                     <dateFormat>${maven.build.timestamp.format}</dateFormat>
290                     <generateGitPropertiesFile>true</generateGitPropertiesFile>
291                     <format>json</format>
292                     <generateGitPropertiesFilename>${project.build.outputDirectory}/git_info.json</generateGitPropertiesFilename>
293                 </configuration>
294                 <executions>
295                     <execution>
296                         <id>get-git-info</id>
297                         <goals>
298                             <goal>revision</goal>
299                         </goals>
300                     </execution>
301                 </executions>
302             </plugin>
303             <plugin>
304                 <groupId>org.apache.maven.plugins</groupId>
305                 <artifactId>maven-jar-plugin</artifactId>
306                 <configuration>
307                     <archive>
308                         <manifest>
309                             <addClasspath>true</addClasspath>
310                             <classpathPrefix>./${dependency.dir.name}/</classpathPrefix>
311                             <useUniqueVersions>false</useUniqueVersions>
312                             <mainClass>${bbs-event-processor.main.class}</mainClass>
313                             <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
314                         </manifest>
315                         <manifestEntries>
316                             <Build-Time>${maven.build.timestamp}</Build-Time>
317                         </manifestEntries>
318                     </archive>
319                 </configuration>
320             </plugin>
321             <plugin>
322                 <groupId>org.apache.maven.plugins</groupId>
323                 <artifactId>maven-dependency-plugin</artifactId>
324                 <configuration>
325                     <outputDirectory>${dependency.dir.location}</outputDirectory>
326                     <includeScope>runtime</includeScope>
327                     <silent>true</silent>
328                 </configuration>
329                 <executions>
330                     <execution>
331                         <id>copy-external-dependencies</id>
332                         <phase>package</phase>
333                         <goals>
334                             <goal>copy-dependencies</goal>
335                         </goals>
336                     </execution>
337                 </executions>
338             </plugin>
339             <plugin>
340                 <groupId>com.spotify</groupId>
341                 <artifactId>docker-maven-plugin</artifactId>
342                 <configuration>
343                     <serverId>${onap.nexus.dockerregistry.daily}</serverId>
344                     <imageName>${docker.image.name}</imageName>
345                     <imageTags>
346                         <tag>latest</tag>
347                     </imageTags>
348                     <baseImage>openjdk:${java.version}-jre-alpine</baseImage>
349                     <workdir>${docker.artifact.dir}</workdir>
350                     <resources>
351                         <resource>
352                             <directory>${dependency.dir.location}</directory>
353                             <targetPath>${dependency.dir.name}</targetPath>
354                         </resource>
355                         <resource>
356                             <directory>${project.build.directory}</directory>
357                             <include>${project.build.finalName}.jar</include>
358                         </resource>
359                     </resources>
360                     <exposes>
361                         <expose>8100</expose>
362                     </exposes>
363                     <entryPoint>["java", "-jar", "${project.build.finalName}.jar"]</entryPoint>
364                 </configuration>
365                 <executions>
366                     <execution>
367                         <id>build-bbs-event-processor-image</id>
368                         <phase>deploy</phase>
369                         <goals>
370                             <goal>build</goal>
371                         </goals>
372                     </execution>
373                     <execution>
374                         <id>tag-and-push-image-latest</id>
375                         <phase>deploy</phase>
376                         <goals>
377                             <goal>tag</goal>
378                         </goals>
379                         <configuration>
380                             <image>${docker.image.name}:latest</image>
381                             <newName>${onap.nexus.dockerregistry.daily}/${docker.image.name}:latest</newName>
382                             <pushImage>true</pushImage>
383                         </configuration>
384                     </execution>
385                     <execution>
386                         <id>tag-and-push-image-with-version</id>
387                         <phase>deploy</phase>
388                         <goals>
389                             <goal>tag</goal>
390                         </goals>
391                         <configuration>
392                             <image>${docker.image.name}:latest</image>
393                             <newName>${onap.nexus.dockerregistry.daily}/${docker.image.name}:${project.version}</newName>
394                             <pushImage>true</pushImage>
395                         </configuration>
396                     </execution>
397                     <execution>
398                         <id>tag-and-push-image-with-version-and-date</id>
399                         <phase>deploy</phase>
400                         <goals>
401                             <goal>tag</goal>
402                         </goals>
403                         <configuration>
404                             <image>${docker.image.name}:latest</image>
405                             <newName>${onap.nexus.dockerregistry.daily}/${docker.image.name}:${project.version}-${maven.build.timestamp}Z</newName>
406                             <pushImage>true</pushImage>
407                         </configuration>
408                     </execution>
409                 </executions>
410             </plugin>
411         </plugins>
412     </build>
413 </project>