b3898c08ec48f1466c356e5f3818abc3ec97dfd5
[ccsdk/parent.git] / oparent / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3     <modelVersion>4.0.0</modelVersion>
4
5     <parent>
6         <groupId>org.onap.oparent</groupId>
7         <artifactId>oparent</artifactId>
8         <version>3.2.0</version>
9         <relativePath/>
10     </parent>
11
12     <groupId>org.onap.ccsdk.parent</groupId>
13     <artifactId>oparent</artifactId>
14     <version>2.2.0-SNAPSHOT</version>
15     <packaging>pom</packaging>
16
17     <name>ONAP :: ${project.groupId} :: ${project.artifactId}</name>
18     <description>Root POM to be used in place of oparent for CCSDK based projects</description>
19     <url>http://wiki.onap.org</url>
20     <organization>
21         <name>ONAP</name>
22     </organization>
23
24     <issueManagement>
25         <system>JIRA</system>
26         <url>https://jira.onap.org/</url>
27     </issueManagement>
28
29     <properties>
30         <!-- Sonar properties -->
31         <sonar.scanner.version>3.7.0.1746</sonar.scanner.version>
32         <sonar-jacoco-listeners.version>3.2</sonar-jacoco-listeners.version>
33         <sonar.core.codeCoveragePlugin>jacoco</sonar.core.codeCoveragePlugin>
34         <!-- Default Sonar configuration -->
35         <sonar.coverage.jacoco.xmlReportPaths>${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml,${project.reporting.outputDirectory}/jacoco-it/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
36         <!-- Note: This list should match jacoco-maven-plugin's exclusion list below -->
37         <sonar.exclusions>**/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/**</sonar.exclusions>
38
39         <!-- Jacoco properties -->
40         <jacoco.version>0.8.5</jacoco.version>
41         <!-- ONAP repositories -->
42         <onap.nexus.url>https://nexus.onap.org</onap.nexus.url>
43         <onap.nexus.host>nexus.onap.org</onap.nexus.host>
44         <onap.nexus.port>443</onap.nexus.port>
45         <onap.nexus.protocol>https</onap.nexus.protocol>
46         <onap.nexus.public-url>https://nexus.onap.org/content/groups/public</onap.nexus.public-url>
47         <onap.nexus.staging-url>https://nexus.onap.org/content/groups/staging</onap.nexus.staging-url>
48         <onap.nexus.release-url>https://nexus.onap.org/content/repositories/releases</onap.nexus.release-url>
49         <onap.nexus.snapshot-url>https://nexus.onap.org/content/repositories/snapshots</onap.nexus.snapshot-url>
50         <onap.nexus.staging.server-id>ecomp-staging</onap.nexus.staging.server-id>
51         <onap.nexus.staging.profile-id>176c31dfe190a</onap.nexus.staging.profile-id>
52
53         <java.version>11</java.version>
54         <maven-surefire-plugin.version>3.0.0-M5</maven-surefire-plugin.version>
55         <maven-failsafe-plugin.version>3.0.0-M5</maven-failsafe-plugin.version>
56         <bundle.plugin.version>4.2.1</bundle.plugin.version>
57         <maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
58         <checkstyle.skip>true</checkstyle.skip>
59
60         <!-- CCSDK component versions -->
61         <ccsdk.cds.version>1.2.0-SNAPSHOT</ccsdk.cds.version>
62         <ccsdk.features.version>1.2.0-SNAPSHOT</ccsdk.features.version>
63         <ccsdk.sli.version>1.3.0-SNAPSHOT</ccsdk.sli.version>
64         <ccsdk.sli.core.version>${ccsdk.sli.version}</ccsdk.sli.core.version>
65         <ccsdk.sli.adaptors.version>${ccsdk.sli.version}</ccsdk.sli.adaptors.version>
66         <ccsdk.sli.northbound.version>${ccsdk.sli.version}</ccsdk.sli.northbound.version>
67         <ccsdk.sli.plugins.version>${ccsdk.sli.version}</ccsdk.sli.plugins.version>
68         <ccsdk.distribution.version>1.1.1-SNAPSHOT</ccsdk.distribution.version>
69
70         <mariadb.connector.version>2.1.1</mariadb.connector.version>
71         <fasterxml.jackson.version>2.10.0</fasterxml.jackson.version>
72         <velocity.version>2.0</velocity.version>
73
74         <dmaap.listener.version>1.1.5</dmaap.listener.version>
75         <sdc.client.version>1.4.1</sdc.client.version>
76         <sdc.tosca.version>1.6.5</sdc.tosca.version>
77
78         <antlr.version>4.8-1</antlr.version>
79     </properties>
80
81     <dependencyManagement>
82         <dependencies>
83             <dependency>
84                 <!-- keep groupId and version as plain and not as var,
85                 otherwise ccsdk/distribution/dependencies is not resolving correctly -->
86                 <groupId>org.onap.ccsdk.parent</groupId>
87                 <artifactId>dependencies-bom</artifactId>
88                 <version>2.2.0-SNAPSHOT</version>
89                 <type>pom</type>
90                 <scope>import</scope>
91             </dependency>
92             <dependency>
93                 <groupId>org.springframework.boot</groupId>
94                 <artifactId>spring-boot-dependencies</artifactId>
95                 <version>2.3.8.RELEASE</version>
96                 <type>pom</type>
97                 <scope>import</scope>
98             </dependency>
99             <dependency>
100                  <groupId>org.antlr</groupId>
101                  <artifactId>antlr4-runtime</artifactId>
102                  <version>${antlr.version}</version>
103             </dependency>
104             <dependency>
105                 <groupId>org.onap.sdc.sdc-distribution-client</groupId>
106                 <artifactId>sdc-distribution-client</artifactId>
107                 <version>${sdc.client.version}</version>
108                 <scope>compile</scope>
109             </dependency>
110             <dependency>
111                 <groupId>org.onap.sdc.sdc-tosca</groupId>
112                 <artifactId>sdc-tosca</artifactId>
113                 <version>${sdc.tosca.version}</version>
114                 <scope>compile</scope>
115             </dependency>
116             <dependency>
117                 <groupId>org.onap.dmaap.messagerouter.dmaapclient</groupId>
118                 <artifactId>dmaapClient</artifactId>
119                 <version>${dmaap.listener.version}</version>
120             </dependency>
121         </dependencies>
122     </dependencyManagement>
123     <dependencies>
124         <dependency>
125             <groupId>javax.annotation</groupId>
126             <artifactId>javax.annotation-api</artifactId>
127             <version>1.3.2</version>
128         </dependency>
129         <dependency>
130             <groupId>junit</groupId>
131             <artifactId>junit</artifactId>
132             <scope>test</scope>
133         </dependency>
134         <dependency>
135             <groupId>org.slf4j</groupId>
136             <artifactId>slf4j-api</artifactId>
137             <scope>provided</scope>
138         </dependency>
139         <dependency>
140             <groupId>org.slf4j</groupId>
141             <artifactId>slf4j-simple</artifactId>
142             <scope>test</scope>
143         </dependency>
144
145         <dependency>
146             <groupId>org.mockito</groupId>
147             <artifactId>mockito-core</artifactId>
148             <version>1.10.19</version>
149             <scope>test</scope>
150         </dependency>
151         <dependency>
152             <groupId>org.testng</groupId>
153             <artifactId>testng</artifactId>
154             <version>6.11</version>
155             <scope>test</scope>
156         </dependency>
157     </dependencies>
158
159     <repositories>
160         <repository>
161             <id>onap-public</id>
162             <url>${onap.nexus.public-url}</url>
163             <releases>
164                 <enabled>true</enabled>
165                 <updatePolicy>never</updatePolicy>
166             </releases>
167             <snapshots>
168                 <enabled>true</enabled>
169                 <updatePolicy>always</updatePolicy>
170             </snapshots>
171         </repository>
172         <repository>
173             <id>onap-staging</id>
174             <url>${onap.nexus.staging-url}</url>
175             <releases>
176                 <enabled>true</enabled>
177                 <updatePolicy>never</updatePolicy>
178             </releases>
179             <snapshots>
180                 <enabled>true</enabled>
181                 <updatePolicy>always</updatePolicy>
182             </snapshots>
183         </repository>
184         <repository>
185             <id>ecomp-release</id>
186             <name>onap-repository-releases</name>
187             <url>${onap.nexus.release-url}</url>
188             <releases>
189                 <enabled>true</enabled>
190                 <updatePolicy>never</updatePolicy>
191             </releases>
192             <snapshots>
193                 <enabled>false</enabled>
194             </snapshots>
195         </repository>
196         <repository>
197             <id>ecomp-snapshot</id>
198             <name>onap-repository-snapshots</name>
199             <url>${onap.nexus.snapshot-url}</url>
200             <releases>
201                 <enabled>false</enabled>
202             </releases>
203             <snapshots>
204                 <enabled>true</enabled>
205             </snapshots>
206         </repository>
207     </repositories>
208     <pluginRepositories>
209         <pluginRepository>
210             <id>onap-public</id>
211             <url>${onap.nexus.public-url}</url>
212             <releases>
213                 <enabled>true</enabled>
214             </releases>
215             <snapshots>
216                 <enabled>true</enabled>
217             </snapshots>
218         </pluginRepository>
219         <pluginRepository>
220             <id>onap-staging</id>
221             <url>${onap.nexus.staging-url}</url>
222             <releases>
223                 <enabled>true</enabled>
224             </releases>
225             <snapshots>
226                 <enabled>true</enabled>
227             </snapshots>
228         </pluginRepository>
229         <pluginRepository>
230             <id>onap-snapshot</id>
231             <url>${onap.nexus.snapshot-url}</url>
232             <releases>
233                 <enabled>false</enabled>
234             </releases>
235             <snapshots>
236                 <enabled>true</enabled>
237             </snapshots>
238         </pluginRepository>
239         <!-- Black Duck plugin dependencies -->
240         <pluginRepository>
241             <id>JCenter</id>
242             <name>JCenter Repository</name>
243             <url>http://jcenter.bintray.com</url>
244         </pluginRepository>
245         <pluginRepository>
246             <id>Restlet</id>
247             <name>Restlet Repository</name>
248             <url>http://maven.restlet.com</url>
249         </pluginRepository>
250     </pluginRepositories>
251
252     <build>
253         <pluginManagement>
254             <plugins>
255                 <plugin>
256                     <groupId>org.apache.maven.plugins</groupId>
257                     <artifactId>maven-deploy-plugin</artifactId>
258                     <!-- This version supports the "deployAtEnd" parameter -->
259                     <version>2.8</version>
260                     <configuration>
261                         <skip/>
262                         <deployAtEnd>true</deployAtEnd>
263                     </configuration>
264                  </plugin>
265                  <plugin>
266                     <groupId>org.apache.maven.plugins</groupId>
267                     <artifactId>maven-compiler-plugin</artifactId>
268                     <version>${maven-compiler-plugin.version}</version>
269                     <configuration>
270                         <release>${java.version}</release>
271                         <!--explicitly remove source and target-->
272                         <source combine.self="override"/>
273                         <target combine.self="override"/>
274                     </configuration>
275                 </plugin>
276                 <plugin>
277                     <groupId>org.apache.maven.plugins</groupId>
278                     <artifactId>maven-resources-plugin</artifactId>
279                     <version>3.2.0</version>
280                 </plugin>
281                 <plugin>
282                     <groupId>org.antlr</groupId>
283                     <artifactId>antlr4-maven-plugin</artifactId>
284                     <version>${antlr.version}</version>
285                 </plugin>
286             </plugins>
287         </pluginManagement>
288         <plugins>
289             <!-- Jacoco / Sonar -->
290             <plugin>
291                 <groupId>org.jacoco</groupId>
292                 <artifactId>jacoco-maven-plugin</artifactId>
293                 <version>${jacoco.version}</version>
294                 <executions>
295                     <execution>
296                         <id>pre-unit-test</id>
297                         <goals>
298                             <goal>prepare-agent</goal>
299                         </goals>
300                         <configuration>
301                             <!-- Sets the path to the file which contains the execution data. -->
302                             <destFile>${project.build.directory}/code-coverage/jacoco-ut.exec</destFile>
303                             <!-- Sets the name of the property containing the settings for JaCoCo
304                                                                  runtime agent. -->
305                             <propertyName>surefireArgLine</propertyName>
306                         </configuration>
307                     </execution>
308                     <!-- Ensures that the code coverage report for unit tests is created
309                                                  after unit tests have been run. -->
310                     <execution>
311                         <id>post-unit-test</id>
312                         <phase>test</phase>
313                         <goals>
314                             <goal>report</goal>
315                         </goals>
316                         <configuration>
317                             <!-- Sets the path to the file which contains the execution data. -->
318                             <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
319                             <!-- Sets the output directory for the code coverage report. -->
320                             <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
321                         </configuration>
322                     </execution>
323                     <execution>
324                         <id>pre-integration-test</id>
325                         <phase>pre-integration-test</phase>
326                         <goals>
327                             <goal>prepare-agent</goal>
328                         </goals>
329                         <configuration>
330                             <!-- Sets the path to the file which contains the execution data. -->
331                             <destFile>${project.build.directory}/code-coverage/jacoco-it.exec</destFile>
332                             <!-- Sets the name of the property containing the settings for JaCoCo
333                                                                  runtime agent. -->
334                             <propertyName>failsafeArgLine</propertyName>
335                         </configuration>
336                     </execution>
337                     <!-- Ensures that the code coverage report for integration tests after
338                                                  integration tests have been run. -->
339                     <execution>
340                         <id>post-integration-test</id>
341                         <phase>post-integration-test</phase>
342                         <goals>
343                             <goal>report</goal>
344                         </goals>
345                         <configuration>
346                             <!-- Sets the path to the file which contains the execution data. -->
347                             <dataFile>${project.build.directory}/code-coverage/jacoco-it.exec</dataFile>
348                             <!-- Sets the output directory for the code coverage report. -->
349                             <outputDirectory>${project.reporting.outputDirectory}/jacoco-it</outputDirectory>
350                         </configuration>
351                     </execution>
352                     <execution>
353                         <id>default-prepare-agent</id>
354                         <goals>
355                             <goal>prepare-agent</goal>
356                         </goals>
357                     </execution>
358                     <execution>
359                         <id>default-report</id>
360                         <phase>prepare-package</phase>
361                         <goals>
362                             <goal>report</goal>
363                         </goals>
364                     </execution>
365                     <execution>
366                         <id>default-check</id>
367                         <goals>
368                             <goal>check</goal>
369                         </goals>
370                         <configuration>
371                             <rules>
372                                 <rule>
373                                     <element>PACKAGE</element>
374                                     <limits>
375                                         <limit>
376                                             <counter>COMPLEXITY</counter>
377                                             <value>COVEREDRATIO</value>
378                                             <minimum>0.0</minimum>
379                                         </limit>
380                                     </limits>
381                                 </rule>
382                             </rules>
383                         </configuration>
384                     </execution>
385                 </executions>
386             </plugin>
387             <plugin>
388                 <groupId>org.codehaus.mojo</groupId>
389                 <artifactId>versions-maven-plugin</artifactId>
390                 <version>2.5</version>
391                 <configuration>
392                     <processAllModules>true</processAllModules>
393                 </configuration>
394             </plugin>
395             <plugin>
396                 <groupId>org.apache.felix</groupId>
397                 <artifactId>maven-bundle-plugin</artifactId>
398                 <version>${bundle.plugin.version}</version>
399                 <extensions>true</extensions>
400             </plugin>
401             <plugin>
402                 <groupId>org.eclipse.m2e</groupId>
403                 <artifactId>lifecycle-mapping</artifactId>
404                 <version>1.0.0</version>
405                 <configuration>
406                     <lifecycleMappingMetadata>
407                         <pluginExecutions>
408                             <pluginExecution>
409                                 <pluginExecutionFilter>
410                                     <groupId>org.apache.felix</groupId>
411                                     <artifactId>maven-bundle-plugin</artifactId>
412                                     <versionRange>[1.0,)</versionRange>
413                                     <goals>
414                                         <goal>manifest</goal>
415                                     </goals>
416                                 </pluginExecutionFilter>
417                                 <action>
418                                     <execute />
419                                     <ignore />
420                                 </action>
421                             </pluginExecution>
422                         </pluginExecutions>
423                     </lifecycleMappingMetadata>
424                 </configuration>
425             </plugin>
426         </plugins>
427     </build>
428
429     <profiles>
430         <profile>
431             <id>sonar-jacoco-aggregate</id>
432             <activation>
433                 <property>
434                     <name>onap.jacoco.aggregateFile</name>
435                 </property>
436             </activation>
437             <build>
438                 <plugins>
439                     <plugin>
440                         <groupId>org.jacoco</groupId>
441                         <artifactId>jacoco-maven-plugin</artifactId>
442                         <executions>
443                             <execution>
444                                 <id>merge</id>
445                                 <goals>
446                                     <goal>merge</goal>
447                                 </goals>
448                                 <phase>generate-resources</phase>
449                                 <configuration>
450                                     <destFile>${onap.jacoco.aggregateFile}</destFile>
451                                     <fileSets>
452                                         <fileSet>
453                                             <directory>${project.basedir}</directory>
454                                             <includes>
455                                                 <include>**/target/code-coverage/*.exec</include>
456                                             </includes>
457                                         </fileSet>
458                                     </fileSets>
459                                 </configuration>
460                             </execution>
461                         </executions>
462                     </plugin>
463                 </plugins>
464             </build>
465         </profile>
466     </profiles>
467 </project>