Step version for release
[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.7.RELEASE</version>
30         <relativePath />
31     </parent>
32     <groupId>org.o-ran-sc.nonrtric</groupId>
33     <artifactId>policy-agent</artifactId>
34     <version>2.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.8.2</immutable.version>
52         <sdk.version>1.1.6</sdk.version>
53         <swagger.version>2.0.0</swagger.version>
54         <json.version>20190722</json.version>
55         <commons-net.version>3.6</commons-net.version>
56         <maven-compiler-plugin.version>3.8.0</maven-compiler-plugin.version>
57         <formatter-maven-plugin.version>2.8.1</formatter-maven-plugin.version>
58         <spotless-maven-plugin.version>1.18.0</spotless-maven-plugin.version>
59         <docker-maven-plugin>0.30.0</docker-maven-plugin>
60         <version.dmaap>1.1.11</version.dmaap>
61         <javax.ws.rs-api.version>2.1.1</javax.ws.rs-api.version>
62         <sonar-maven-plugin.version>3.7.0.1746</sonar-maven-plugin.version>
63         <jacoco-maven-plugin.version>0.8.5</jacoco-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         <dependency>
127             <groupId>org.springframework.boot</groupId>
128             <artifactId>spring-boot-configuration-processor</artifactId>
129             <optional>true</optional>
130         </dependency>
131         <dependency>
132             <groupId>org.onap.dcaegen2.services.sdk.rest.services</groupId>
133             <artifactId>cbs-client</artifactId>
134             <version>${sdk.version}</version>
135         </dependency>
136         <dependency>
137             <groupId>org.onap.dcaegen2.services.sdk.rest.services</groupId>
138             <artifactId>dmaap-client</artifactId>
139             <version>${sdk.version}</version>
140         </dependency>
141         <dependency>
142             <groupId>org.projectlombok</groupId>
143             <artifactId>lombok</artifactId>
144             <scope>provided</scope>
145         </dependency>
146         <dependency>
147             <groupId>org.onap.dmaap.messagerouter.dmaapclient</groupId>
148             <artifactId>dmaapClient</artifactId>
149             <version>${version.dmaap}</version>
150         </dependency>
151         <dependency>
152             <groupId>javax.ws.rs</groupId>
153             <artifactId>javax.ws.rs-api</artifactId>
154             <version>${javax.ws.rs-api.version}</version>
155         </dependency>
156         <dependency>
157             <groupId>org.glassfish.jersey.inject</groupId>
158             <artifactId>jersey-hk2</artifactId>
159         </dependency>
160
161         <!-- Actuator dependencies -->
162         <dependency>
163             <groupId>org.springframework.boot</groupId>
164             <artifactId>spring-boot-starter-actuator</artifactId>
165         </dependency>
166
167         <!--REQUIRED TO GENERATE DOCUMENTATION -->
168         <dependency>
169             <groupId>io.springfox</groupId>
170             <artifactId>springfox-swagger2</artifactId>
171             <version>${springfox.version}</version>
172         </dependency>
173         <dependency>
174             <groupId>io.springfox</groupId>
175             <artifactId>springfox-swagger-ui</artifactId>
176             <version>${springfox.version}</version>
177         </dependency>
178
179         <!-- TEST -->
180         <dependency>
181             <groupId>org.springframework.boot</groupId>
182             <artifactId>spring-boot-starter-test</artifactId>
183             <scope>test</scope>
184         </dependency>
185         <dependency>
186             <groupId>org.awaitility</groupId>
187             <artifactId>awaitility</artifactId>
188             <scope>test</scope>
189         </dependency>
190         <dependency>
191             <groupId>io.projectreactor</groupId>
192             <artifactId>reactor-test</artifactId>
193             <scope>test</scope>
194         </dependency>
195         <dependency>
196             <groupId>org.junit.jupiter</groupId>
197             <artifactId>junit-jupiter-engine</artifactId>
198             <scope>test</scope>
199         </dependency>
200         <dependency>
201             <groupId>org.mockito</groupId>
202             <artifactId>mockito-junit-jupiter</artifactId>
203             <scope>test</scope>
204         </dependency>
205         <dependency>
206             <groupId>org.mockito</groupId>
207             <artifactId>mockito-core</artifactId>
208             <scope>test</scope>
209         </dependency>
210         <dependency>
211             <groupId>com.squareup.okhttp3</groupId>
212             <artifactId>mockwebserver</artifactId>
213             <scope>test</scope>
214         </dependency>
215     </dependencies>
216     <build>
217         <plugins>
218             <plugin>
219                 <groupId>org.springframework.boot</groupId>
220                 <artifactId>spring-boot-maven-plugin</artifactId>
221             </plugin>
222             <plugin>
223                 <groupId>net.revelc.code.formatter</groupId>
224                 <artifactId>formatter-maven-plugin</artifactId>
225                 <version>${formatter-maven-plugin.version}</version>
226                 <configuration>
227                     <configFile>${project.basedir}/eclipse-formatter.xml</configFile>
228                 </configuration>
229                 <!-- https://code.revelc.net/formatter-maven-plugin/ use mvn formatter:format 
230                                         spotless:apply process-sources -->
231             </plugin>
232             <plugin>
233                 <groupId>com.diffplug.spotless</groupId>
234                 <artifactId>spotless-maven-plugin</artifactId>
235                 <version>${spotless-maven-plugin.version}</version>
236                 <configuration>
237                     <java>
238                         <removeUnusedImports />
239                         <importOrder>
240                             <order>com,java,javax,org</order>
241                         </importOrder>
242                     </java>
243                 </configuration>
244                 <!-- https://github.com/diffplug/spotless/tree/master/plugin-maven use 
245                                         mvn spotless:apply to rewrite source files use mvn spotless:check to validate 
246                                         source files -->
247             </plugin>
248             <plugin>
249                 <groupId>org.apache.maven.plugins</groupId>
250                 <artifactId>maven-surefire-plugin</artifactId>
251                 <configuration>
252                     <skipTests>false</skipTests>
253                 </configuration>
254             </plugin>
255             <plugin>
256                 <artifactId>maven-failsafe-plugin</artifactId>
257             </plugin>
258             <plugin>
259                 <groupId>org.codehaus.mojo</groupId>
260                 <artifactId>build-helper-maven-plugin</artifactId>
261                 <executions>
262                     <execution>
263                         <id>add-source</id>
264                         <phase>generate-sources</phase>
265                         <goals>
266                             <goal>add-source</goal>
267                         </goals>
268                         <configuration>
269                             <sources>
270                                 <source>${project.build.directory}/generated-sources/annotations/</source>
271                             </sources>
272                         </configuration>
273                     </execution>
274                 </executions>
275             </plugin>
276             <plugin>
277                 <groupId>org.jacoco</groupId>
278                 <artifactId>jacoco-maven-plugin</artifactId>
279                 <version>${jacoco-maven-plugin.version}</version>
280                 <executions>
281                     <execution>
282                         <id>default-prepare-agent</id>
283                         <goals>
284                             <goal>prepare-agent</goal>
285                         </goals>
286                     </execution>
287                     <execution>
288                         <id>default-report</id>
289                         <phase>prepare-package</phase>
290                         <goals>
291                             <goal>report</goal>
292                         </goals>
293                     </execution>
294                 </executions>
295             </plugin>
296             <plugin>
297                 <groupId>io.fabric8</groupId>
298                 <artifactId>docker-maven-plugin</artifactId>
299                 <version>${docker-maven-plugin}</version>
300                 <inherited>false</inherited>
301                 <executions>
302                     <execution>
303                         <id>generate-policy-agent-image</id>
304                         <phase>package</phase>
305                         <goals>
306                             <goal>build</goal>
307                         </goals>
308                         <configuration>
309                             <pullRegistry>${env.CONTAINER_PULL_REGISTRY}</pullRegistry>
310                             <images>
311                                 <image>
312                                     <name>o-ran-sc/nonrtric-policy-agent:${project.version}</name>
313                                     <build>
314                                         <cleanup>try</cleanup>
315                                         <contextDir>${basedir}</contextDir>
316                                         <dockerFile>Dockerfile</dockerFile>
317                                         <args>
318                                             <JAR>${project.build.finalName}.jar</JAR>
319                                         </args>
320                                         <tags>
321                                             <tag>${project.version}</tag>
322                                         </tags>
323                                     </build>
324                                 </image>
325                             </images>
326                         </configuration>
327                     </execution>
328                     <execution>
329                         <id>push-policy-agent-image</id>
330                         <goals>
331                             <goal>build</goal>
332                             <goal>push</goal>
333                         </goals>
334                         <configuration>
335                             <pullRegistry>${env.CONTAINER_PULL_REGISTRY}</pullRegistry>
336                             <pushRegistry>${env.CONTAINER_PUSH_REGISTRY}</pushRegistry>
337                             <images>
338                                 <image>
339                                     <name>o-ran-sc/nonrtric-policy-agent:${project.version}</name>
340                                     <build>
341                                         <contextDir>${basedir}</contextDir>
342                                         <dockerFile>Dockerfile</dockerFile>
343                                         <args>
344                                             <JAR>${project.build.finalName}.jar</JAR>
345                                         </args>
346                                         <tags>
347                                             <tag>${project.version}</tag>
348                                             <tag>latest</tag>
349                                         </tags>
350                                     </build>
351                                 </image>
352                             </images>
353                         </configuration>
354                     </execution>
355                 </executions>
356             </plugin>
357             <!-- support sonar in multi-module project -->
358             <plugin>
359                 <groupId>org.sonarsource.scanner.maven</groupId>
360                 <artifactId>sonar-maven-plugin</artifactId>
361                 <version>${sonar-maven-plugin.version}</version>
362             </plugin>
363         </plugins>
364     </build>
365     <issueManagement>
366         <system>JIRA</system>
367         <url>https://jira.o-ran-sc.org/</url>
368     </issueManagement>
369 </project>