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