Resolved XACML Platform Sonar issues
[policy/engine.git] / pom.xml
1 <!--
2   ============LICENSE_START=======================================================
3   ONAP Policy Engine
4   ================================================================================
5   Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
6   ================================================================================
7   Licensed under the Apache License, Version 2.0 (the "License");
8   you may not use this file except in compliance with the License.
9   You may obtain a copy of the License at
10   
11        http://www.apache.org/licenses/LICENSE-2.0
12   
13   Unless required by applicable law or agreed to in writing, software
14   distributed under the License is distributed on an "AS IS" BASIS,
15   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16   See the License for the specific language governing permissions and
17   limitations under the License.
18   ============LICENSE_END=========================================================
19   -->
20 <project xmlns="http://maven.apache.org/POM/4.0.0"
21     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
22     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
23     <modelVersion>4.0.0</modelVersion>
24     <parent>
25         <groupId>org.onap.policy.parent</groupId>
26         <artifactId>integration</artifactId>
27         <version>2.0.0-SNAPSHOT</version>
28         <relativePath />
29     </parent>
30     <groupId>org.onap.policy.engine</groupId>
31     <artifactId>PolicyEngineSuite</artifactId>
32     <version>1.3.0-SNAPSHOT</version>
33     <packaging>pom</packaging>
34     <name>policy-engine</name>
35     <description>The ONAP Policy Engine main pom</description>
36     <properties>
37         <!-- Project common build settings -->
38         <project.source.version>1.8</project.source.version>
39         <project.target.version>1.8</project.target.version>
40         <project.encoding>UTF-8</project.encoding>
41         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
42         <!-- Project path properties -->
43         <nexusproxy>https://nexus.onap.org</nexusproxy>
44         <sitePath>/content/sites/site/${project.groupId}/${project.artifactId}/${project.version}</sitePath>
45         <releases.path>content/repositories/releases/</releases.path>
46         <snapshots.path>content/repositories/snapshots/</snapshots.path>
47         <staging.path>content/repositories/staging/</staging.path>
48
49         <!-- sonar/jacoco overrides -->
50         <!-- Overriding oparent default sonar/jacoco settings Combine all our reports 
51             into one file shared across sub-modules -->
52         <sonar.jacoco.reportPath>${project.basedir}/../target/code-coverage/jacoco-ut.exec</sonar.jacoco.reportPath>
53         <sonar.jacoco.itReportPath>${project.basedir}/../target/code-coverage/jacoco-it.exec</sonar.jacoco.itReportPath>
54         <sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>
55
56         <!-- Shared between policy/* project repositories - same version -->
57         <h2.version>1.4.186</h2.version>
58
59         <!-- Shared between policy/* project repositories - different version -->
60
61         <!-- Project common dependency versions -->
62         <jetty.plugin.version>9.2.3.v20140905</jetty.plugin.version>
63         <dmaap.version>1.1.3</dmaap.version>
64         <httpclient.version>4.5.5</httpclient.version>
65         <jackson.version>2.9.4</jackson.version>
66         <commons.fileupload.version>1.3.3</commons.fileupload.version>
67     </properties>
68     <modules>
69         <module>PolicyEngineUtils</module>
70         <module>ONAP-XACML</module>
71         <module>ONAP-REST</module>
72         <module>PolicyEngineAPI</module>
73         <module>ONAP-PDP</module>
74         <module>ONAP-PDP-REST</module>
75         <module>ONAP-PAP-REST</module>
76         <module>LogParser</module>
77         <module>PolicyEngineClient</module>
78         <module>BRMSGateway</module>
79         <module>POLICY-SDK-APP</module>
80         <module>ONAP-SDK-APP</module>
81         <module>packages</module>
82     </modules>
83     <distributionManagement>
84         <repository>
85             <id>ecomp-releases</id>
86             <name>ONAP Release Repository</name>
87             <url>${nexusproxy}/${releases.path}</url>
88         </repository>
89         <snapshotRepository>
90             <id>ecomp-snapshots</id>
91             <name>ONAP Snapshot Repository</name>
92             <url>${nexusproxy}/${snapshots.path}</url>
93         </snapshotRepository>
94         <site>
95             <id>ecomp-site</id>
96             <url>dav:${nexusproxy}${sitePath}</url>
97         </site>
98     </distributionManagement>
99     <reporting>
100         <plugins>
101             <plugin>
102                 <groupId>org.apache.maven.plugins</groupId>
103                 <artifactId>maven-javadoc-plugin</artifactId>
104                 <version>2.10.4</version>
105                 <configuration>
106                     <failOnError>false</failOnError>
107                     <doclet>org.umlgraph.doclet.UmlGraphDoc</doclet>
108                     <docletArtifact>
109                         <groupId>org.umlgraph</groupId>
110                         <artifactId>umlgraph</artifactId>
111                         <version>5.6</version>
112                     </docletArtifact>
113                     <additionalparam>-views</additionalparam>
114                     <useStandardDocletOptions>true</useStandardDocletOptions>
115                 </configuration>
116             </plugin>
117         </plugins>
118     </reporting>
119     <dependencyManagement>
120         <dependencies>
121             <dependency>
122                 <groupId>com.h2database</groupId>
123                 <artifactId>h2</artifactId>
124                 <version>${h2.version}</version>
125                 <scope>test</scope>
126             </dependency>
127         </dependencies>
128     </dependencyManagement>
129     <dependencies>
130         <dependency>
131             <groupId>javax.servlet</groupId>
132             <artifactId>javax.servlet-api</artifactId>
133         </dependency>
134         <dependency>
135             <!-- org.w3c.dom dependencies -->
136             <groupId>xml-apis</groupId>
137             <artifactId>xml-apis</artifactId>
138             <version>1.3.03</version>
139         </dependency>
140         <!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind -->
141         <dependency>
142             <groupId>com.fasterxml.jackson.core</groupId>
143             <artifactId>jackson-databind</artifactId>
144             <version>${jackson.version}</version>
145         </dependency>
146         <dependency>
147             <groupId>junit</groupId>
148             <artifactId>junit</artifactId>
149             <scope>test</scope>
150         </dependency>
151         <dependency>
152             <groupId>org.springframework</groupId>
153             <artifactId>spring-mock</artifactId>
154             <version>2.0.8</version>
155             <scope>test</scope>
156         </dependency>
157         <dependency>
158             <groupId>com.mockrunner</groupId>
159             <artifactId>mockrunner</artifactId>
160             <version>0.3.1</version>
161             <scope>test</scope>
162         </dependency>
163         <!-- https://mvnrepository.com/artifact/org.powermock/powermock-api-mockito -->
164         <dependency>
165             <groupId>org.powermock</groupId>
166             <artifactId>powermock-api-mockito</artifactId>
167             <version>1.7.3</version>
168             <scope>test</scope>
169         </dependency>
170         <dependency>
171             <groupId>org.powermock</groupId>
172             <artifactId>powermock-module-junit4</artifactId>
173             <version>1.7.3</version>
174             <scope>test</scope>
175         </dependency>
176         <!-- https://mvnrepository.com/artifact/org.mockito/mockito-all -->
177         <dependency>
178             <groupId>org.mockito</groupId>
179             <artifactId>mockito-all</artifactId>
180             <scope>test</scope>
181         </dependency>
182         <dependency>
183             <groupId>org.easymock</groupId>
184             <artifactId>easymock</artifactId>
185             <version>3.1</version>
186             <scope>test</scope>
187         </dependency>
188     </dependencies>
189     <build>
190         <plugins>
191             <plugin>
192                 <groupId>org.jacoco</groupId>
193                 <artifactId>jacoco-maven-plugin</artifactId>
194                 <executions>
195                     <execution>
196                         <id>pre-unit-test</id>
197                         <goals>
198                             <goal>prepare-agent</goal>
199                         </goals>
200                         <configuration>
201                             <destFile>${sonar.jacoco.reportPath}</destFile>
202                             <append>true</append>
203                         </configuration>
204                     </execution>
205                     <execution>
206                         <id>post-unit-test</id>
207                         <phase>test</phase>
208                         <goals>
209                             <goal>report</goal>
210                         </goals>
211                         <configuration>
212                             <dataFile>${sonar.jacoco.reportPath}</dataFile>
213                         </configuration>
214                     </execution>
215                 </executions>
216             </plugin>
217             <plugin>
218                 <groupId>org.sonatype.plugins</groupId>
219                 <artifactId>nexus-staging-maven-plugin</artifactId>
220                 <extensions>true</extensions>
221                 <configuration>
222                     <nexusUrl>${nexusproxy}</nexusUrl>
223                     <stagingProfileId>176c31dfe190a</stagingProfileId>
224                     <serverId>ecomp-staging</serverId>
225                 </configuration>
226             </plugin>
227             <plugin>
228                 <groupId>org.apache.maven.plugins</groupId>
229                 <artifactId>maven-deploy-plugin</artifactId>
230                 <configuration>
231                     <skip />
232                 </configuration>
233             </plugin>
234             <plugin>
235                 <groupId>org.apache.maven.plugins</groupId>
236                 <artifactId>maven-surefire-plugin</artifactId>
237             </plugin>
238             <plugin>
239                 <groupId>org.apache.maven.plugins</groupId>
240                 <artifactId>maven-clean-plugin</artifactId>
241                 <version>2.4.1</version>
242             </plugin>
243             <plugin>
244                 <groupId>org.apache.maven.plugins</groupId>
245                 <artifactId>maven-compiler-plugin</artifactId>
246                 <configuration>
247                     <encoding>${project.encoding}</encoding>
248                     <source>${project.source.version}</source>
249                     <target>${project.target.version}</target>
250                 </configuration>
251             </plugin>
252             <plugin>
253                 <groupId>org.apache.maven.plugins</groupId>
254                 <artifactId>maven-resources-plugin</artifactId>
255                 <configuration>
256                     <encoding>${project.encoding}</encoding>
257                 </configuration>
258             </plugin>
259             <plugin>
260                 <groupId>org.apache.maven.plugins</groupId>
261                 <artifactId>maven-war-plugin</artifactId>
262                 <configuration>
263                     <failOnMissingWebXml>false</failOnMissingWebXml>
264                 </configuration>
265             </plugin>
266             <!-- The Jetty plugin allows us to easily test the development build by
267                 running jetty:run on the command line. -->
268             <plugin>
269                 <groupId>org.eclipse.jetty</groupId>
270                 <artifactId>jetty-maven-plugin</artifactId>
271                 <version>${jetty.plugin.version}</version>
272                 <configuration>
273                     <scanIntervalSeconds>2</scanIntervalSeconds>
274                 </configuration>
275             </plugin>
276             <plugin>
277                 <groupId>com.fortify.ps.maven.plugin</groupId>
278                 <artifactId>sca-maven-plugin</artifactId>
279                 <version>4.20</version>
280             </plugin>
281             <plugin>
282                 <groupId>org.apache.maven.plugins</groupId>
283                 <artifactId>maven-site-plugin</artifactId>
284                 <dependencies>
285                     <dependency>
286                         <groupId>org.apache.maven.wagon</groupId>
287                         <artifactId>wagon-webdav-jackrabbit</artifactId>
288                         <version>2.10</version>
289                     </dependency>
290                 </dependencies>
291             </plugin>
292         </plugins>
293         <pluginManagement>
294             <plugins>
295                 <plugin>
296                     <groupId>org.jacoco</groupId>
297                     <artifactId>jacoco-maven-plugin</artifactId>
298                     <version>${jacoco.version}</version>
299                     <configuration>
300                          <!-- Note: This exclusion list should match <sonar.exclusions> property 
301                              above -->
302                         <excludes>
303                             <exclude>**/gen/**</exclude>
304                             <exclude>**/generated-sources/**</exclude>
305                             <exclude>**/yang-gen/**</exclude>
306                             <exclude>**/pax/**</exclude>
307                         </excludes>
308                     </configuration>
309                     <executions>
310                         <!-- Prepares the property pointing to the JaCoCo runtime agent which 
311                              is passed as VM argument when Maven the Surefire plugin is executed. -->
312                         <execution>
313                             <id>pre-unit-test</id>
314                             <goals>
315                                 <goal>prepare-agent</goal>
316                             </goals>
317                             <configuration>
318                                 <destFile>${sonar.jacoco.reportPath}</destFile>
319                             </configuration>
320                         </execution>
321                         <!-- Ensures that the code coverage report for unit tests is created 
322                             after unit tests have been run. -->
323                         <execution>
324                             <id>post-unit-test</id>
325                             <phase>test</phase>
326                             <goals>
327                                 <goal>report</goal>
328                             </goals>
329                             <configuration>
330                                 <dataFile>${sonar.jacoco.reportPath}</dataFile>
331                             </configuration>
332                         </execution>
333                     </executions>
334                 </plugin>
335                 <plugin>
336                     <groupId>org.eclipse.m2e</groupId>
337                     <artifactId>lifecycle-mapping</artifactId>
338                     <version>1.0.0</version>
339                     <configuration>
340                         <lifecycleMappingMetadata>
341                             <pluginExecutions>
342                                 <pluginExecution>
343                                     <pluginExecutionFilter>
344                                         <groupId>org.apache.maven.plugins</groupId>
345                                         <artifactId>maven-checkstyle-plugin</artifactId>
346                                         <versionRange>2.17,)</versionRange>
347                                         <goals>
348                                             <goal>check</goal>
349                                         </goals>
350                                     </pluginExecutionFilter>
351                                     <action>
352                                         <ignore />
353                                     </action>
354                                 </pluginExecution>
355                             </pluginExecutions>
356                         </lifecycleMappingMetadata>
357                     </configuration>
358                 </plugin>
359             </plugins>
360         </pluginManagement>
361     </build>
362 </project>