Merge "prepare for jenkins test"
[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         <exec-maven-plugin.version>1.6.0</exec-maven-plugin.version>
65     </properties>
66     <dependencies>
67         <dependency>
68             <groupId>org.springframework.boot</groupId>
69             <artifactId>spring-boot-starter-web</artifactId>
70         </dependency>
71         <dependency>
72             <groupId>org.springframework.boot</groupId>
73             <artifactId>spring-boot-starter-thymeleaf</artifactId>
74         </dependency>
75         <dependency>
76             <groupId>org.springframework.boot</groupId>
77             <artifactId>spring-boot-starter-webflux</artifactId>
78         </dependency>
79         <dependency>
80          <groupId>org.springframework.boot</groupId>
81          <artifactId>spring-boot-starter-aop</artifactId>
82         </dependency>
83         <dependency>
84             <groupId>org.springframework.boot</groupId>
85             <artifactId>spring-boot-devtools</artifactId>
86             <optional>true</optional>
87         </dependency>
88         <dependency>
89             <groupId>org.springframework</groupId>
90             <artifactId>spring-webflux</artifactId>
91         </dependency>
92         <dependency>
93             <groupId>io.swagger.core.v3</groupId>
94             <artifactId>swagger-jaxrs2</artifactId>
95             <version>${swagger.version}</version>
96         </dependency>
97         <dependency>
98             <groupId>io.swagger.core.v3</groupId>
99             <artifactId>swagger-jaxrs2-servlet-initializer</artifactId>
100             <version>${swagger.version}</version>
101         </dependency>
102         <dependency>
103             <groupId>javax.xml.bind</groupId>
104             <artifactId>jaxb-api</artifactId>
105         </dependency>
106         <dependency>
107             <groupId>org.immutables</groupId>
108             <artifactId>value</artifactId>
109             <version>${immutable.version}</version>
110             <scope>provided</scope>
111         </dependency>
112         <dependency>
113             <groupId>org.immutables</groupId>
114             <artifactId>gson</artifactId>
115             <version>${immutable.version}</version>
116         </dependency>
117         <dependency>
118             <groupId>org.json</groupId>
119             <artifactId>json</artifactId>
120             <version>${json.version}</version>
121         </dependency>
122         <dependency>
123             <groupId>commons-net</groupId>
124             <artifactId>commons-net</artifactId>
125             <version>${commons-net.version}</version>
126         </dependency>
127         <dependency>
128             <groupId>org.springframework.boot</groupId>
129             <artifactId>spring-boot-configuration-processor</artifactId>
130             <optional>true</optional>
131         </dependency>
132         <dependency>
133             <groupId>org.onap.dcaegen2.services.sdk.rest.services</groupId>
134             <artifactId>cbs-client</artifactId>
135             <version>${sdk.version}</version>
136         </dependency>
137         <dependency>
138             <groupId>org.onap.dcaegen2.services.sdk.rest.services</groupId>
139             <artifactId>dmaap-client</artifactId>
140             <version>${sdk.version}</version>
141         </dependency>
142         <dependency>
143             <groupId>org.projectlombok</groupId>
144             <artifactId>lombok</artifactId>
145             <scope>provided</scope>
146         </dependency>
147         <dependency>
148             <groupId>org.onap.dmaap.messagerouter.dmaapclient</groupId>
149             <artifactId>dmaapClient</artifactId>
150             <version>${version.dmaap}</version>
151         </dependency>
152         <dependency>
153             <groupId>javax.ws.rs</groupId>
154             <artifactId>javax.ws.rs-api</artifactId>
155             <version>${javax.ws.rs-api.version}</version>
156         </dependency>
157         <dependency>
158             <groupId>org.glassfish.jersey.inject</groupId>
159             <artifactId>jersey-hk2</artifactId>
160         </dependency>
161
162         <!-- Actuator dependencies -->
163         <dependency>
164             <groupId>org.springframework.boot</groupId>
165             <artifactId>spring-boot-starter-actuator</artifactId>
166         </dependency>
167
168         <!--REQUIRED TO GENERATE DOCUMENTATION -->
169         <dependency>
170             <groupId>io.springfox</groupId>
171             <artifactId>springfox-swagger2</artifactId>
172             <version>${springfox.version}</version>
173         </dependency>
174         <dependency>
175             <groupId>io.springfox</groupId>
176             <artifactId>springfox-swagger-ui</artifactId>
177             <version>${springfox.version}</version>
178         </dependency>
179
180         <!-- TEST -->
181         <dependency>
182             <groupId>org.springframework.boot</groupId>
183             <artifactId>spring-boot-starter-test</artifactId>
184             <scope>test</scope>
185         </dependency>
186         <dependency>
187             <groupId>org.awaitility</groupId>
188             <artifactId>awaitility</artifactId>
189             <scope>test</scope>
190         </dependency>
191         <dependency>
192             <groupId>io.projectreactor</groupId>
193             <artifactId>reactor-test</artifactId>
194             <scope>test</scope>
195         </dependency>
196         <dependency>
197             <groupId>org.junit.jupiter</groupId>
198             <artifactId>junit-jupiter-engine</artifactId>
199             <scope>test</scope>
200         </dependency>
201         <dependency>
202             <groupId>org.mockito</groupId>
203             <artifactId>mockito-junit-jupiter</artifactId>
204             <scope>test</scope>
205         </dependency>
206         <dependency>
207             <groupId>org.mockito</groupId>
208             <artifactId>mockito-core</artifactId>
209             <scope>test</scope>
210         </dependency>
211         <dependency>
212             <groupId>com.squareup.okhttp3</groupId>
213             <artifactId>mockwebserver</artifactId>
214             <scope>test</scope>
215         </dependency>
216     </dependencies>
217     <build>
218         <plugins>
219             <plugin>
220                 <groupId>org.springframework.boot</groupId>
221                 <artifactId>spring-boot-maven-plugin</artifactId>
222             </plugin>
223             <plugin>
224                 <groupId>net.revelc.code.formatter</groupId>
225                 <artifactId>formatter-maven-plugin</artifactId>
226                 <version>${formatter-maven-plugin.version}</version>
227                 <configuration>
228                     <configFile>${project.basedir}/eclipse-formatter.xml</configFile>
229                 </configuration>
230                 <!-- https://code.revelc.net/formatter-maven-plugin/ use mvn formatter:format
231                                         spotless:apply process-sources -->
232             </plugin>
233             <plugin>
234                 <groupId>com.diffplug.spotless</groupId>
235                 <artifactId>spotless-maven-plugin</artifactId>
236                 <version>${spotless-maven-plugin.version}</version>
237                 <configuration>
238                     <java>
239                         <removeUnusedImports />
240                         <importOrder>
241                             <order>com,java,javax,org</order>
242                         </importOrder>
243                     </java>
244                 </configuration>
245                 <!-- https://github.com/diffplug/spotless/tree/master/plugin-maven use
246                                         mvn spotless:apply to rewrite source files use mvn spotless:check to validate
247                                         source files -->
248             </plugin>
249             <plugin>
250                 <groupId>org.apache.maven.plugins</groupId>
251                 <artifactId>maven-surefire-plugin</artifactId>
252                 <configuration>
253                     <skipTests>false</skipTests>
254                 </configuration>
255             </plugin>
256             <plugin>
257                 <artifactId>maven-failsafe-plugin</artifactId>
258             </plugin>
259             <plugin>
260                 <groupId>org.codehaus.mojo</groupId>
261                 <artifactId>build-helper-maven-plugin</artifactId>
262                 <executions>
263                     <execution>
264                         <id>add-source</id>
265                         <phase>generate-sources</phase>
266                         <goals>
267                             <goal>add-source</goal>
268                         </goals>
269                         <configuration>
270                             <sources>
271                                 <source>${project.build.directory}/generated-sources/annotations/</source>
272                             </sources>
273                         </configuration>
274                     </execution>
275                 </executions>
276             </plugin>
277             <plugin>
278                 <groupId>org.jacoco</groupId>
279                 <artifactId>jacoco-maven-plugin</artifactId>
280                 <version>${jacoco-maven-plugin.version}</version>
281                 <executions>
282                     <execution>
283                         <id>default-prepare-agent</id>
284                         <goals>
285                             <goal>prepare-agent</goal>
286                         </goals>
287                     </execution>
288                     <execution>
289                         <id>default-report</id>
290                         <phase>prepare-package</phase>
291                         <goals>
292                             <goal>report</goal>
293                         </goals>
294                     </execution>
295                 </executions>
296             </plugin>
297             <plugin>
298                 <groupId>io.fabric8</groupId>
299                 <artifactId>docker-maven-plugin</artifactId>
300                 <version>${docker-maven-plugin}</version>
301                 <inherited>false</inherited>
302                 <executions>
303                     <execution>
304                         <id>generate-policy-agent-image</id>
305                         <phase>package</phase>
306                         <goals>
307                             <goal>build</goal>
308                         </goals>
309                         <configuration>
310                             <pullRegistry>${env.CONTAINER_PULL_REGISTRY}</pullRegistry>
311                             <images>
312                                 <image>
313                                     <name>o-ran-sc/nonrtric-policy-agent:${project.version}</name>
314                                     <build>
315                                         <cleanup>try</cleanup>
316                                         <contextDir>${basedir}</contextDir>
317                                         <dockerFile>Dockerfile</dockerFile>
318                                         <args>
319                                             <JAR>${project.build.finalName}.jar</JAR>
320                                         </args>
321                                         <tags>
322                                             <tag>${project.version}</tag>
323                                         </tags>
324                                     </build>
325                                 </image>
326                             </images>
327                         </configuration>
328                     </execution>
329                     <execution>
330                         <id>push-policy-agent-image</id>
331                         <goals>
332                             <goal>build</goal>
333                             <goal>push</goal>
334                         </goals>
335                         <configuration>
336                             <pullRegistry>${env.CONTAINER_PULL_REGISTRY}</pullRegistry>
337                             <pushRegistry>${env.CONTAINER_PUSH_REGISTRY}</pushRegistry>
338                             <images>
339                                 <image>
340                                     <name>o-ran-sc/nonrtric-policy-agent:${project.version}</name>
341                                     <build>
342                                         <contextDir>${basedir}</contextDir>
343                                         <dockerFile>Dockerfile</dockerFile>
344                                         <args>
345                                             <JAR>${project.build.finalName}.jar</JAR>
346                                         </args>
347                                         <tags>
348                                             <tag>${project.version}</tag>
349                                             <tag>latest</tag>
350                                         </tags>
351                                     </build>
352                                 </image>
353                             </images>
354                         </configuration>
355                     </execution>
356                 </executions>
357             </plugin>
358             <!-- support sonar in multi-module project -->
359             <plugin>
360                 <groupId>org.sonarsource.scanner.maven</groupId>
361                 <artifactId>sonar-maven-plugin</artifactId>
362                 <version>${sonar-maven-plugin.version}</version>
363             </plugin>
364             <plugin>
365                 <groupId>org.codehaus.mojo</groupId>
366                 <artifactId>exec-maven-plugin</artifactId>
367                 <version>${exec-maven-plugin.version}</version>
368                 <executions>
369                     <execution>
370                         <id>run-test-script</id>
371                         <phase>verify</phase>
372                         <goals>
373                             <goal>exec</goal>
374                         </goals>
375                     </execution>
376                 </executions>
377                 <configuration>
378                     <executable>bash</executable>
379                     <arguments>
380                         <argument>run_test.sh</argument>
381                     </arguments>
382                     <workingDirectory>../test/jenkins/</workingDirectory>
383                 </configuration>
384             </plugin>
385         </plugins>
386     </build>
387     <issueManagement>
388         <system>JIRA</system>
389         <url>https://jira.o-ran-sc.org/</url>
390     </issueManagement>
391 </project>