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