Implement Enhancements to the Microservice
[dcaegen2/services/son-handler.git] / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!-- ============LICENSE_START======================================================= 
3         son-handler ================================================================================ 
4         Copyright (C) 2019 Wipro Limited. ============================================================================== 
5         Licensed under the Apache License, Version 2.0 (the "License"); you may not 
6         use this file except in compliance with the License. You may obtain a copy 
7         of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required 
8         by applicable law or agreed to in writing, software distributed under the 
9         License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 
10         OF ANY KIND, either express or implied. See the License for the specific 
11         language governing permissions and limitations under the License. ============LICENSE_END========================================================= -->
12 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
13         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
14         <modelVersion>4.0.0</modelVersion>
15         <groupId>org.onap.dcaegen2.services.son-handler</groupId>
16         <artifactId>son-handler</artifactId>
17         <name>dcaegen2-services-son-handler</name>
18         <version>1.0.0-SNAPSHOT</version>
19
20         <!--parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> 
21                 <version>2.0.4.RELEASE</version> </parent -->
22
23         <parent>
24                 <groupId>org.onap.oparent</groupId>
25                 <artifactId>oparent</artifactId>
26                 <version>1.2.1</version>
27                 <relativePath />
28         </parent>
29
30
31         <properties>
32                 <sdk.version>1.1.4-SNAPSHOT</sdk.version>
33                 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
34                 <maven.compiler.source>1.8</maven.compiler.source>
35                 <maven.compiler.target>1.8</maven.compiler.target>
36                 <docker.image.name>onap/org.onap.dcaegen2.services.son-handler</docker.image.name>
37                 <!-- NEXUS RELATED SETTINGS -->
38                 <nexusproxy>https://nexus.onap.org</nexusproxy>
39                 <snapshots.path>content/repositories/snapshots/</snapshots.path>
40                 <releases.path>content/repositories/releases/</releases.path>
41                 <site.path>content/sites/site/org/onap/dcaegen2/services/son-handler/${project.artifactId}/${project.version}</site.path>
42                 <maven.build.timestamp.format>yyyyMMdd'T'HHmmss</maven.build.timestamp.format>
43         </properties>
44
45         <dependencies>
46                 <!-- cbs client -->
47                 <dependency>
48                         <groupId>org.onap.dcaegen2.services.sdk.rest.services</groupId>
49                         <artifactId>cbs-client</artifactId>
50                         <version>${sdk.version}</version>
51                 </dependency>
52
53                 <dependency>
54                         <groupId>org.onap.dcaegen2.services.sdk.security.crypt</groupId>
55                         <artifactId>crypt-password</artifactId>
56                         <version>${sdk.version}</version>
57                 </dependency>
58                 <dependency>
59                         <!-- Import dependency management from Spring Boot -->
60                         <groupId>org.springframework.boot</groupId>
61                         <artifactId>spring-boot-dependencies</artifactId>
62                         <version>2.0.4.RELEASE</version>
63                         <type>pom</type>
64                         <scope>import</scope>
65                 </dependency>
66                 <dependency>
67                         <groupId>com.att.nsa</groupId>
68                         <artifactId>cambriaClient</artifactId>
69                         <version>0.0.1</version>
70                 </dependency>
71                 <dependency>
72                         <groupId>junit</groupId>
73                         <artifactId>junit</artifactId>
74                         <scope>test</scope>
75                 </dependency>
76                 <dependency>
77                         <groupId>com.fasterxml.jackson.core</groupId>
78                         <artifactId>jackson-core</artifactId>
79                         <version>2.9.8</version>
80                 </dependency>
81                 <dependency>
82                         <groupId>com.fasterxml.jackson.core</groupId>
83                         <artifactId>jackson-databind</artifactId>
84                         <version>2.9.8</version>
85                 </dependency>
86                 <!-- https://mvnrepository.com/artifact/javax.json/javax.json-api -->
87                 <dependency>
88                         <groupId>javax.json</groupId>
89                         <artifactId>javax.json-api</artifactId>
90                         <version>1.1.2</version>
91                 </dependency>
92                 <dependency>
93                         <groupId>org.springframework.boot</groupId>
94                         <artifactId>spring-boot-starter-web</artifactId>
95                         <version>2.0.4.RELEASE</version>
96                 </dependency>
97                 <dependency>
98                         <groupId>org.postgresql</groupId>
99                         <artifactId>postgresql</artifactId>
100                         <version>42.2.5</version>
101                 </dependency>
102                 <dependency>
103                         <groupId>org.springframework.boot</groupId>
104                         <artifactId>spring-boot-starter-data-jpa</artifactId>
105                         <version>2.0.4.RELEASE</version>
106                 </dependency>
107                 <dependency>
108                         <groupId>org.springframework.data</groupId>
109                         <artifactId>spring-data-commons-core</artifactId>
110                         <version>1.4.0.RELEASE</version>
111                 </dependency>
112
113
114
115                 <!-- https://mvnrepository.com/artifact/org.codehaus.jackson/jackson-mapper-asl -->
116                 <dependency>
117                         <groupId>org.codehaus.jackson</groupId>
118                         <artifactId>jackson-mapper-asl</artifactId>
119                         <version>1.9.13</version>
120                 </dependency>
121                 <dependency>
122                         <groupId>org.hibernate.javax.persistence</groupId>
123                         <artifactId>hibernate-jpa-2.0-api</artifactId>
124                         <version>1.0.1.Final</version>
125                 </dependency>
126                 <!-- https://mvnrepository.com/artifact/org.springframework/spring-beans -->
127                 <dependency>
128                         <groupId>org.springframework</groupId>
129                         <artifactId>spring-beans</artifactId>
130                         <version>5.0.10.RELEASE</version>
131                 </dependency>
132
133                 <dependency>
134                         <groupId>org.springframework.boot</groupId>
135                         <artifactId>spring-boot-starter-test</artifactId>
136                         <version>2.0.4.RELEASE</version>
137                         <scope>test</scope>
138                         <!-- exclusions> <exclusion> <groupId>org.mockito</groupId> <artifactId>mockito-core</artifactId> 
139                                 </exclusion> </exclusions -->
140                 </dependency>
141                 <!-- https://mvnrepository.com/artifact/org.mockito/mockito-core -->
142
143                 <dependency>
144                         <groupId>org.mockito</groupId>
145                         <artifactId>mockito-core</artifactId>
146                         <version>1.10.16</version>
147                         <scope>test</scope>
148                 </dependency>
149
150
151                 <dependency>
152                         <groupId>junit</groupId>
153                         <artifactId>junit</artifactId>
154                         <version>4.12</version>
155                         <scope>test</scope>
156                 </dependency>
157                 <!-- https://mvnrepository.com/artifact/org.powermock/powermock-module-junit4 -->
158                 <!-- https://mvnrepository.com/artifact/org.powermock/powermock-api-mockito -->
159                 <dependency>
160                         <groupId>org.powermock</groupId>
161                         <artifactId>powermock-api-mockito</artifactId>
162                         <version>1.6.4</version>
163                         <scope>test</scope>
164                 </dependency>
165                 <!-- https://mvnrepository.com/artifact/org.powermock/powermock-module-junit4 -->
166                 <dependency>
167                         <groupId>org.powermock</groupId>
168                         <artifactId>powermock-module-junit4</artifactId>
169                         <version>1.6.4</version>
170                         <scope>test</scope>
171                 </dependency>
172
173                 <dependency>
174                         <groupId>org.functionaljava</groupId>
175                         <artifactId>functionaljava</artifactId>
176                         <version>3.0</version>
177                 </dependency>
178
179
180         </dependencies>
181
182         <build>
183                 <plugins>
184                         <plugin>
185                                 <artifactId>maven-checkstyle-plugin</artifactId>
186                                 <executions>
187                                         <execution>
188                                                 <id>onap-java-style</id>
189                                                 <goals>
190                                                         <goal>check</goal>
191                                                 </goals>
192                                                 <phase>process-sources</phase>
193                                                 <configuration>
194                                                         <!-- Use Google Java Style Guide: https://github.com/checkstyle/checkstyle/blob/master/src/main/resources/google_checks.xml 
195                                                                 with minor changes -->
196                                                         <configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
197                                                         <!-- <sourceDirectory> is needed so that checkstyle ignores the generated 
198                                                                 sources directory -->
199                                                         <sourceDirectories>
200                                                                 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
201                                                         </sourceDirectories>
202                                                         <includeResources>true</includeResources>
203                                                         <includeTestSourceDirectory>false</includeTestSourceDirectory>
204                                                         <includeTestResources>false</includeTestResources>
205                                                         <excludes>
206                                                         </excludes>
207                                                         <consoleOutput>true</consoleOutput>
208                                                         <failsOnViolation>false</failsOnViolation>
209                                                         <violationSeverity>warning</violationSeverity>
210                                                 </configuration>
211                                         </execution>
212                                 </executions>
213                                 <dependencies>
214                                         <dependency>
215                                                 <groupId>org.onap.oparent</groupId>
216                                                 <artifactId>checkstyle</artifactId>
217                                                 <version>1.2.3</version>
218                                                 <scope>compile</scope>
219                                         </dependency>
220                                 </dependencies>
221                         </plugin>
222                         <!--plugin> <groupId>org.eclipse.m2e</groupId> <artifactId>lifecycle-mapping</artifactId> 
223                                 <configuration> <lifecycleMappingMetadata> <pluginExecutions> <pluginExecution> 
224                                 <pluginExecutionFilter> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-checkstyle-plugin</artifactId> 
225                                 <versionRange>2.17,)</versionRange> <goals> <goal>check</goal> </goals> </pluginExecutionFilter> 
226                                 <action> <ignore /> </action> </pluginExecution> </pluginExecutions> </lifecycleMappingMetadata> 
227                                 </configuration> </plugin -->
228                         <plugin>
229                                 <groupId>org.springframework.boot</groupId>
230                                 <artifactId>spring-boot-maven-plugin</artifactId>
231                                 <version>2.0.4.RELEASE</version>
232                                 <executions>
233                                         <execution>
234                                                 <goals>
235                                                         <goal>repackage</goal>
236                                                 </goals>
237                                         </execution>
238                                 </executions>
239                         </plugin>
240                         <plugin>
241                                 <groupId>com.spotify</groupId>
242                                 <artifactId>docker-maven-plugin</artifactId>
243                                 <configuration>
244                                         <serverId>${onap.nexus.dockerregistry.daily}</serverId>
245
246                                         <imageName>${docker.image.name}</imageName>
247                                         <imageTags>
248                                                 <tag>latest</tag>
249                                         </imageTags>
250                                         <baseImage>java:openjdk-8</baseImage>
251                                         <user>sonhms</user>
252                                         <resources>
253                                                 <resource>
254                                                         <targetPath>/bin</targetPath>
255                                                         <directory>${project.build.directory}</directory>
256                                                         <include>${project.artifactId}-${project.version}.jar</include>
257                                                 </resource>
258                                                 <resource>
259                                                         <targetPath>/bin</targetPath>
260                                                         <directory>${project.basedir}</directory>
261                                                         <include>entrypoint.sh</include>
262                                                 </resource>
263                                         </resources>
264                                         <runs>
265                                                 <!-- Maven is loosing file permissions during artifacts copy -->
266                                                 <run>chmod +x /bin/entrypoint.sh</run>
267                                                 <run>mv /bin/*.jar /bin/application.jar</run>
268                                                 <run>chmod -R 777 /bin</run>
269                                                 <run>mkdir /var/log/onap</run>
270                                                 <run>chmod -R 777 /var/log/onap</run>
271                                         </runs>
272                                         <exposes>
273                                                 <expose>8080</expose>
274                                         </exposes>
275                                         <entryPoint>/bin/entrypoint.sh</entryPoint>
276                                 </configuration>
277                                 <executions>
278                                         <execution>
279                                                 <id>build-image</id>
280                                                 <phase>package</phase>
281                                                 <goals>
282                                                         <goal>build</goal>
283                                                 </goals>
284                                         </execution>
285                                         <execution>
286                                                 <id>tag-and-push-image-latest</id>
287                                                 <phase>deploy</phase>
288                                                 <goals>
289                                                         <goal>tag</goal>
290                                                 </goals>
291                                                 <configuration>
292                                                         <image>${docker.image.name}:latest</image>
293                                                         <newName>${onap.nexus.dockerregistry.daily}/${docker.image.name}:latest</newName>
294                                                         <pushImage>true</pushImage>
295                                                 </configuration>
296                                         </execution>
297                                         <execution>
298                                                 <id>tag-and-push-image-with-version</id>
299                                                 <phase>deploy</phase>
300                                                 <goals>
301                                                         <goal>tag</goal>
302                                                 </goals>
303                                                 <configuration>
304                                                         <image>${docker.image.name}:latest</image>
305                                                         <newName>${onap.nexus.dockerregistry.daily}/${docker.image.name}:${project.version}</newName>
306                                                         <pushImage>true</pushImage>
307                                                 </configuration>
308                                         </execution>
309                                         <execution>
310                                                 <id>tag-and-push-image-with-version-and-date</id>
311                                                 <phase>deploy</phase>
312                                                 <goals>
313                                                         <goal>tag</goal>
314                                                 </goals>
315                                                 <configuration>
316                                                         <image>${docker.image.name}:latest</image>
317                                                         <newName>${onap.nexus.dockerregistry.daily}/${docker.image.name}:${project.version}-${maven.build.timestamp}Z</newName>
318                                                         <pushImage>true</pushImage>
319                                                 </configuration>
320                                         </execution>
321                                 </executions>
322                         </plugin>
323                 </plugins>
324         </build>
325 </project>
326
327