Merge "ignore Eclipse generated project files"
[oparent.git] / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3    Copyright (c) 2016-2017 Huawei Technologies Co., Ltd.
4
5    Licensed under the Apache License, Version 2.0 (the "License");
6    you may not use this file except in compliance with the License.
7    You may obtain a copy of the License at
8
9        http://www.apache.org/licenses/LICENSE-2.0
10
11    Unless required by applicable law or agreed to in writing, software
12    distributed under the License is distributed on an "AS IS" BASIS,
13    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14    See the License for the specific language governing permissions and
15    limitations under the License.
16 -->
17 <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">
18   <modelVersion>4.0.0</modelVersion>
19   <parent>
20     <groupId>org.onap.oparent</groupId>
21     <artifactId>version</artifactId>
22     <version>1.0.0-SNAPSHOT</version>
23     <relativePath>version</relativePath>
24   </parent>
25   <name>oparent</name>
26   <artifactId>oparent</artifactId>
27   <packaging>pom</packaging>
28   <scm>
29     <connection>scm:git:ssh://git.onap.org:29418/oparent.git</connection>
30     <developerConnection>scm:git:ssh://git.onap.org:29418/oparent.git</developerConnection>
31     <tag>HEAD</tag>
32     <url>https://wiki.onap.org/display/DW/Integration+Project</url>
33   </scm>
34   <modules>
35     <!-- oparent tools -->
36     <module>version</module>
37     <module>checkstyle</module>
38     <module>license</module>
39   </modules>
40   <properties>
41     <jacoco.version>0.7.7.201606060606</jacoco.version>
42     <sonar-jacoco-listeners.version>3.2</sonar-jacoco-listeners.version>
43     <sonar.core.codeCoveragePlugin>jacoco</sonar.core.codeCoveragePlugin>
44     <!-- Default Sonar configuration -->
45     <sonar.jacoco.reportPath>target/code-coverage/jacoco-ut.exec</sonar.jacoco.reportPath>
46     <sonar.jacoco.itReportPath>target/code-coverage/jacoco-it.exec</sonar.jacoco.itReportPath>
47     <!-- Note: This list should match jacoco-maven-plugin's exclusion list below -->
48     <sonar.exclusions>**/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/**</sonar.exclusions>
49   </properties>
50   <build>
51     <pluginManagement>
52       <plugins>
53         <plugin>
54           <artifactId>maven-checkstyle-plugin</artifactId>
55           <version>2.17</version>
56           <dependencies>
57             <dependency>
58               <groupId>org.onap.oparent</groupId>
59               <artifactId>checkstyle</artifactId>
60               <version>1.0.0-SNAPSHOT</version>
61             </dependency>
62             <dependency>
63               <groupId>org.onap.oparent</groupId>
64               <artifactId>onap-license</artifactId>
65               <version>1.0.0-SNAPSHOT</version>
66             </dependency>
67           </dependencies>
68           <configuration>
69             <!-- Use Google Java Style Guide: 
70                 https://github.com/checkstyle/checkstyle/blob/master/src/main/resources/google_checks.xml
71                 with minor changes -->
72             <configLocation>onap-java-style.xml</configLocation>
73             <!-- <sourceDirectory> is needed so that checkstyle ignores the
74                  generated sources directory -->
75             <sourceDirectory>${project.build.sourceDirectory}/src/main/java</sourceDirectory>
76             <includeResources>true</includeResources>
77             <includeTestSourceDirectory>true</includeTestSourceDirectory>
78             <includeTestResources>true</includeTestResources>
79             <excludes>
80             </excludes>
81             <failsOnError>false</failsOnError>
82             <consoleOutput>true</consoleOutput>
83           </configuration>
84           <executions>
85             <execution>
86               <id>check-license</id>
87               <goals>
88                 <goal>check</goal>
89               </goals>
90               <phase>process-sources</phase>
91               <configuration>
92                 <configLocation>check-license.xml</configLocation>
93                 <headerLocation>apache-license-2.regexp.txt</headerLocation>
94                 <includeResources>false</includeResources>
95                 <includeTestSourceDirectory>true</includeTestSourceDirectory>
96                 <includeTestResources>false</includeTestResources>
97                 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
98                 <excludes>
99                 </excludes>
100                 <failsOnError>false</failsOnError>
101                 <consoleOutput>true</consoleOutput>
102               </configuration>
103             </execution>
104             <execution>
105               <id>check-style</id>
106               <goals>
107                 <goal>check</goal>
108               </goals>
109               <phase>process-sources</phase>
110             </execution>
111           </executions>
112         </plugin>
113         <plugin>
114           <groupId>org.jacoco</groupId>
115           <artifactId>jacoco-maven-plugin</artifactId>
116           <version>${jacoco.version}</version>
117           <configuration>
118             <!-- Note: This exclusion list should match <sonar.exclusions>
119                  property above -->
120             <excludes>
121               <exclude>**/gen/**</exclude>
122               <exclude>**/generated-sources/**</exclude>
123               <exclude>**/yang-gen/**</exclude>
124               <exclude>**/pax/**</exclude>
125             </excludes>
126           </configuration>
127           <executions>
128             <!--
129                 Prepares the property pointing to the JaCoCo runtime agent which
130                 is passed as VM argument when Maven the Surefire plugin is executed.
131             -->
132             <execution>
133               <id>pre-unit-test</id>
134               <goals>
135                 <goal>prepare-agent</goal>
136               </goals>
137               <configuration>
138                 <!-- Sets the path to the file which contains the execution data. -->
139                 <destFile>${project.build.directory}/code-coverage/jacoco-ut.exec</destFile>
140                 <!--
141                     Sets the name of the property containing the settings
142                     for JaCoCo runtime agent.
143                 -->
144                 <propertyName>surefireArgLine</propertyName>
145               </configuration>
146             </execution>
147             <!--
148                 Ensures that the code coverage report for unit tests is created after
149                 unit tests have been run.
150             -->
151             <execution>
152               <id>post-unit-test</id>
153               <phase>test</phase>
154               <goals>
155                 <goal>report</goal>
156               </goals>
157               <configuration>
158                 <!-- Sets the path to the file which contains the execution data. -->
159                 <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
160                 <!-- Sets the output directory for the code coverage report. -->
161                 <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
162               </configuration>
163             </execution>
164             <execution>
165               <id>pre-integration-test</id>
166               <phase>pre-integration-test</phase>
167               <goals>
168                 <goal>prepare-agent</goal>
169               </goals>
170               <configuration>
171                 <!-- Sets the path to the file which contains the execution data. -->
172                 <destFile>${project.build.directory}/code-coverage/jacoco-it.exec</destFile>
173                 <!--
174                     Sets the name of the property containing the settings
175                     for JaCoCo runtime agent.
176                 -->
177                 <propertyName>failsafeArgLine</propertyName>
178               </configuration>
179             </execution>
180             <!--
181                 Ensures that the code coverage report for integration tests after
182                 integration tests have been run.
183             -->
184             <execution>
185               <id>post-integration-test</id>
186               <phase>post-integration-test</phase>
187               <goals>
188                 <goal>report</goal>
189               </goals>
190               <configuration>
191                 <!-- Sets the path to the file which contains the execution data. -->
192                 <dataFile>${project.build.directory}/code-coverage/jacoco-it.exec</dataFile>
193                 <!-- Sets the output directory for the code coverage report. -->
194                 <outputDirectory>${project.reporting.outputDirectory}/jacoco-it</outputDirectory>
195               </configuration>
196             </execution>
197           </executions>
198         </plugin>
199         <plugin>
200           <groupId>org.apache.maven.plugins</groupId>
201           <artifactId>maven-surefire-plugin</artifactId>
202           <version>2.19.1</version>
203           <configuration>
204             <!-- Sets the VM argument line used when unit tests are run. -->
205             <argLine>${surefireArgLine}</argLine>
206             <!-- Excludes integration tests when unit tests are run. -->
207             <excludes>
208               <exclude>**/IT*.java</exclude>
209             </excludes>
210           </configuration>
211         </plugin>
212         <plugin>
213           <groupId>org.apache.maven.plugins</groupId>
214           <artifactId>maven-failsafe-plugin</artifactId>
215           <version>2.19.1</version>
216           <executions>
217             <!--
218                 Ensures that both integration-test and verify goals of the Failsafe Maven
219                 plugin are executed.
220             -->
221             <execution>
222               <id>integration-tests</id>
223               <goals>
224                 <goal>integration-test</goal>
225                 <goal>verify</goal>
226               </goals>
227               <configuration>
228                 <!-- Sets the VM argument line used when integration tests are run. -->
229                 <argLine>${failsafeArgLine}</argLine>
230               </configuration>
231             </execution>
232           </executions>
233         </plugin>
234         <!-- https://mvnrepository.com/artifact/org.sonarsource.scanner.maven/sonar-maven-plugin -->
235         <plugin>
236           <groupId>org.sonarsource.scanner.maven</groupId>
237           <artifactId>sonar-maven-plugin</artifactId>
238           <version>3.3.0.603</version>
239         </plugin>
240       </plugins>
241     </pluginManagement>
242     <plugins>
243       <plugin>
244         <artifactId>maven-checkstyle-plugin</artifactId>
245       </plugin>
246       <plugin>
247         <groupId>org.codehaus.mojo</groupId>
248         <artifactId>build-helper-maven-plugin</artifactId>
249         <version>1.12</version>
250       </plugin>
251       <!-- Jacoco / Sonar -->
252       <plugin>
253         <groupId>org.jacoco</groupId>
254         <artifactId>jacoco-maven-plugin</artifactId>
255       </plugin>
256       <plugin>
257         <groupId>org.apache.maven.plugins</groupId>
258         <artifactId>maven-surefire-plugin</artifactId>
259       </plugin>
260       <plugin>
261         <groupId>org.apache.maven.plugins</groupId>
262         <artifactId>maven-failsafe-plugin</artifactId>
263       </plugin>
264     </plugins>
265   </build>
266 </project>