1 <?xml version="1.0" encoding="UTF-8"?>
3 /*******************************************************************************
4 * ============LICENSE_START=======================================================
6 * ================================================================================
7 * Copyright (C) 2019-2022 Wipro Limited.
8 * Copyright (C) 2022 Huawei Technologies Co., Ltd.
9 * Copyright (C) 2022 AT&T. All rights reserved.
10 * Copyright (c) 2023 Deutsche Telekom AG. All rights reserved.
11 * ==============================================================================
12 * Licensed under the Apache License, Version 2.0 (the "License");
13 * you may not use this file except in compliance with the License.
14 * You may obtain a copy of the License at
16 * http://www.apache.org/licenses/LICENSE-2.0
18 * Unless required by applicable law or agreed to in writing, software
19 * distributed under the License is distributed on an "AS IS" BASIS,
20 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21 * See the License for the specific language governing permissions and
22 * limitations under the License.
23 * ============LICENSE_END=========================================================
25 *******************************************************************************/
27 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
28 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
29 <modelVersion>4.0.0</modelVersion>
30 <groupId>org.onap.dcaegen2.services.son-handler</groupId>
31 <artifactId>son-handler</artifactId>
32 <name>dcaegen2-services-son-handler</name>
33 <version>2.2.1-SNAPSHOT</version>
35 <!--parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId>
36 <version>2.0.4.RELEASE</version> </parent -->
39 <groupId>org.onap.oparent</groupId>
40 <artifactId>oparent</artifactId>
41 <version>2.0.0</version>
47 <sdk.version>1.8.6</sdk.version>
48 <spring.version>5.3.25</spring.version>
49 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
50 <maven.compiler.source>11</maven.compiler.source>
51 <maven.compiler.target>11</maven.compiler.target>
52 <docker.image.name>onap/org.onap.dcaegen2.services.son-handler</docker.image.name>
53 <!-- NEXUS RELATED SETTINGS -->
54 <nexusproxy>https://nexus.onap.org</nexusproxy>
55 <snapshots.path>content/repositories/snapshots/</snapshots.path>
56 <releases.path>content/repositories/releases/</releases.path>
57 <site.path>content/sites/site/org/onap/dcaegen2/services/son-handler/${project.artifactId}/${project.version}</site.path>
58 <maven.build.timestamp.format>yyyyMMdd'T'HHmmss</maven.build.timestamp.format>
59 <sonar.coverage.jacoco.xmlReportPaths>
60 ${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml
61 </sonar.coverage.jacoco.xmlReportPaths>
65 <!-- https://mvnrepository.com/artifact/org.apache.tomcat/tomcat-util -->
67 <groupId>org.apache.tomcat</groupId>
68 <artifactId>tomcat-util</artifactId>
69 <version>9.0.37</version>
71 <!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-autoconfigure -->
73 <groupId>org.springframework.boot</groupId>
74 <artifactId>spring-boot-autoconfigure</artifactId>
75 <version>2.3.1.RELEASE</version>
78 <groupId>org.springframework</groupId>
79 <artifactId>spring-webmvc</artifactId>
80 <version>${spring.version}</version>
83 <groupId>org.springframework</groupId>
84 <artifactId>spring-core</artifactId>
85 <version>${spring.version}</version>
88 <groupId>org.springframework</groupId>
89 <artifactId>spring-beans</artifactId>
90 <version>${spring.version}</version>
93 <groupId>org.springframework</groupId>
94 <artifactId>spring-expression</artifactId>
95 <version>${spring.version}</version>
98 <groupId>org.springframework</groupId>
99 <artifactId>spring-web</artifactId>
100 <version>${spring.version}</version>
103 <groupId>org.springframework</groupId>
104 <artifactId>spring-tx</artifactId>
105 <version>${spring.version}</version>
108 <groupId>org.springframework.data</groupId>
109 <artifactId>spring-data-commons</artifactId>
110 <version>2.2.0.RELEASE</version>
112 <!-- https://mvnrepository.com/artifact/io.projectreactor.netty/reactor-netty -->
114 <groupId>io.projectreactor.netty</groupId>
115 <artifactId>reactor-netty</artifactId>
116 <version>1.1.0</version>
120 <groupId>org.onap.dcaegen2.services.sdk.rest.services</groupId>
121 <artifactId>cbs-client</artifactId>
122 <version>${sdk.version}</version>
125 <groupId>org.onap.dcaegen2.services.sdk.security.crypt</groupId>
126 <artifactId>crypt-password</artifactId>
127 <version>${sdk.version}</version>
130 <!-- Import dependency management from Spring Boot -->
131 <groupId>org.springframework.boot</groupId>
132 <artifactId>spring-boot-dependencies</artifactId>
133 <version>2.1.3.RELEASE</version>
135 <scope>import</scope>
138 <groupId>com.att.nsa</groupId>
139 <artifactId>cambriaClient</artifactId>
140 <version>0.0.1</version>
143 <groupId>junit</groupId>
144 <artifactId>junit</artifactId>
148 <groupId>com.fasterxml.jackson.core</groupId>
149 <artifactId>jackson-core</artifactId>
150 <version>2.14.1</version>
153 <groupId>com.fasterxml.jackson.core</groupId>
154 <artifactId>jackson-databind</artifactId>
155 <version>2.14.1</version>
157 <!-- https://mvnrepository.com/artifact/javax.json/javax.json-api -->
159 <groupId>javax.json</groupId>
160 <artifactId>javax.json-api</artifactId>
161 <version>1.1.2</version>
164 <groupId>org.springframework.boot</groupId>
165 <artifactId>spring-boot-starter-web</artifactId>
166 <version>2.1.3.RELEASE</version>
169 <groupId>org.springframework.boot</groupId>
170 <artifactId>spring-boot-starter-tomcat</artifactId>
175 <groupId>org.postgresql</groupId>
176 <artifactId>postgresql</artifactId>
177 <version>42.5.1</version>
180 <groupId>org.springframework.boot</groupId>
181 <artifactId>spring-boot-starter-data-jpa</artifactId>
182 <version>2.1.3.RELEASE</version>
185 <groupId>org.hibernate.javax.persistence</groupId>
186 <artifactId>hibernate-jpa-2.0-api</artifactId>
187 <version>1.0.1.Final</version>
189 <!-- https://mvnrepository.com/artifact/org.springframework/spring-beans -->
191 <groupId>org.springframework.boot</groupId>
192 <artifactId>spring-boot-starter-test</artifactId>
193 <version>2.1.3.RELEASE</version>
195 <!-- exclusions> <exclusion> <groupId>org.mockito</groupId> <artifactId>mockito-core</artifactId>
196 </exclusion> </exclusions -->
198 <!-- https://mvnrepository.com/artifact/org.mockito/mockito-core -->
200 <groupId>org.mockito</groupId>
201 <artifactId>mockito-core</artifactId>
202 <version>2.21.0</version>
206 <groupId>junit</groupId>
207 <artifactId>junit</artifactId>
208 <version>4.12</version>
211 <!-- https://mvnrepository.com/artifact/org.powermock/powermock-api-mockito2 -->
213 <groupId>org.powermock</groupId>
214 <artifactId>powermock-api-mockito2</artifactId>
215 <version>2.0.2</version>
218 <groupId>org.mockito</groupId>
219 <artifactId>mockito-all</artifactId>
223 <!-- https://mvnrepository.com/artifact/org.powermock/powermock-module-junit4 -->
225 <groupId>org.powermock</groupId>
226 <artifactId>powermock-module-junit4</artifactId>
227 <version>2.0.2</version>
232 <groupId>org.functionaljava</groupId>
233 <artifactId>functionaljava</artifactId>
234 <version>3.0</version>
238 <groupId>org.apache.httpcomponents</groupId>
239 <artifactId>httpclient</artifactId>
240 <version>4.5.13</version>
243 <!-- https://mvnrepository.com/artifact/commons-beanutils/commons-beanutils -->
245 <groupId>commons-beanutils</groupId>
246 <artifactId>commons-beanutils</artifactId>
247 <version>1.9.4</version>
249 <!-- mvnrepository.com/artifact/org.eclipse.jetty/jetty-server -->
251 <groupId>org.eclipse.jetty</groupId>
252 <artifactId>jetty-server</artifactId>
253 <version>11.0.12</version>
255 <!-- https://mvnrepository.com/artifact/org.webjars/bootstrap -->
257 <groupId>org.webjars</groupId>
258 <artifactId>bootstrap</artifactId>
259 <version>4.3.1</version>
261 <!-- https://mvnrepository.com/artifact/javax.xml.bind/jaxb-api -->
263 <groupId>javax.xml.bind</groupId>
264 <artifactId>jaxb-api</artifactId>
265 <version>2.3.0</version>
267 <!-- https://mvnrepository.com/artifact/org.javassist/javassist -->
269 <groupId>org.javassist</groupId>
270 <artifactId>javassist</artifactId>
271 <version>3.24.1-GA</version>
274 <groupId>org.apache.tomcat.embed</groupId>
275 <artifactId>tomcat-embed-core</artifactId>
276 <version>9.0.72</version>
279 <groupId>ch.qos.logback</groupId>
280 <artifactId>logback-core</artifactId>
281 <version>1.4.5</version>
288 <!--plugin> <groupId>org.eclipse.m2e</groupId> <artifactId>lifecycle-mapping</artifactId>
289 <configuration> <lifecycleMappingMetadata> <pluginExecutions> <pluginExecution>
290 <pluginExecutionFilter> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-checkstyle-plugin</artifactId>
291 <versionRange>2.17,)</versionRange> <goals> <goal>check</goal> </goals> </pluginExecutionFilter>
292 <action> <ignore /> </action> </pluginExecution> </pluginExecutions> </lifecycleMappingMetadata>
293 </configuration> </plugin -->
295 <groupId>org.springframework.boot</groupId>
296 <artifactId>spring-boot-maven-plugin</artifactId>
297 <version>2.3.1.RELEASE</version>
301 <goal>repackage</goal>
307 <groupId>com.spotify</groupId>
308 <artifactId>docker-maven-plugin</artifactId>
310 <serverId>${onap.nexus.dockerregistry.daily}</serverId>
312 <imageName>${onap.nexus.dockerregistry.daily}/${docker.image.name}</imageName>
314 <imageTag>${project.version}-${maven.build.timestamp}Z</imageTag>
315 <imageTag>${project.version}</imageTag>
316 <imageTag>latest</imageTag>
318 <baseImage>openjdk:11.0.6-jre-slim</baseImage>
322 <targetPath>/bin</targetPath>
323 <directory>${project.build.directory}</directory>
324 <include>${project.artifactId}-${project.version}.jar</include>
328 <!-- Maven is loosing file permissions during artifacts copy -->
329 <run>adduser --disabled-password sonhms </run>
330 <run>mv /bin/*.jar /bin/application.jar</run>
331 <run>chmod -R 777 /bin</run>
334 <expose>8080</expose>
336 <entryPoint>java -jar /bin/application.jar</entryPoint>
342 <phase>package</phase>
348 <id>tag-and-push-image-latest</id>
349 <phase>deploy</phase>
354 <image>${docker.image.name}:latest</image>
355 <newName>${onap.nexus.dockerregistry.daily}/${docker.image.name}:latest</newName>
356 <pushImage>true</pushImage>
360 <id>tag-and-push-image-with-version</id>
361 <phase>deploy</phase>
366 <image>${docker.image.name}:latest</image>
367 <newName>${onap.nexus.dockerregistry.daily}/${docker.image.name}:${project.version}</newName>
368 <pushImage>true</pushImage>
372 <id>tag-and-push-image-with-version-and-date</id>
373 <phase>deploy</phase>
378 <image>${docker.image.name}:latest</image>
379 <newName>${onap.nexus.dockerregistry.daily}/${docker.image.name}:${project.version}-${maven.build.timestamp}Z</newName>
380 <pushImage>true</pushImage>