f718d0bab6e49652e22b2d7143c481bc0c0f559b
[nonrtric.git] / policy-agent / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3 * ========================LICENSE_START=================================
4 * O-RAN-SC
5 * %%
6 * Copyright (C) 2019 Nordix Foundation
7 * %%
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
11 *
12 * http://www.apache.org/licenses/LICENSE-2.0
13 *
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
19 * ========================LICENSE_END===================================
20 -->
21 <project
22     xmlns="http://maven.apache.org/POM/4.0.0"
23     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
24         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
25     <modelVersion>4.0.0</modelVersion>
26     <parent>
27         <groupId>org.springframework.boot</groupId>
28         <artifactId>spring-boot-starter-parent</artifactId>
29         <version>2.2.4.RELEASE</version>
30         <relativePath />
31     </parent>
32     <groupId>org.o-ran-sc.nonrtric</groupId>
33     <artifactId>policy-agent</artifactId>
34     <version>1.0.0-SNAPSHOT</version>
35     <licenses>
36         <license>
37             <name>The Apache Software License, Version 2.0</name>
38             <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
39         </license>
40     </licenses>
41     <repositories>
42         <repository>
43             <id>onap-releases</id>
44             <name>onap-releases</name>
45             <url>https://nexus.onap.org/content/repositories/releases/</url>
46         </repository>
47     </repositories>
48     <properties>
49         <java.version>11</java.version>
50         <springfox.version>2.9.2</springfox.version>
51         <immutable.version>2.7.4</immutable.version>
52         <sdk.version>1.1.6</sdk.version>
53         <swagger.version>2.0.0</swagger.version>
54         <json.version>20180130</json.version>
55         <commons-net.version>3.3</commons-net.version>
56         <awaitility.version>4.0.1</awaitility.version>
57         <maven-compiler-plugin.version>3.8.0</maven-compiler-plugin.version>
58         <formatter-maven-plugin.version>2.8.1</formatter-maven-plugin.version>
59         <spotless-maven-plugin.version>1.18.0</spotless-maven-plugin.version>
60         <docker-maven-plugin>0.30.0</docker-maven-plugin>
61         <version.dmaap>1.1.9</version.dmaap>
62         <javax.ws.rs-api.version>2.1.1</javax.ws.rs-api.version>
63         <sonar-maven-plugin.version>3.7.0.1746</sonar-maven-plugin.version>
64     </properties>
65     <dependencies>
66         <dependency>
67             <groupId>org.springframework.boot</groupId>
68             <artifactId>spring-boot-starter-web</artifactId>
69         </dependency>
70         <dependency>
71             <groupId>org.springframework.boot</groupId>
72             <artifactId>spring-boot-starter-thymeleaf</artifactId>
73         </dependency>
74         <dependency>
75             <groupId>org.springframework.boot</groupId>
76             <artifactId>spring-boot-starter-webflux</artifactId>
77         </dependency>
78         <dependency>
79          <groupId>org.springframework.boot</groupId>
80          <artifactId>spring-boot-starter-aop</artifactId>
81         </dependency>
82         <dependency>
83             <groupId>org.springframework.boot</groupId>
84             <artifactId>spring-boot-devtools</artifactId>
85             <optional>true</optional>
86         </dependency>
87         <dependency>
88             <groupId>org.springframework</groupId>
89             <artifactId>spring-webflux</artifactId>
90         </dependency>
91         <dependency>
92             <groupId>io.swagger.core.v3</groupId>
93             <artifactId>swagger-jaxrs2</artifactId>
94             <version>${swagger.version}</version>
95         </dependency>
96         <dependency>
97             <groupId>io.swagger.core.v3</groupId>
98             <artifactId>swagger-jaxrs2-servlet-initializer</artifactId>
99             <version>${swagger.version}</version>
100         </dependency>
101         <dependency>
102             <groupId>javax.xml.bind</groupId>
103             <artifactId>jaxb-api</artifactId>
104         </dependency>
105         <dependency>
106             <groupId>org.immutables</groupId>
107             <artifactId>value</artifactId>
108             <version>${immutable.version}</version>
109             <scope>provided</scope>
110         </dependency>
111         <dependency>
112             <groupId>org.immutables</groupId>
113             <artifactId>gson</artifactId>
114             <version>${immutable.version}</version>
115         </dependency>
116         <dependency>
117             <groupId>org.json</groupId>
118             <artifactId>json</artifactId>
119             <version>${json.version}</version>
120         </dependency>
121         <dependency>
122             <groupId>commons-net</groupId>
123             <artifactId>commons-net</artifactId>
124             <version>${commons-net.version}</version>
125         </dependency>
126         <!-- Actuator dependencies -->
127         <dependency>
128             <groupId>org.springframework.boot</groupId>
129             <artifactId>spring-boot-starter-actuator</artifactId>
130         </dependency>
131         <!--TEST -->
132         <dependency>
133             <groupId>org.springframework.boot</groupId>
134             <artifactId>spring-boot-starter-test</artifactId>
135             <scope>test</scope>
136         </dependency>
137         <dependency>
138             <groupId>org.springframework.boot</groupId>
139             <artifactId>spring-boot-configuration-processor</artifactId>
140             <optional>true</optional>
141         </dependency>
142         <dependency>
143             <groupId>org.onap.dcaegen2.services.sdk.rest.services</groupId>
144             <artifactId>cbs-client</artifactId>
145             <version>${sdk.version}</version>
146         </dependency>
147         <dependency>
148             <groupId>org.onap.dcaegen2.services.sdk.rest.services</groupId>
149             <artifactId>dmaap-client</artifactId>
150             <version>${sdk.version}</version>
151         </dependency>
152         <dependency>
153             <groupId>org.projectlombok</groupId>
154             <artifactId>lombok</artifactId>
155             <scope>provided</scope>
156         </dependency>
157         <dependency>
158             <groupId>com.squareup.okhttp3</groupId>
159             <artifactId>mockwebserver</artifactId>
160             <scope>test</scope>
161         </dependency>
162         <!--REQUIRED TO GENERATE DOCUMENTATION -->
163         <dependency>
164             <groupId>io.springfox</groupId>
165             <artifactId>springfox-swagger2</artifactId>
166             <version>${springfox.version}</version>
167         </dependency>
168         <dependency>
169             <groupId>io.springfox</groupId>
170             <artifactId>springfox-swagger-ui</artifactId>
171             <version>${springfox.version}</version>
172         </dependency>
173         <!-- TEST -->
174         <dependency>
175             <groupId>org.awaitility</groupId>
176             <artifactId>awaitility</artifactId>
177             <version>${awaitility.version}</version>
178             <scope>test</scope>
179         </dependency>
180         <dependency>
181             <groupId>io.projectreactor</groupId>
182             <artifactId>reactor-test</artifactId>
183             <scope>test</scope>
184         </dependency>
185         <dependency>
186             <groupId>org.junit.jupiter</groupId>
187             <artifactId>junit-jupiter-engine</artifactId>
188             <scope>test</scope>
189         </dependency>
190         <dependency>
191             <groupId>org.mockito</groupId>
192             <artifactId>mockito-junit-jupiter</artifactId>
193             <scope>test</scope>
194         </dependency>
195         <dependency>
196             <groupId>org.mockito</groupId>
197             <artifactId>mockito-core</artifactId>
198             <scope>test</scope>
199         </dependency>
200         <dependency>
201             <groupId>org.onap.dmaap.messagerouter.dmaapclient</groupId>
202             <artifactId>dmaapClient</artifactId>
203             <version>${version.dmaap}</version>
204         </dependency>
205         <dependency>
206             <groupId>javax.ws.rs</groupId>
207             <artifactId>javax.ws.rs-api</artifactId>
208             <version>${javax.ws.rs-api.version}</version>
209         </dependency>
210         <dependency>
211             <groupId>org.glassfish.jersey.inject</groupId>
212             <artifactId>jersey-hk2</artifactId>
213         </dependency>
214     </dependencies>
215     <build>
216         <plugins>
217             <plugin>
218                 <groupId>org.springframework.boot</groupId>
219                 <artifactId>spring-boot-maven-plugin</artifactId>
220             </plugin>
221             <plugin>
222                 <groupId>net.revelc.code.formatter</groupId>
223                 <artifactId>formatter-maven-plugin</artifactId>
224                 <version>${formatter-maven-plugin.version}</version>
225                 <configuration>
226                     <configFile>${project.basedir}/eclipse-formatter.xml</configFile>
227                 </configuration>
228                 <!-- https://code.revelc.net/formatter-maven-plugin/ use mvn formatter:format 
229                                         spotless:apply process-sources -->
230             </plugin>
231             <plugin>
232                 <groupId>com.diffplug.spotless</groupId>
233                 <artifactId>spotless-maven-plugin</artifactId>
234                 <version>${spotless-maven-plugin.version}</version>
235                 <configuration>
236                     <java>
237                         <removeUnusedImports />
238                         <importOrder>
239                             <order>com,java,javax,org</order>
240                         </importOrder>
241                     </java>
242                 </configuration>
243                 <!-- https://github.com/diffplug/spotless/tree/master/plugin-maven use 
244                                         mvn spotless:apply to rewrite source files use mvn spotless:check to validate 
245                                         source files -->
246             </plugin>
247             <plugin>
248                 <groupId>org.apache.maven.plugins</groupId>
249                 <artifactId>maven-surefire-plugin</artifactId>
250                 <configuration>
251                     <skipTests>false</skipTests>
252                 </configuration>
253             </plugin>
254             <plugin>
255                 <artifactId>maven-failsafe-plugin</artifactId>
256             </plugin>
257             <plugin>
258                 <groupId>org.codehaus.mojo</groupId>
259                 <artifactId>build-helper-maven-plugin</artifactId>
260                 <executions>
261                     <execution>
262                         <id>add-source</id>
263                         <phase>generate-sources</phase>
264                         <goals>
265                             <goal>add-source</goal>
266                         </goals>
267                         <configuration>
268                             <sources>
269                                 <source>${project.build.directory}/generated-sources/annotations/</source>
270                             </sources>
271                         </configuration>
272                     </execution>
273                 </executions>
274             </plugin>
275             <plugin>
276                 <groupId>org.jacoco</groupId>
277                 <artifactId>jacoco-maven-plugin</artifactId>
278                 <version>0.8.4</version>
279                 <executions>
280                     <execution>
281                         <id>default-prepare-agent</id>
282                         <goals>
283                             <goal>prepare-agent</goal>
284                         </goals>
285                     </execution>
286                     <execution>
287                         <id>default-report</id>
288                         <phase>prepare-package</phase>
289                         <goals>
290                             <goal>report</goal>
291                         </goals>
292                     </execution>
293                 </executions>
294             </plugin>
295             <plugin>
296                 <groupId>io.fabric8</groupId>
297                 <artifactId>docker-maven-plugin</artifactId>
298                 <version>${docker-maven-plugin}</version>
299                 <inherited>false</inherited>
300                 <executions>
301                     <execution>
302                         <id>generate-policy-agent-image</id>
303                         <phase>package</phase>
304                         <goals>
305                             <goal>build</goal>
306                         </goals>
307                         <configuration>
308                             <pullRegistry>${env.CONTAINER_PULL_REGISTRY}</pullRegistry>
309                             <images>
310                                 <image>
311                                     <name>o-ran-sc/nonrtric-policy-agent:${project.version}</name>
312                                     <build>
313                                         <cleanup>try</cleanup>
314                                         <contextDir>${basedir}</contextDir>
315                                         <dockerFile>Dockerfile</dockerFile>
316                                         <args>
317                                             <JAR>${project.build.finalName}.jar</JAR>
318                                         </args>
319                                         <tags>
320                                             <tag>${project.version}</tag>
321                                         </tags>
322                                     </build>
323                                 </image>
324                             </images>
325                         </configuration>
326                     </execution>
327                     <execution>
328                         <id>push-policy-agent-image</id>
329                         <goals>
330                             <goal>build</goal>
331                             <goal>push</goal>
332                         </goals>
333                         <configuration>
334                             <pullRegistry>${env.CONTAINER_PULL_REGISTRY}</pullRegistry>
335                             <pushRegistry>${env.CONTAINER_PUSH_REGISTRY}</pushRegistry>
336                             <images>
337                                 <image>
338                                     <name>o-ran-sc/nonrtric-policy-agent:${project.version}</name>
339                                     <build>
340                                         <contextDir>${basedir}</contextDir>
341                                         <dockerFile>Dockerfile</dockerFile>
342                                         <args>
343                                             <JAR>${project.build.finalName}.jar</JAR>
344                                         </args>
345                                         <tags>
346                                             <tag>${project.version}</tag>
347                                             <tag>latest</tag>
348                                         </tags>
349                                     </build>
350                                 </image>
351                             </images>
352                         </configuration>
353                     </execution>
354                 </executions>
355             </plugin>
356             <!-- support sonar in multi-module project -->
357             <plugin>
358                 <groupId>org.sonarsource.scanner.maven</groupId>
359                 <artifactId>sonar-maven-plugin</artifactId>
360                 <version>${sonar-maven-plugin.version}</version>
361             </plugin>
362         </plugins>
363     </build>
364     <issueManagement>
365         <system>JIRA</system>
366         <url>https://jira.o-ran-sc.org/</url>
367     </issueManagement>
368 </project>