Merge "Add common Jersey version"
[policy/pap.git] / pom.xml
1 <!--
2   ============LICENSE_START=======================================================
3   ONAP Policy PAP
4   ================================================================================
5   Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
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
22 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
23     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
24     <modelVersion>4.0.0</modelVersion>
25
26     <parent>
27         <groupId>org.onap.policy.parent</groupId>
28         <artifactId>integration</artifactId>
29         <version>3.1.0-SNAPSHOT</version>
30         <relativePath />
31     </parent>
32
33     <groupId>org.onap.policy.pap</groupId>
34     <artifactId>policy-pap</artifactId>
35     <version>2.2.0-SNAPSHOT</version>
36
37     <packaging>pom</packaging>
38
39     <name>policy-pap</name>
40     <description>Code that implements the Policy Administration Backend.</description>
41
42     <properties>
43         <!-- sonar/jacoco overrides -->
44         <!-- Overriding oparent default sonar/jacoco settings Combine all our reports into one file shared across sub-modules -->
45         <sonar.jacoco.reportPath>${project.basedir}/../target/code-coverage/jacoco-ut.exec</sonar.jacoco.reportPath>
46         <sonar.jacoco.itReportPath>${project.basedir}/../target/code-coverage/jacoco-it.exec</sonar.jacoco.itReportPath>
47         <sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>
48
49         <policy.common.version>1.6.0-SNAPSHOT</policy.common.version>
50         <policy.models.version>2.2.0-SNAPSHOT</policy.models.version>
51     </properties>
52
53     <modules>
54         <module>main</module>
55         <module>packages</module>
56         <module>testsuites</module>
57     </modules>
58
59     <dependencies>
60         <dependency>
61             <groupId>junit</groupId>
62             <artifactId>junit</artifactId>
63             <scope>test</scope>
64         </dependency>
65     </dependencies>
66
67     <distributionManagement>
68         <site>
69             <id>ecomp-site</id>
70             <url>dav:${nexusproxy}${sitePath}</url>
71         </site>
72     </distributionManagement>
73
74     <build>
75         <plugins>
76             <plugin>
77                 <groupId>org.jacoco</groupId>
78                 <artifactId>jacoco-maven-plugin</artifactId>
79                 <executions>
80                     <execution>
81                         <id>pre-unit-test</id>
82                         <goals>
83                             <goal>prepare-agent</goal>
84                         </goals>
85                         <configuration>
86                             <destFile>${sonar.jacoco.reportPath}</destFile>
87                             <append>true</append>
88                         </configuration>
89                     </execution>
90                     <execution>
91                         <id>post-unit-test</id>
92                         <phase>test</phase>
93                         <goals>
94                             <goal>report</goal>
95                         </goals>
96                         <configuration>
97                             <dataFile>${sonar.jacoco.reportPath}</dataFile>
98                         </configuration>
99                     </execution>
100                 </executions>
101             </plugin>
102             <plugin>
103                 <artifactId>maven-checkstyle-plugin</artifactId>
104                 <executions>
105                     <execution>
106                         <id>onap-java-style</id>
107                         <goals>
108                             <goal>check</goal>
109                         </goals>
110                         <phase>process-sources</phase>
111                         <configuration>
112                             <!-- Use Google Java Style Guide: https://github.com/checkstyle/checkstyle/blob/master/src/main/resources/google_checks.xml 
113                                 with minor changes -->
114                             <configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
115                             <!-- <sourceDirectory> is needed so that checkstyle ignores the generated sources directory -->
116                             <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
117                             <includeResources>true</includeResources>
118                             <includeTestSourceDirectory>true</includeTestSourceDirectory>
119                             <includeTestResources>true</includeTestResources>
120                             <excludes>
121                             </excludes>
122                             <consoleOutput>true</consoleOutput>
123                             <failOnViolation>true</failOnViolation>
124                             <violationSeverity>warning</violationSeverity>
125                         </configuration>
126                     </execution>
127                 </executions>
128                 <dependencies>
129                     <dependency>
130                         <groupId>org.onap.oparent</groupId>
131                         <artifactId>checkstyle</artifactId>
132                         <version>${oparent.version}</version>
133                         <scope>compile</scope>
134                     </dependency>
135                 </dependencies>
136             </plugin>
137         </plugins>
138         <pluginManagement>
139             <plugins>
140                 <plugin>
141                     <groupId>org.jacoco</groupId>
142                     <artifactId>jacoco-maven-plugin</artifactId>
143                     <version>${jacoco.version}</version>
144                     <configuration>
145                         <!-- Note: This exclusion list should match <sonar.exclusions> property above -->
146                         <excludes>
147                             <exclude>**/gen/**</exclude>
148                             <exclude>**/generated-sources/**</exclude>
149                             <exclude>**/yang-gen/**</exclude>
150                             <exclude>**/pax/**</exclude>
151                         </excludes>
152                     </configuration>
153                     <executions>
154                         <!-- Prepares the property pointing to the JaCoCo runtime agent which is passed as VM argument when 
155                             Maven the Surefire plugin is executed. -->
156                         <execution>
157                             <id>pre-unit-test</id>
158                             <goals>
159                                 <goal>prepare-agent</goal>
160                             </goals>
161                             <configuration>
162                                 <destFile>${sonar.jacoco.reportPath}</destFile>
163                             </configuration>
164                         </execution>
165                         <!-- Ensures that the code coverage report for unit tests is created after unit tests have been run. -->
166                         <execution>
167                             <id>post-unit-test</id>
168                             <phase>test</phase>
169                             <goals>
170                                 <goal>report</goal>
171                             </goals>
172                             <configuration>
173                                 <dataFile>${sonar.jacoco.reportPath}</dataFile>
174                             </configuration>
175                         </execution>
176                     </executions>
177                 </plugin>
178                 <plugin>
179                     <groupId>org.eclipse.m2e</groupId>
180                     <artifactId>lifecycle-mapping</artifactId>
181                     <version>1.0.0</version>
182                     <configuration>
183                         <lifecycleMappingMetadata>
184                             <pluginExecutions>
185                                 <pluginExecution>
186                                     <pluginExecutionFilter>
187                                         <groupId>org.apache.maven.plugins</groupId>
188                                         <artifactId>maven-checkstyle-plugin</artifactId>
189                                         <versionRange>2.17,)</versionRange>
190                                         <goals>
191                                             <goal>check</goal>
192                                         </goals>
193                                     </pluginExecutionFilter>
194                                     <action>
195                                         <ignore />
196                                     </action>
197                                 </pluginExecution>
198                             </pluginExecutions>
199                         </lifecycleMappingMetadata>
200                     </configuration>
201                 </plugin>
202             </plugins>
203         </pluginManagement>
204     </build>
205 </project>