Add 2.1.1-container release yaml
[dcaegen2/services/son-handler.git] / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3 /*******************************************************************************
4  *  ============LICENSE_START=======================================================
5  *  son-handler
6  *  ================================================================================
7  *   Copyright (C) 2019-2020 Wipro Limited.
8  *   ==============================================================================
9  *     Licensed under the Apache License, Version 2.0 (the "License");
10  *     you may not use this file except in compliance with the License.
11  *     You may obtain a copy of the License at
12  *
13  *          http://www.apache.org/licenses/LICENSE-2.0
14  *
15  *     Unless required by applicable law or agreed to in writing, software
16  *     distributed under the License is distributed on an "AS IS" BASIS,
17  *     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  *     See the License for the specific language governing permissions and
19  *     limitations under the License.
20  *     ============LICENSE_END=========================================================
21  *
22  *******************************************************************************/
23   -->
24 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
25         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
26         <modelVersion>4.0.0</modelVersion>
27         <groupId>org.onap.dcaegen2.services.son-handler</groupId>
28         <artifactId>son-handler</artifactId>
29         <name>dcaegen2-services-son-handler</name>
30         <version>2.1.1-SNAPSHOT</version>
31
32         <!--parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId>
33                 <version>2.0.4.RELEASE</version> </parent -->
34
35         <parent>
36                 <groupId>org.onap.oparent</groupId>
37                 <artifactId>oparent</artifactId>
38                 <version>2.0.0</version>
39                 <relativePath />
40         </parent>
41
42
43         <properties>
44                 <sdk.version>1.1.4</sdk.version>
45                 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
46                 <maven.compiler.source>11</maven.compiler.source>
47                 <maven.compiler.target>11</maven.compiler.target>
48                 <docker.image.name>onap/org.onap.dcaegen2.services.son-handler</docker.image.name>
49                 <!-- NEXUS RELATED SETTINGS -->
50                 <nexusproxy>https://nexus.onap.org</nexusproxy>
51                 <snapshots.path>content/repositories/snapshots/</snapshots.path>
52                 <releases.path>content/repositories/releases/</releases.path>
53                 <site.path>content/sites/site/org/onap/dcaegen2/services/son-handler/${project.artifactId}/${project.version}</site.path>
54                 <maven.build.timestamp.format>yyyyMMdd'T'HHmmss</maven.build.timestamp.format>
55                 <sonar.coverage.jacoco.xmlReportPaths>
56                   ${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml
57                 </sonar.coverage.jacoco.xmlReportPaths>
58         </properties>
59
60         <dependencies>
61                 <!-- https://mvnrepository.com/artifact/org.apache.tomcat/tomcat-util -->
62                 <dependency>
63                         <groupId>org.apache.tomcat</groupId>
64                         <artifactId>tomcat-util</artifactId>
65                         <version>9.0.37</version>
66                 </dependency>
67                 <!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-autoconfigure -->
68                 <dependency>
69                         <groupId>org.springframework.boot</groupId>
70                         <artifactId>spring-boot-autoconfigure</artifactId>
71                         <version>2.3.1.RELEASE</version>
72                 </dependency>
73                 <dependency>
74                         <groupId>org.springframework</groupId>
75                         <artifactId>spring-webmvc</artifactId>
76                         <version>5.2.7.RELEASE</version>
77                 </dependency>
78                 <dependency>
79                          <groupId>org.springframework</groupId>
80                          <artifactId>spring-core</artifactId>
81                          <version>5.2.7.RELEASE</version>
82                 </dependency>
83                 <dependency>
84                         <groupId>org.springframework</groupId>
85                         <artifactId>spring-beans</artifactId>
86                         <version>5.2.7.RELEASE</version>
87                 </dependency>
88                 <dependency>
89                         <groupId>org.springframework</groupId>
90                         <artifactId>spring-expression</artifactId>
91                         <version>5.2.7.RELEASE</version>
92                 </dependency>
93                 <dependency>
94                         <groupId>org.springframework</groupId>
95                         <artifactId>spring-web</artifactId>
96                         <version>5.2.7.RELEASE</version>
97                 </dependency>
98                 <dependency>
99                         <groupId>org.springframework</groupId>
100                         <artifactId>spring-tx</artifactId>
101                         <version>5.2.7.RELEASE</version>
102                 </dependency>
103                 <dependency>
104                         <groupId>org.springframework.data</groupId>
105                         <artifactId>spring-data-commons</artifactId>
106                         <version>2.2.0.RELEASE</version>
107                 </dependency>
108                 <!-- cbs client -->
109                 <dependency>
110                         <groupId>org.onap.dcaegen2.services.sdk.rest.services</groupId>
111                         <artifactId>cbs-client</artifactId>
112                         <version>${sdk.version}</version>
113                 </dependency>
114
115                 <dependency>
116                         <groupId>org.onap.dcaegen2.services.sdk.security.crypt</groupId>
117                         <artifactId>crypt-password</artifactId>
118                         <version>${sdk.version}</version>
119                 </dependency>
120                 <dependency>
121                         <!-- Import dependency management from Spring Boot -->
122                         <groupId>org.springframework.boot</groupId>
123                         <artifactId>spring-boot-dependencies</artifactId>
124                         <version>2.1.3.RELEASE</version>
125                         <type>pom</type>
126                         <scope>import</scope>
127                 </dependency>
128                 <dependency>
129                         <groupId>com.att.nsa</groupId>
130                         <artifactId>cambriaClient</artifactId>
131                         <version>0.0.1</version>
132                 </dependency>
133                 <dependency>
134                         <groupId>junit</groupId>
135                         <artifactId>junit</artifactId>
136                         <scope>test</scope>
137                 </dependency>
138                 <dependency>
139                         <groupId>com.fasterxml.jackson.core</groupId>
140                         <artifactId>jackson-core</artifactId>
141                         <version>2.11.0</version>
142                 </dependency>
143                 <dependency>
144                         <groupId>com.fasterxml.jackson.core</groupId>
145                         <artifactId>jackson-databind</artifactId>
146                         <version>2.11.0</version>
147                 </dependency>
148                 <!-- https://mvnrepository.com/artifact/javax.json/javax.json-api -->
149                 <dependency>
150                         <groupId>javax.json</groupId>
151                         <artifactId>javax.json-api</artifactId>
152                         <version>1.1.2</version>
153                 </dependency>
154                 <dependency>
155                         <groupId>org.springframework.boot</groupId>
156                         <artifactId>spring-boot-starter-web</artifactId>
157                         <version>2.1.3.RELEASE</version>
158                         <exclusions>
159                                 <exclusion>
160                                         <groupId>org.springframework.boot</groupId>
161                                         <artifactId>spring-boot-starter-tomcat</artifactId>
162                                 </exclusion>
163                         </exclusions>
164                 </dependency>
165                 <dependency>
166                         <groupId>org.postgresql</groupId>
167                         <artifactId>postgresql</artifactId>
168                         <version>42.2.5</version>
169                 </dependency>
170                 <dependency>
171                         <groupId>org.springframework.boot</groupId>
172                         <artifactId>spring-boot-starter-data-jpa</artifactId>
173                         <version>2.1.3.RELEASE</version>
174                 </dependency>
175                 <dependency>
176                         <groupId>org.hibernate.javax.persistence</groupId>
177                         <artifactId>hibernate-jpa-2.0-api</artifactId>
178                         <version>1.0.1.Final</version>
179                 </dependency>
180                 <!-- https://mvnrepository.com/artifact/org.springframework/spring-beans -->
181                 <dependency>
182                         <groupId>org.springframework.boot</groupId>
183                         <artifactId>spring-boot-starter-test</artifactId>
184                         <version>2.1.3.RELEASE</version>
185                         <scope>test</scope>
186                         <!-- exclusions> <exclusion> <groupId>org.mockito</groupId> <artifactId>mockito-core</artifactId>
187                                 </exclusion> </exclusions -->
188                 </dependency>
189                 <!-- https://mvnrepository.com/artifact/org.mockito/mockito-core -->
190                 <dependency>
191                         <groupId>org.mockito</groupId>
192                         <artifactId>mockito-core</artifactId>
193                         <version>2.21.0</version>
194                         <scope>test</scope>
195                 </dependency>
196                 <dependency>
197                         <groupId>junit</groupId>
198                         <artifactId>junit</artifactId>
199                         <version>4.12</version>
200                         <scope>test</scope>
201                 </dependency>
202                 <!-- https://mvnrepository.com/artifact/org.powermock/powermock-api-mockito2 -->
203                 <dependency>
204                         <groupId>org.powermock</groupId>
205                         <artifactId>powermock-api-mockito2</artifactId>
206                         <version>2.0.2</version>
207                         <exclusions>
208                                 <exclusion>
209                                         <groupId>org.mockito</groupId>
210                                         <artifactId>mockito-all</artifactId>
211                                 </exclusion>
212                         </exclusions>
213                 </dependency>
214                 <!-- https://mvnrepository.com/artifact/org.powermock/powermock-module-junit4 -->
215                 <dependency>
216                         <groupId>org.powermock</groupId>
217                         <artifactId>powermock-module-junit4</artifactId>
218                         <version>2.0.2</version>
219                         <scope>test</scope>
220                 </dependency>
221
222                 <dependency>
223                     <groupId>org.functionaljava</groupId>
224                     <artifactId>functionaljava</artifactId>
225                     <version>3.0</version>
226             </dependency>
227
228             <dependency>
229                     <groupId>org.apache.httpcomponents</groupId>
230                     <artifactId>httpclient</artifactId>
231                 <version>4.5.7</version>
232             </dependency>
233
234            <!-- https://mvnrepository.com/artifact/commons-beanutils/commons-beanutils -->
235             <dependency>
236                    <groupId>commons-beanutils</groupId>
237                    <artifactId>commons-beanutils</artifactId>
238                    <version>1.9.4</version>
239             </dependency>
240             <!-- mvnrepository.com/artifact/org.eclipse.jetty/jetty-server -->
241             <dependency>
242                    <groupId>org.eclipse.jetty</groupId>
243                    <artifactId>jetty-server</artifactId>
244                    <version>9.4.17.v20190418</version>
245             </dependency>
246             <!-- https://mvnrepository.com/artifact/org.webjars/bootstrap -->
247             <dependency>
248                    <groupId>org.webjars</groupId>
249                    <artifactId>bootstrap</artifactId>
250                    <version>4.3.1</version>
251             </dependency>
252             <!-- https://mvnrepository.com/artifact/javax.xml.bind/jaxb-api -->
253             <dependency>
254                    <groupId>javax.xml.bind</groupId>
255                    <artifactId>jaxb-api</artifactId>
256                    <version>2.3.0</version>
257             </dependency>
258             <!-- https://mvnrepository.com/artifact/org.javassist/javassist -->
259             <dependency>
260                    <groupId>org.javassist</groupId>
261                    <artifactId>javassist</artifactId>
262                    <version>3.24.1-GA</version>
263             </dependency>
264             <dependency>
265                     <groupId>org.apache.tomcat.embed</groupId>
266                     <artifactId>tomcat-embed-core</artifactId>
267                    <version>9.0.36</version>
268             </dependency>
269         </dependencies>
270
271         <build>
272                 <plugins>
273
274                         <!--plugin> <groupId>org.eclipse.m2e</groupId> <artifactId>lifecycle-mapping</artifactId>
275                                 <configuration> <lifecycleMappingMetadata> <pluginExecutions> <pluginExecution>
276                                 <pluginExecutionFilter> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-checkstyle-plugin</artifactId>
277                                 <versionRange>2.17,)</versionRange> <goals> <goal>check</goal> </goals> </pluginExecutionFilter>
278                                 <action> <ignore /> </action> </pluginExecution> </pluginExecutions> </lifecycleMappingMetadata>
279                                 </configuration> </plugin -->
280                         <plugin>
281                                 <groupId>org.springframework.boot</groupId>
282                                 <artifactId>spring-boot-maven-plugin</artifactId>
283                                 <version>2.3.1.RELEASE</version>
284                                 <executions>
285                                         <execution>
286                                                 <goals>
287                                                         <goal>repackage</goal>
288                                                 </goals>
289                                         </execution>
290                                 </executions>
291                         </plugin>
292                         <plugin>
293                                 <groupId>com.spotify</groupId>
294                                 <artifactId>docker-maven-plugin</artifactId>
295                                 <configuration>
296                                         <serverId>${onap.nexus.dockerregistry.daily}</serverId>
297
298                                         <imageName>${onap.nexus.dockerregistry.daily}/${docker.image.name}</imageName>
299                                         <imageTags>
300                                                 <imageTag>${project.version}-${maven.build.timestamp}Z</imageTag>
301                                                 <imageTag>${project.version}</imageTag>
302                                                 <imageTag>latest</imageTag>
303                                         </imageTags>
304                                         <baseImage>openjdk:11.0.6-jre-slim</baseImage>
305                                         <user>sonhms</user>
306                                         <resources>
307                                                 <resource>
308                                                         <targetPath>/bin</targetPath>
309                                                         <directory>${project.build.directory}</directory>
310                                                         <include>${project.artifactId}-${project.version}.jar</include>
311                                                 </resource>
312                                         </resources>
313                                         <runs>
314                                                 <!-- Maven is loosing file permissions during artifacts copy -->
315                                                 <run>adduser --disabled-password sonhms </run>
316                                                 <run>mv /bin/*.jar /bin/application.jar</run>
317                                                 <run>chmod -R 777 /bin</run>
318                                         </runs>
319                                         <exposes>
320                                                 <expose>8080</expose>
321                                         </exposes>
322                                         <entryPoint>java -jar /bin/application.jar</entryPoint>
323                                 </configuration>
324 <!--
325                                 <executions>
326                                         <execution>
327                                                 <id>build-image</id>
328                                                 <phase>package</phase>
329                                                 <goals>
330                                                         <goal>build</goal>
331                                                 </goals>
332                                         </execution>
333                                         <execution>
334                                                 <id>tag-and-push-image-latest</id>
335                                                 <phase>deploy</phase>
336                                                 <goals>
337                                                         <goal>tag</goal>
338                                                 </goals>
339                                                 <configuration>
340                                                         <image>${docker.image.name}:latest</image>
341                                                         <newName>${onap.nexus.dockerregistry.daily}/${docker.image.name}:latest</newName>
342                                                         <pushImage>true</pushImage>
343                                                 </configuration>
344                                         </execution>
345                                         <execution>
346                                                 <id>tag-and-push-image-with-version</id>
347                                                 <phase>deploy</phase>
348                                                 <goals>
349                                                         <goal>tag</goal>
350                                                 </goals>
351                                                 <configuration>
352                                                         <image>${docker.image.name}:latest</image>
353                                                         <newName>${onap.nexus.dockerregistry.daily}/${docker.image.name}:${project.version}</newName>
354                                                         <pushImage>true</pushImage>
355                                                 </configuration>
356                                         </execution>
357                                         <execution>
358                                                 <id>tag-and-push-image-with-version-and-date</id>
359                                                 <phase>deploy</phase>
360                                                 <goals>
361                                                         <goal>tag</goal>
362                                                 </goals>
363                                                 <configuration>
364                                                         <image>${docker.image.name}:latest</image>
365                                                         <newName>${onap.nexus.dockerregistry.daily}/${docker.image.name}:${project.version}-${maven.build.timestamp}Z</newName>
366                                                         <pushImage>true</pushImage>
367                                                 </configuration>
368                                         </execution>
369                                 </executions>
370 -->
371                         </plugin>
372                 </plugins>
373         </build>
374 </project>
375
376