Include PAX Exam Code Coverage in Sonar
[ovsdb.git] / commons / parent / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <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">
3   <modelVersion>4.0.0</modelVersion>
4
5   <parent>
6     <groupId>org.opendaylight.odlparent</groupId>
7     <artifactId>odlparent</artifactId>
8     <version>1.4.2-SNAPSHOT</version>
9     <relativePath></relativePath>
10   </parent>
11
12   <groupId>org.opendaylight.ovsdb</groupId>
13   <artifactId>commons</artifactId>
14   <name>OVSDB Parent POM</name>
15   <version>1.2.0-SNAPSHOT</version>
16   <packaging>pom</packaging>
17   <prerequisites>
18     <maven>3.0</maven>
19   </prerequisites>
20
21   <properties>
22     <!-- ODL repository / plugin repository -->
23     <nexusproxy>http://nexus.opendaylight.org/content</nexusproxy>
24     <!-- Surefire/Failsafe Arguments -->
25     <argLine>-Xmx1024m -XX:MaxPermSize=256m</argLine>
26     <!-- OVSB Component Versions -->
27     <ovsdb.library.version>1.0.0-SNAPSHOT</ovsdb.library.version>
28     <ovsdb.plugin.version>1.0.0-SNAPSHOT</ovsdb.plugin.version>
29     <openstack.netvirt.version>1.0.0-SNAPSHOT</openstack.netvirt.version>
30     <openstack.netvirt.providers.version>1.0.0-SNAPSHOT</openstack.netvirt.providers.version>
31     <ovsdb.northbound.version>0.6.0-SNAPSHOT</ovsdb.northbound.version>
32     <schema.openvswitch.version>1.0.0-SNAPSHOT</schema.openvswitch.version>
33     <schema.hardwarevtep.version>1.0.0-SNAPSHOT</schema.hardwarevtep.version>
34     <!-- Skip Coverage and IT by default -->
35     <skip.coverage>true</skip.coverage>
36     <skip.integrationtest>true</skip.integrationtest>
37     <!-- The directory where maven was executed -->
38     <root.directory>${env.PWD}</root.directory>
39     <!-- UT reports are per-module -->
40     <sonar.jacoco.reportPath>target/code-coverage/jacoco.exec</sonar.jacoco.reportPath>
41     <!-- IT report is aggregated to enable PAX Exam coverage to be logged -->
42     <sonar.jacoco.itReportPath>${root.directory}/target/code-coverage/jacoco-it.exec</sonar.jacoco.itReportPath>
43     <sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>
44     <!-- Override the JaCoCo version in ODL Parent -->
45     <jacoco.version>0.6.4.201312101107</jacoco.version>
46     <!-- ODL Dependency Versions -->
47     <containermanager.version>0.5.2-SNAPSHOT</containermanager.version>
48     <forwardingrulesmanager.version>0.6.0-SNAPSHOT</forwardingrulesmanager.version>
49     <networkconfig.neutron.version>0.4.2-SNAPSHOT</networkconfig.neutron.version>
50     <clustering.services.version>0.5.1-SNAPSHOT</clustering.services.version>
51     <sal.version>0.8.1-SNAPSHOT</sal.version>
52     <sal.connection.version>0.1.2-SNAPSHOT</sal.connection.version>
53     <sal.networkconfiguration.version>0.0.3-SNAPSHOT</sal.networkconfiguration.version>
54     <mdsal.version>1.1-SNAPSHOT</mdsal.version>
55     <switchmanager.api.version>0.7.1-SNAPSHOT</switchmanager.api.version>
56     <yangtools.version>0.6.2-SNAPSHOT</yangtools.version>
57     <northbound.commons.version>0.4.2-SNAPSHOT</northbound.commons.version>
58     <checkstyle.rules.version>0.0.3-SNAPSHOT</checkstyle.rules.version>
59     <!-- 3rd Pary Dependency Versions -->
60     <commons.collection.version>1.0</commons.collection.version>
61     <portlet.version>2.0</portlet.version>
62     <powermock.version>1.5.2</powermock.version>
63     <httpcomponents.version>4.2.1</httpcomponents.version>
64   </properties>
65
66   <dependencyManagement>
67     <dependencies>
68       <dependency>
69         <groupId>commons-collections</groupId>
70         <artifactId>commons-collections</artifactId>
71         <version>${commons.collection.version}</version>
72       </dependency>
73       <dependency>
74         <groupId>io.netty</groupId>
75         <artifactId>netty-all</artifactId>
76         <version>${netty.version}</version>
77       </dependency>
78       <dependency>
79         <groupId>javax.portlet</groupId>
80         <artifactId>portlet-api</artifactId>
81         <version>${portlet.version}</version>
82       </dependency>
83       <dependency>
84         <groupId>org.apache.httpcomponents</groupId>
85         <artifactId>httpcore-nio</artifactId>
86         <version>${httpcomponents.version}</version>
87       </dependency>
88       <dependency>
89         <groupId>org.powermock</groupId>
90         <artifactId>powermock-module-junit4</artifactId>
91         <version>${powermock.version}</version>
92       </dependency>
93       <dependency>
94         <groupId>org.powermock</groupId>
95         <artifactId>powermock-api-mockito</artifactId>
96         <version>${powermock.version}</version>
97       </dependency>
98       <dependency>
99         <groupId>org.opendaylight.controller</groupId>
100         <artifactId>clustering.services</artifactId>
101         <version>${clustering.services.version}</version>
102       </dependency>
103       <dependency>
104         <groupId>org.opendaylight.controller</groupId>
105         <artifactId>sal</artifactId>
106         <version>${sal.version}</version>
107       </dependency>
108       <dependency>
109         <groupId>org.opendaylight.controller</groupId>
110         <artifactId>sal.connection</artifactId>
111         <version>${sal.connection.version}</version>
112       </dependency>
113       <dependency>
114         <groupId>org.opendaylight.controller</groupId>
115         <artifactId>sal.networkconfiguration</artifactId>
116         <version>${sal.networkconfiguration.version}</version>
117       </dependency>
118       <dependency>
119         <groupId>org.opendaylight.controller</groupId>
120         <artifactId>containermanager</artifactId>
121         <version>${containermanager.version}</version>
122       </dependency>
123       <dependency>
124         <groupId>org.opendaylight.controller</groupId>
125         <artifactId>forwardingrulesmanager</artifactId>
126         <version>${forwardingrulesmanager.version}</version>
127       </dependency>
128       <dependency>
129         <groupId>org.opendaylight.controller</groupId>
130         <artifactId>networkconfig.neutron</artifactId>
131         <version>${networkconfig.neutron.version}</version>
132       </dependency>
133       <dependency>
134         <groupId>org.opendaylight.controller</groupId>
135         <artifactId>sal-binding-api</artifactId>
136         <version>${mdsal.version}</version>
137       </dependency>
138       <dependency>
139         <groupId>org.opendaylight.controller</groupId>
140         <artifactId>sal-common-util</artifactId>
141         <version>${mdsal.version}</version>
142       </dependency>
143       <dependency>
144         <groupId>org.opendaylight.controller</groupId>
145         <artifactId>switchmanager</artifactId>
146         <version>${switchmanager.api.version}</version>
147       </dependency>
148       <dependency>
149         <groupId>org.opendaylight.controller.model</groupId>
150         <artifactId>model-flow-base</artifactId>
151         <version>${mdsal.version}</version>
152       </dependency>
153       <dependency>
154         <groupId>org.opendaylight.controller.model</groupId>
155         <artifactId>model-flow-management</artifactId>
156         <version>${mdsal.version}</version>
157       </dependency>
158       <dependency>
159         <groupId>org.opendaylight.controller.model</groupId>
160         <artifactId>model-flow-service</artifactId>
161         <version>${mdsal.version}</version>
162       </dependency>
163       <dependency>
164         <groupId>org.opendaylight.controller.model</groupId>
165         <artifactId>model-inventory</artifactId>
166         <version>${mdsal.version}</version>
167       </dependency>
168       <dependency>
169         <groupId>org.opendaylight.yangtools</groupId>
170         <artifactId>yang-binding</artifactId>
171         <version>${yangtools.version}</version>
172       </dependency>
173       <dependency>
174         <groupId>org.opendaylight.controller</groupId>
175         <artifactId>commons.northbound</artifactId>
176         <version>${northbound.commons.version}</version>
177       </dependency>
178       <dependency>
179         <groupId>org.opendaylight.ovsdb</groupId>
180         <artifactId>library</artifactId>
181         <version>${ovsdb.library.version}</version>
182       </dependency>
183       <dependency>
184         <groupId>org.opendaylight.ovsdb</groupId>
185         <artifactId>plugin</artifactId>
186         <version>${ovsdb.plugin.version}</version>
187       </dependency>
188       <dependency>
189         <groupId>org.opendaylight.ovsdb</groupId>
190         <artifactId>openstack.net-virt</artifactId>
191         <version>${openstack.netvirt.version}</version>
192       </dependency>
193       <dependency>
194         <groupId>org.opendaylight.ovsdb</groupId>
195         <artifactId>openstack.net-virt-providers</artifactId>
196         <version>${openstack.netvirt.providers.version}</version>
197       </dependency>
198       <dependency>
199         <groupId>org.opendaylight.ovsdb</groupId>
200         <artifactId>northbound</artifactId>
201         <version>${ovsdb.northbound.version}</version>
202       </dependency>
203       <dependency>
204         <groupId>org.opendaylight.ovsdb</groupId>
205         <artifactId>schema.hardwarevtep</artifactId>
206         <version>${schema.hardwarevtep.version}</version>
207       </dependency>
208       <dependency>
209         <groupId>org.opendaylight.ovsdb</groupId>
210         <artifactId>schema.openvswitch</artifactId>
211         <version>${schema.openvswitch.version}</version>
212       </dependency>
213     </dependencies>
214   </dependencyManagement>
215
216   <build>
217     <pluginManagement>
218       <plugins>
219         <plugin>
220           <groupId>org.apache.maven.plugins</groupId>
221           <artifactId>maven-compiler-plugin</artifactId>
222           <configuration>
223             <source>${java.version.source}</source>
224             <target>${java.version.target}</target>
225             <testSource>${java.version.source}</testSource>
226             <testTarget>${java.version.target}</testTarget>
227           </configuration>
228         </plugin>
229         <!-- This configuration should move to ODL-Parent -->
230         <plugin>
231           <groupId>org.apache.maven.plugins</groupId>
232           <artifactId>maven-checkstyle-plugin</artifactId>
233           <version>${checkstyle.version}</version>
234           <configuration>
235             <failsOnError>true</failsOnError>
236             <configLocation>controller/checkstyle.xml</configLocation>
237             <consoleOutput>true</consoleOutput>
238             <includeTestSourceDirectory>true</includeTestSourceDirectory>
239             <sourceDirectory>${project.basedir}</sourceDirectory>
240             <includes>**\/*.java,**\/*.xml,**\/*.ini,**\/*.sh,**\/*.bat</includes>
241             <excludes>**\/target\/,**\/bin\/,**\/target-ide\/,\/,**\/xtend-gen\/</excludes>
242           </configuration>
243           <dependencies>
244             <dependency>
245               <groupId>org.opendaylight.controller</groupId>
246               <artifactId>checkstyle</artifactId>
247               <version>0.0.3-SNAPSHOT</version>
248             </dependency>
249           </dependencies>
250           <executions>
251             <execution>
252               <id>check</id>
253               <goals>
254                 <goal>check</goal>
255               </goals>
256               <phase>process-sources</phase>
257             </execution>
258           </executions>
259         </plugin>
260         <plugin>
261           <groupId>org.jacoco</groupId>
262           <artifactId>jacoco-maven-plugin</artifactId>
263           <version>${jacoco.version}</version>
264           <configuration>
265             <skip>${skip.coverage}</skip>
266           </configuration>
267           <executions>
268             <execution>
269               <id>pre-unit-test</id>
270               <goals>
271                 <goal>prepare-agent</goal>
272               </goals>
273               <configuration>
274                 <destFile>${sonar.jacoco.reportPath}</destFile>
275               </configuration>
276             </execution>
277             <execution>
278               <id>pre-integration-test</id>
279               <goals>
280                 <goal>prepare-agent-integration</goal>
281               </goals>
282               <configuration>
283                 <destFile>${sonar.jacoco.itReportPath}</destFile>
284                 <append>true</append>
285                 <skip>${skip.integrationtest}</skip>
286               </configuration>
287             </execution>
288             <execution>
289               <id>post-unit-test</id>
290               <goals>
291                 <goal>report</goal>
292               </goals>
293               <configuration>
294                 <dataFile>${sonar.jacoco.reportPath}</dataFile>
295               </configuration>
296             </execution>
297             <execution>
298               <id>post-integration-test</id>
299               <goals>
300                 <goal>report-integration</goal>
301               </goals>
302               <configuration>
303                 <dataFile>${sonar.jacoco.itReportPath}</dataFile>
304                 <skip>${skip.integrationtest}</skip>
305               </configuration>
306             </execution>
307           </executions>
308         </plugin>
309         <plugin>
310           <groupId>org.apache.maven.plugins</groupId>
311           <artifactId>maven-surefire-plugin</artifactId>
312           <version>${maven.surefire.version}</version>
313         </plugin>
314         <plugin>
315           <groupId>org.apache.maven.plugins</groupId>
316           <artifactId>maven-failsafe-plugin</artifactId>
317           <version>${failsafe.version}</version>
318           <executions>
319             <execution>
320               <id>failsafe-integration-tests</id>
321               <goals>
322                 <goal>integration-test</goal>
323                 <goal>verify</goal>
324               </goals>
325               <configuration>
326                 <reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
327                 <skipTests>${skip.integrationtest}</skipTests>
328               </configuration>
329             </execution>
330           </executions>
331         </plugin>
332       </plugins>
333     </pluginManagement>
334   </build>
335   <url>https://wiki.opendaylight.org/view/OVSDB_Integration:Main</url>
336   <scm>
337     <connection>scm:git:ssh://git.opendaylight.org:29418/ovsdb.git</connection>
338     <developerConnection>scm:git:ssh://git.opendaylight.org:29418/ovsdb.git</developerConnection>
339     <tag>HEAD</tag>
340     <url>https://wiki.opendaylight.org/view/OVSDB_Integration:Main</url>
341   </scm>
342
343   <repositories>
344     <!-- Opendaylight public group -->
345     <repository>
346       <id>opendaylight-public</id>
347       <name>opendaylight-public</name>
348       <url>${nexusproxy}/groups/public/</url>
349       <snapshots>
350         <enabled>false</enabled>
351       </snapshots>
352       <releases>
353         <enabled>true</enabled>
354         <updatePolicy>never</updatePolicy>
355       </releases>
356     </repository>
357     <!-- OpenDayLight Released artifact -->
358     <repository>
359       <id>opendaylight-release</id>
360       <name>opendaylight-release</name>
361       <url>http://nexus.opendaylight.org/content/repositories/opendaylight.release/</url>
362       <snapshots>
363         <enabled>false</enabled>
364       </snapshots>
365       <releases>
366         <enabled>true</enabled>
367       </releases>
368     </repository>
369     <!-- OpenDayLight Snapshot artifact -->
370     <repository>
371       <id>opendaylight-snapshot</id>
372       <name>opendaylight-snapshot</name>
373       <url>http://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/</url>
374       <snapshots>
375         <enabled>true</enabled>
376       </snapshots>
377       <releases>
378         <enabled>false</enabled>
379       </releases>
380     </repository>
381   </repositories>
382
383   <pluginRepositories>
384     <!-- Opendaylight public group -->
385     <pluginRepository>
386       <id>opendaylight-public</id>
387       <name>opendaylight-public</name>
388       <url>${nexusproxy}/groups/public/</url>
389       <snapshots>
390         <enabled>false</enabled>
391       </snapshots>
392       <releases>
393         <enabled>true</enabled>
394         <updatePolicy>never</updatePolicy>
395       </releases>
396     </pluginRepository>
397     <!-- OpenDayLight Released artifact -->
398     <pluginRepository>
399       <id>opendaylight-release</id>
400       <name>opendaylight-release</name>
401       <url>http://nexus.opendaylight.org/content/repositories/opendaylight.release/</url>
402       <snapshots>
403         <enabled>false</enabled>
404       </snapshots>
405       <releases>
406         <enabled>true</enabled>
407       </releases>
408     </pluginRepository>
409     <!-- OpenDayLight Snapshot artifact -->
410     <pluginRepository>
411       <id>opendaylight-snapshot</id>
412       <name>opendaylight-snapshot</name>
413       <url>http://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/</url>
414       <snapshots>
415         <enabled>true</enabled>
416       </snapshots>
417       <releases>
418         <enabled>false</enabled>
419       </releases>
420     </pluginRepository>
421   </pluginRepositories>
422
423   <profiles>
424     <profile>
425       <id>integrationtest</id>
426       <activation>
427         <activeByDefault>false</activeByDefault>
428       </activation>
429       <properties>
430         <skip.integrationtest>false</skip.integrationtest>
431       </properties>
432     </profile>
433     <profile>
434       <id>coverage</id>
435       <activation>
436         <activeByDefault>false</activeByDefault>
437       </activation>
438       <properties>
439         <skip.coverage>false</skip.coverage>
440       </properties>
441     </profile>
442     <profile>
443       <id>jenkins</id>
444       <activation>
445         <activeByDefault>false</activeByDefault>
446       </activation>
447       <properties>
448         <root.directory>${env.WORKSPACE}</root.directory>
449       </properties>
450     </profile>
451   </profiles>
452 </project>