Merge "JUnit test for policy/engine ONAP-XACML"
[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" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
21         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
22         <modelVersion>4.0.0</modelVersion>
23
24         <parent>
25                 <groupId>org.onap.oparent</groupId>
26                 <artifactId>oparent</artifactId>
27                 <version>0.1.1</version>
28                 <relativePath/>
29         </parent>
30
31         <groupId>org.onap.policy.engine</groupId>
32         <artifactId>PolicyEngineSuite</artifactId>
33         <version>1.2.0-SNAPSHOT</version>
34         <packaging>pom</packaging>
35         <name>policy-engine</name>
36
37         <description>The ONAP Policy Engine main pom</description>
38
39         <properties>
40                 <!-- Project common build settings -->
41                 <project.source.version>1.8</project.source.version>
42                 <project.target.version>1.8</project.target.version>
43                 <project.encoding>UTF-8</project.encoding>
44                 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
45                 <!-- Project path properties -->
46                 <nexusproxy>https://nexus.onap.org</nexusproxy>
47                 <sitePath>/content/sites/site/${project.groupId}/${project.artifactId}/${project.version}</sitePath>
48                 <releases.path>content/repositories/releases/</releases.path>
49                 <snapshots.path>content/repositories/snapshots/</snapshots.path>
50                 <staging.path>content/repositories/staging/</staging.path>
51
52                 <!-- sonar/jacoco overrides -->
53                 <!-- Overriding oparent default sonar/jacoco settings Combine all our reports 
54                         into one file shared across sub-modules -->
55                 <sonar.jacoco.reportPath>${project.basedir}/../target/code-coverage/jacoco-ut.exec</sonar.jacoco.reportPath>
56                 <sonar.jacoco.itReportPath>${project.basedir}/../target/code-coverage/jacoco-it.exec</sonar.jacoco.itReportPath>
57                 <sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>
58
59                 <!-- Project common dependency versions -->
60                 <jetty.plugin.version>9.2.3.v20140905</jetty.plugin.version>
61                 <dmaap.version>1.0.0</dmaap.version>
62                 <httpclient.version>4.5.5</httpclient.version>
63                 <jackson.version>2.9.4</jackson.version>
64                 <commons.fileupload.version>1.3.3</commons.fileupload.version>
65         </properties>
66
67
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
84         <distributionManagement>
85                 <repository>
86                         <id>ecomp-releases</id>
87                         <name>ONAP Release Repository</name>
88                         <url>${nexusproxy}/${releases.path}</url>
89                 </repository>
90                 <snapshotRepository>
91                         <id>ecomp-snapshots</id>
92                         <name>ONAP Snapshot Repository</name>
93                         <url>${nexusproxy}/${snapshots.path}</url>
94                 </snapshotRepository>
95                 <site>
96                         <id>ecomp-site</id>
97                         <url>dav:${nexusproxy}${sitePath}</url>
98                 </site>
99         </distributionManagement>
100
101         <repositories>
102                 <!-- LF repositories -->
103                 <repository>
104                         <id>ecomp-releases</id>
105                         <name>Release Repository</name>
106                         <url>${nexusproxy}/content/repositories/releases/</url>
107                 </repository>
108                 <repository>
109                         <id>ecomp-staging</id>
110                         <name>Staging Repository</name>
111                         <url>${nexusproxy}/content/repositories/staging/</url>
112                 </repository>
113                 <repository>
114                         <id>ecomp-snapshots</id>
115                         <name>Snapshots Repository</name>
116                         <url>${nexusproxy}/content/repositories/snapshots/</url>
117                 </repository>
118                 <repository>
119                         <id>ecomp-public</id>
120                         <name>Public Repository</name>
121                         <url>${nexusproxy}/content/repositories/public/</url>
122                 </repository>
123                 <!-- LF repositories END-->
124         </repositories>
125
126         <reporting>
127           <plugins>
128             <plugin>
129               <groupId>org.apache.maven.plugins</groupId>
130               <artifactId>maven-javadoc-plugin</artifactId>
131               <version>2.10.4</version>
132               <configuration>
133                 <failOnError>false</failOnError>
134                 <doclet>org.umlgraph.doclet.UmlGraphDoc</doclet>
135                 <docletArtifact>
136                   <groupId>org.umlgraph</groupId>
137                   <artifactId>umlgraph</artifactId>
138                   <version>5.6</version>
139                 </docletArtifact>
140                 <additionalparam>-views</additionalparam>
141                 <useStandardDocletOptions>true</useStandardDocletOptions>
142               </configuration>
143             </plugin>
144           </plugins>
145         </reporting>
146
147         <dependencies>
148
149                 <dependency>
150                         <groupId>javax.servlet</groupId>
151                         <artifactId>javax.servlet-api</artifactId>
152                         <version>3.1.0</version>
153                 </dependency>
154                 <dependency>
155                         <!-- org.w3c.dom dependencies -->
156                         <groupId>xml-apis</groupId>
157                         <artifactId>xml-apis</artifactId>
158                         <version>1.3.03</version>
159                 </dependency>
160         </dependencies>
161
162         <build>
163                 <plugins>
164                         <plugin>
165                                 <groupId>org.jacoco</groupId>
166                                 <artifactId>jacoco-maven-plugin</artifactId>
167                                 <executions>
168                                         <execution>
169                                                 <id>pre-unit-test</id>
170                                                 <goals>
171                                                         <goal>prepare-agent</goal>
172                                                 </goals>
173                                                 <configuration>
174                                                         <destFile>${sonar.jacoco.reportPath}</destFile>
175                                                         <append>true</append>
176                                                 </configuration>
177                                         </execution>
178                                         <execution>
179                                                 <id>post-unit-test</id>
180                                                 <phase>test</phase>
181                                                 <goals>
182                                                         <goal>report</goal>
183                                                 </goals>
184                                                 <configuration>
185                                                         <dataFile>${sonar.jacoco.reportPath}</dataFile>
186                                                 </configuration>
187                                         </execution>
188                                 </executions>
189                         </plugin>
190                         <plugin>
191                                 <groupId>org.sonatype.plugins</groupId>
192                                 <artifactId>nexus-staging-maven-plugin</artifactId>
193                                 <extensions>true</extensions>
194                                 <configuration>
195                                         <nexusUrl>${nexusproxy}</nexusUrl>
196                                         <stagingProfileId>176c31dfe190a</stagingProfileId>
197                                         <serverId>ecomp-staging</serverId>
198                                 </configuration>
199                         </plugin>
200                         <plugin>
201                                 <groupId>org.apache.maven.plugins</groupId>
202                                 <artifactId>maven-deploy-plugin</artifactId>
203                                 <configuration>
204                                         <skip />
205                                 </configuration>
206                         </plugin>
207                         <plugin>
208                                 <groupId>org.apache.maven.plugins</groupId>
209                                 <artifactId>maven-surefire-plugin</artifactId>
210                         </plugin>
211                         <plugin>
212                                 <groupId>org.apache.maven.plugins</groupId>
213                                 <artifactId>maven-clean-plugin</artifactId>
214                                 <version>2.4.1</version>
215                         </plugin>
216                         <plugin>
217                                 <groupId>org.apache.maven.plugins</groupId>
218                                 <artifactId>maven-compiler-plugin</artifactId>
219                                 <version>3.0</version>
220                                 <configuration>
221                                         <encoding>${project.encoding}</encoding>
222                                         <source>${project.source.version}</source>
223                                         <target>${project.target.version}</target>
224                                 </configuration>
225                         </plugin>
226                         <plugin>
227                                 <groupId>org.apache.maven.plugins</groupId>
228                                 <artifactId>maven-resources-plugin</artifactId>
229                                 <version>2.6</version>
230                                 <configuration>
231                                         <encoding>${project.encoding}</encoding>
232                                 </configuration>
233                         </plugin>
234                         <plugin>
235                                 <groupId>org.apache.maven.plugins</groupId>
236                                 <artifactId>maven-war-plugin</artifactId>
237                                 <version>2.3</version>
238                                 <configuration>
239                                         <failOnMissingWebXml>false</failOnMissingWebXml>
240                                 </configuration>
241                         </plugin>
242                         <!-- The Jetty plugin allows us to easily test the development build by
243                                 running jetty:run on the command line. -->
244
245                         <plugin>
246                                 <groupId>org.eclipse.jetty</groupId>
247                                 <artifactId>jetty-maven-plugin</artifactId>
248                                 <version>${jetty.plugin.version}</version>
249                                 <configuration>
250                                         <scanIntervalSeconds>2</scanIntervalSeconds>
251                                 </configuration>
252                         </plugin>
253                         <plugin>
254                                 <groupId>com.fortify.ps.maven.plugin</groupId>
255                                 <artifactId>sca-maven-plugin</artifactId>
256                                 <version>4.20</version>
257                         </plugin>
258                         <plugin>
259                           <groupId>org.apache.maven.plugins</groupId>
260                           <artifactId>maven-site-plugin</artifactId>
261                           <dependencies>
262                             <dependency>
263                               <groupId>org.apache.maven.wagon</groupId>
264                               <artifactId>wagon-webdav-jackrabbit</artifactId>
265                               <version>2.10</version>
266                             </dependency>
267                           </dependencies>
268                         </plugin>
269                 </plugins>
270         <pluginManagement>
271             <plugins>
272                                 <plugin>
273                                         <groupId>org.jacoco</groupId>
274                                         <artifactId>jacoco-maven-plugin</artifactId>
275                                         <version>${jacoco.version}</version>
276                                         <configuration>
277                                                 <!-- Note: This exclusion list should match <sonar.exclusions> property 
278                                                         above -->
279                                                 <excludes>
280                                                         <exclude>**/gen/**</exclude>
281                                                         <exclude>**/generated-sources/**</exclude>
282                                                         <exclude>**/yang-gen/**</exclude>
283                                                         <exclude>**/pax/**</exclude>
284                                                 </excludes>
285                                         </configuration>
286                                         <executions>
287                                                 <!-- Prepares the property pointing to the JaCoCo runtime agent which 
288                                                         is passed as VM argument when Maven the Surefire plugin is executed. -->
289                                                 <execution>
290                                                         <id>pre-unit-test</id>
291                                                         <goals>
292                                                                 <goal>prepare-agent</goal>
293                                                         </goals>
294                                                         <configuration>
295                                                                 <destFile>${sonar.jacoco.reportPath}</destFile>
296                                                         </configuration>
297                                                 </execution>
298                                                 <!-- Ensures that the code coverage report for unit tests is created 
299                                                         after unit tests have been run. -->
300                                                 <execution>
301                                                         <id>post-unit-test</id>
302                                                         <phase>test</phase>
303                                                         <goals>
304                                                                 <goal>report</goal>
305                                                         </goals>
306                                                         <configuration>
307                                                                 <dataFile>${sonar.jacoco.reportPath}</dataFile>
308                                                         </configuration>
309                                                 </execution>
310                                         </executions>
311                                 </plugin>
312                 <plugin>
313                     <groupId>org.eclipse.m2e</groupId>
314                     <artifactId>lifecycle-mapping</artifactId>
315                     <version>1.0.0</version>
316                     <configuration>
317                         <lifecycleMappingMetadata>
318                             <pluginExecutions>
319                                 <pluginExecution>
320                                     <pluginExecutionFilter>
321                                         <groupId>org.apache.maven.plugins</groupId>
322                                         <artifactId>maven-checkstyle-plugin</artifactId>
323                                         <versionRange>2.17,)</versionRange>
324                                         <goals>
325                                             <goal>check</goal>
326                                         </goals>
327                                     </pluginExecutionFilter>
328                                     <action>
329                                         <ignore />
330                                     </action>
331                                 </pluginExecution>
332                             </pluginExecutions>
333                         </lifecycleMappingMetadata>
334                     </configuration>
335                 </plugin>
336             </plugins>
337         </pluginManagement>
338         </build>
339 </project>