Fix unit test coverage not being reported
[openflowplugin.git] / 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     <parent>
5         <groupId>org.opendaylight.odlparent</groupId>
6         <artifactId>odlparent</artifactId>
7         <version>1.4.2-SNAPSHOT</version>
8         <relativePath></relativePath>
9     </parent>
10     <prerequisites>
11         <maven>3.0</maven>
12     </prerequisites>
13     <groupId>org.opendaylight.openflowplugin</groupId>
14     <artifactId>openflowplugin-parent</artifactId>
15     <version>0.0.3-SNAPSHOT</version>
16     <packaging>pom</packaging>
17
18     <scm>
19       <connection>scm:git:ssh://git.opendaylight.org:29418/openflowplugin.git</connection>
20       <developerConnection>scm:git:ssh://git.opendaylight.org:29418/openflowplugin.git</developerConnection>
21       <url>https://wiki.opendaylight.org/view/OpenDaylight_OpenFlow_Plugin:Main</url>
22       <tag>HEAD</tag>
23     </scm>
24
25     <distributionManagement>
26       <!-- OpenDayLight Released artifact -->
27       <repository>
28         <id>opendaylight-release</id>
29         <url>http://nexus.opendaylight.org/content/repositories/opendaylight.release</url>
30       </repository>
31       <!-- OpenDayLight Snapshot artifact -->
32       <snapshotRepository>
33         <id>opendaylight-snapshot</id>
34         <url>http://nexus.opendaylight.org/content/repositories/opendaylight.snapshot</url>
35       </snapshotRepository>
36       <!-- Site deployment -->
37       <!-- site>
38            <id>website</id>
39            <url>${sitedeploy}</url>
40            </site -->
41     </distributionManagement>
42
43     <properties>
44       <project.build.sourceEncoding>utf-8</project.build.sourceEncoding>
45       <mdsal.version>1.1-SNAPSHOT</mdsal.version>
46       <nexusproxy>http://nexus.opendaylight.org/content</nexusproxy>
47       <openflowjava.version>0.5-SNAPSHOT</openflowjava.version>
48       <controller.model.version>1.1-SNAPSHOT</controller.model.version>
49       <sal.api.version>0.8.1-SNAPSHOT</sal.api.version>
50       <sal.connection.api.version>0.1.2-SNAPSHOT</sal.connection.api.version>
51       <netconf.parent.version>0.2.5-SNAPSHOT</netconf.parent.version>
52       <config.parent.version>0.2.5-SNAPSHOT</config.parent.version>
53       <build.helper.version>1.8</build.helper.version>
54       <xtend.dstdir>src/main/xtend-gen</xtend.dstdir>
55       <jmxGeneratorPath>src/main/yang-gen-config</jmxGeneratorPath>
56       <salGeneratorPath>src/main/yang-gen-sal</salGeneratorPath>
57       <exi.nagasena.version>0000.0002.0038.0</exi.nagasena.version>
58       <controller.distribution.version>0.1.2-SNAPSHOT</controller.distribution.version>
59
60       <!-- Sonar config -->
61       <sonar-jacoco-listeners.version>2.4</sonar-jacoco-listeners.version>
62       <sonar.core.codeCoveragePlugin>jacoco</sonar.core.codeCoveragePlugin>
63       <sonar.jacoco.reportPath>target/code-coverage/jacoco.exec</sonar.jacoco.reportPath>
64       <sonar.jacoco.itReportPath>target/code-coverage/jacoco-it.exec</sonar.jacoco.itReportPath>
65       <sonar.profile>Sonar way with Findbugs</sonar.profile>
66     </properties>
67
68     <dependencyManagement>
69       <dependencies>
70         <dependency>
71           <groupId>org.opendaylight.openflowjava</groupId>
72           <artifactId>openflow-protocol-impl</artifactId>
73           <version>${openflowjava.version}</version>
74         </dependency>
75         <dependency>
76           <groupId>org.opendaylight.openflowjava</groupId>
77           <artifactId>openflow-protocol-api</artifactId>
78           <version>${openflowjava.version}</version>
79         </dependency>
80         <dependency>
81           <groupId>org.opendaylight.openflowjava</groupId>
82           <artifactId>openflow-protocol-spi</artifactId>
83           <version>${openflowjava.version}</version>
84         </dependency>
85         <dependency>
86           <groupId>org.opendaylight.openflowjava</groupId>
87           <artifactId>util</artifactId>
88           <version>${openflowjava.version}</version>
89         </dependency>
90         <dependency>
91           <groupId>org.opendaylight.openflowjava</groupId>
92           <artifactId>simple-client</artifactId>
93           <version>${openflowjava.version}</version>
94         </dependency>
95         <dependency>
96           <groupId>org.opendaylight.controller.model</groupId>
97           <artifactId>model-flow-base</artifactId>
98           <version>${controller.model.version}</version>
99         </dependency>
100         <dependency>
101           <groupId>org.opendaylight.controller.model</groupId>
102           <artifactId>model-flow-management</artifactId>
103           <version>${controller.model.version}</version>
104         </dependency>
105         <dependency>
106           <groupId>org.opendaylight.controller.model</groupId>
107           <artifactId>model-flow-service</artifactId>
108           <version>${controller.model.version}</version>
109         </dependency>
110         <dependency>
111           <groupId>org.opendaylight.controller.model</groupId>
112           <artifactId>model-flow-statistics</artifactId>
113           <version>${controller.model.version}</version>
114         </dependency>
115         <dependency>
116           <groupId>org.opendaylight.controller.model</groupId>
117           <artifactId>model-inventory</artifactId>
118           <version>${controller.model.version}</version>
119         </dependency>
120         <dependency>
121           <groupId>org.opendaylight.controller</groupId>
122           <artifactId>sal-binding-api</artifactId>
123           <version>${controller.model.version}</version>
124         </dependency>
125         <dependency>
126             <groupId>org.opendaylight.controller</groupId>
127             <artifactId>sal</artifactId>
128             <version>${sal.api.version}</version>
129         </dependency>
130         <dependency>
131             <groupId>org.opendaylight.controller</groupId>
132             <artifactId>sal.connection</artifactId>
133             <version>${sal.connection.api.version}</version>
134         </dependency>
135         <dependency>
136             <groupId>org.opendaylight.controller</groupId>
137             <artifactId>sal-common-util</artifactId>
138             <version>${controller.model.version}</version>
139         </dependency>
140
141         <!-- IT -->
142         <dependency>
143             <groupId>org.opendaylight.controller</groupId>
144             <artifactId>config-netconf-connector</artifactId>
145             <version>${netconf.parent.version}</version>
146         </dependency>
147         <dependency>
148             <groupId>org.opendaylight.controller</groupId>
149             <artifactId>sal-binding-it</artifactId>
150             <version>${controller.model.version}</version>
151         </dependency>
152         <dependency>
153             <groupId>org.opendaylight.controller</groupId>
154             <artifactId>sal-binding-broker-impl</artifactId>
155             <version>${controller.model.version}</version>
156         </dependency>
157         <dependency>
158             <groupId>org.opendaylight.controller</groupId>
159             <artifactId>config-manager</artifactId>
160             <version>${config.parent.version}</version>
161         </dependency>
162           <dependency>
163               <groupId>org.opendaylight.controller</groupId>
164               <artifactId>config-api</artifactId>
165               <version>${config.parent.version}</version>
166           </dependency>
167         <dependency>
168             <groupId>org.opendaylight.yangtools.thirdparty</groupId>
169             <artifactId>antlr4-runtime-osgi-nohead</artifactId>
170             <version>4.0</version>
171         </dependency>
172         <dependency>
173           <groupId>org.opendaylight.controller</groupId>
174           <artifactId>logback-config</artifactId>
175           <version>${config.parent.version}</version>
176         </dependency>
177         <dependency>
178           <groupId>org.opendaylight.controller</groupId>
179           <artifactId>config-persister-api</artifactId>
180           <version>${config.parent.version}</version>
181         </dependency>
182         <dependency>
183           <groupId>org.opendaylight.controller</groupId>
184           <artifactId>config-persister-impl</artifactId>
185           <version>${config.parent.version}</version>
186         </dependency>
187         <dependency>
188           <groupId>org.opendaylight.controller</groupId>
189           <artifactId>config-persister-file-xml-adapter</artifactId>
190           <version>${config.parent.version}</version>
191         </dependency>
192         <dependency>
193           <groupId>org.opendaylight.controller</groupId>
194           <artifactId>netconf-monitoring</artifactId>
195           <version>${netconf.parent.version}</version>
196         </dependency>
197         <dependency>
198           <groupId>org.opendaylight.controller</groupId>
199           <artifactId>netconf-client</artifactId>
200           <version>${netconf.parent.version}</version>
201         </dependency>
202         <dependency>
203           <groupId>org.opendaylight.controller</groupId>
204           <artifactId>netconf-impl</artifactId>
205           <version>${netconf.parent.version}</version>
206         </dependency>
207
208         <!-- thirdparty -->
209         <dependency>
210           <groupId>org.openexi</groupId>
211           <artifactId>nagasena</artifactId>
212           <version>${exi.nagasena.version}</version>
213         </dependency>
214         <dependency>
215           <groupId>org.openexi</groupId>
216           <artifactId>nagasena-rta</artifactId>
217           <version>${exi.nagasena.version}</version>
218         </dependency>
219         <dependency>
220           <groupId>org.opendaylight.controller.thirdparty</groupId>
221           <artifactId>ganymed</artifactId>
222           <version>1.1-SNAPSHOT</version>
223         </dependency>
224         <dependency>
225             <groupId>xml-apis</groupId>
226             <artifactId>xml-apis</artifactId>
227             <version>1.4.01</version>
228         </dependency>
229         <dependency>
230             <groupId>org.opendaylight.yangtools.thirdparty</groupId>
231             <artifactId>xtend-lib-osgi</artifactId>
232             <version>2.4.3</version>
233             <scope>test</scope>
234         </dependency>
235       </dependencies>
236     </dependencyManagement>
237
238     <dependencies>
239         <!-- Sonar -->
240         <dependency>
241             <groupId>org.codehaus.sonar-plugins.java</groupId>
242             <artifactId>sonar-jacoco-listeners</artifactId>
243             <version>${sonar-jacoco-listeners.version}</version>
244             <scope>test</scope>
245         </dependency>
246     </dependencies>
247
248     <build>
249         <plugins>
250             <plugin>
251                  <groupId>org.codehaus.mojo</groupId>
252                  <artifactId>build-helper-maven-plugin</artifactId>
253             </plugin>
254             <plugin>
255                 <groupId>org.jacoco</groupId>
256                 <artifactId>jacoco-maven-plugin</artifactId>
257                 <executions>
258                     <execution>
259                         <id>prepare-ut-agent</id>
260                         <phase>process-test-classes</phase>
261                         <goals>
262                             <goal>prepare-agent</goal>
263                         </goals>
264                         <configuration>
265                             <destFile>${sonar.jacoco.reportPath}</destFile>
266                             <propertyName>jacoco.agent.ut.arg</propertyName>
267                         </configuration>
268                     </execution>
269                     <execution>
270                         <id>prepare-it-agent</id>
271                         <phase>pre-integration-test</phase>
272                         <goals>
273                             <goal>prepare-agent</goal>
274                         </goals>
275                         <configuration>
276                             <destFile>${sonar.jacoco.itReportPath}</destFile>
277                             <propertyName>jacoco.agent.it.arg</propertyName>
278                         </configuration>
279                     </execution>
280                 </executions>
281             </plugin>
282         </plugins>
283         <pluginManagement>
284           <plugins>
285             <plugin>
286               <groupId>org.apache.maven.plugins</groupId>
287               <artifactId>maven-compiler-plugin</artifactId>
288               <configuration>
289                 <source>1.7</source>
290                 <target>1.7</target>
291               </configuration>
292             </plugin>
293             <plugin>
294               <groupId>org.ops4j.pax.exam</groupId>
295               <artifactId>maven-paxexam-plugin</artifactId>
296               <version>1.2.4</version>
297             </plugin>
298             <plugin>
299               <groupId>org.eclipse.xtend</groupId>
300               <artifactId>xtend-maven-plugin</artifactId>
301               <version>${xtend.version}</version>
302               <executions>
303                   <execution>
304                       <goals>
305                           <goal>compile</goal>
306                       </goals>
307                       <configuration>
308                           <outputDirectory>${xtend.dstdir}</outputDirectory>
309                       </configuration>
310                   </execution>
311               </executions>
312           </plugin>
313           <plugin>
314               <artifactId>maven-clean-plugin</artifactId>
315               <configuration>
316                   <filesets>
317                       <fileset>
318                           <directory>${xtend.dstdir}</directory>
319                           <includes>
320                               <include>**</include>
321                           </includes>
322                       </fileset>
323                       <fileset>
324                           <directory>${jmxGeneratorPath}</directory>
325                           <includes>
326                               <include>**</include>
327                           </includes>
328                       </fileset>
329                       <fileset>
330                           <directory>${salGeneratorPath}</directory>
331                           <includes>
332                               <include>**</include>
333                           </includes>
334                       </fileset>
335                   </filesets>
336               </configuration>
337             </plugin>
338           <plugin>
339              <groupId>org.codehaus.mojo</groupId>
340              <artifactId>build-helper-maven-plugin</artifactId>
341              <version>${build.helper.version}</version>
342              <executions>
343                 <execution>
344                    <id>add-source</id>
345                    <phase>generate-sources</phase>
346                    <goals>
347                       <goal>add-source</goal>
348                    </goals>
349                    <configuration>
350                       <sources>
351                          <source>${jmxGeneratorPath}</source>
352                          <source>${salGeneratorPath}</source>
353                          <source>${xtend.dstdir}</source>
354                       </sources>
355                    </configuration>
356                 </execution>
357              </executions>
358             </plugin>
359             <plugin>
360               <groupId>org.opendaylight.yangtools</groupId>
361               <artifactId>yang-maven-plugin</artifactId>
362               <version>0.6.2-SNAPSHOT</version>
363             </plugin>
364             <plugin>
365               <groupId>org.apache.felix</groupId>
366               <artifactId>maven-bundle-plugin</artifactId>
367               <version>${maven.bundle.version}</version>
368               <extensions>true</extensions>
369               <configuration>
370                 <instructions>
371                   <Bundle-Name>${project.groupId}.${project.artifactId}</Bundle-Name>
372                 </instructions>
373                 <manifestLocation>${project.build.directory}/META-INF</manifestLocation>
374               </configuration>
375             </plugin>
376             <!-- Ignore/Execute plugin execution -->
377             <plugin>
378               <groupId>org.eclipse.m2e</groupId>
379               <artifactId>lifecycle-mapping</artifactId>
380               <version>1.0.0</version>
381               <configuration>
382                 <lifecycleMappingMetadata>
383                   <pluginExecutions>
384                     <pluginExecution>
385                       <pluginExecutionFilter>
386                         <groupId>org.codehaus.mojo</groupId>
387                         <artifactId>properties-maven-plugin</artifactId>
388                         <versionRange>[0.0,)</versionRange>
389                         <goals>
390                           <goal>set-system-properties</goal>
391                         </goals>
392                       </pluginExecutionFilter>
393                       <action>
394                         <ignore></ignore>
395                       </action>
396                     </pluginExecution>
397                     <pluginExecution>
398                       <pluginExecutionFilter>
399                         <groupId>org.codehaus.enunciate</groupId>
400                         <artifactId>maven-enunciate-plugin</artifactId>
401                         <versionRange>[0.0,)</versionRange>
402                         <goals>
403                           <goal>docs</goal>
404                         </goals>
405                       </pluginExecutionFilter>
406                       <action>
407                         <ignore></ignore>
408                       </action>
409                     </pluginExecution>
410                     <pluginExecution>
411                       <pluginExecutionFilter>
412                         <groupId>org.jacoco</groupId>
413                         <artifactId>jacoco-maven-plugin</artifactId>
414                         <versionRange>[0.0,)</versionRange>
415                         <goals>
416                           <goal>prepare-agent</goal>
417                           <goal>pre-test</goal>
418                           <goal>post-test</goal>
419                         </goals>
420                       </pluginExecutionFilter>
421                       <action>
422                         <ignore></ignore>
423                       </action>
424                     </pluginExecution>
425                     <pluginExecution>
426                       <pluginExecutionFilter>
427                         <groupId>org.ops4j.pax.exam</groupId>
428                         <artifactId>maven-paxexam-plugin</artifactId>
429                         <versionRange>[1.2.4,)</versionRange>
430                         <goals>
431                           <goal>generate-depends-file</goal>
432                         </goals>
433                       </pluginExecutionFilter>
434                       <action>
435                         <execute>
436                           <runOnIncremental>false</runOnIncremental>
437                         </execute>
438                       </action>
439                     </pluginExecution>
440                     <pluginExecution>
441                       <pluginExecutionFilter>
442                         <groupId>org.apache.maven.plugins</groupId>
443                         <artifactId>maven-checkstyle-plugin</artifactId>
444                         <versionRange>[2.0,)</versionRange>
445                         <goals>
446                           <goal>check</goal>
447                         </goals>
448                       </pluginExecutionFilter>
449                       <action>
450                         <ignore></ignore>
451                       </action>
452                     </pluginExecution>
453                     <pluginExecution>
454                       <pluginExecutionFilter>
455                         <groupId>org.opendaylight.yangtools</groupId>
456                         <artifactId>yang-maven-plugin</artifactId>
457                         <versionRange>[0.5,)</versionRange>
458                         <goals>
459                           <goal>generate-sources</goal>
460                         </goals>
461                       </pluginExecutionFilter>
462                       <action>
463                         <execute></execute>
464                       </action>
465                     </pluginExecution>
466                     <pluginExecution>
467                       <pluginExecutionFilter>
468                         <groupId>org.codehaus.groovy.maven</groupId>
469                         <artifactId>gmaven-plugin</artifactId>
470                         <versionRange>1.0</versionRange>
471                         <goals>
472                           <goal>execute</goal>
473                         </goals>
474                       </pluginExecutionFilter>
475                       <action>
476                         <ignore></ignore>
477                       </action>
478                     </pluginExecution>
479                     <pluginExecution>
480                       <pluginExecutionFilter>
481                         <groupId>org.apache.maven.plugins</groupId>
482                         <artifactId>maven-enforcer-plugin</artifactId>
483                         <versionRange>${enforcer.version}</versionRange>
484                         <goals>
485                           <goal>enforce</goal>
486                         </goals>
487                       </pluginExecutionFilter>
488                       <action>
489                         <ignore></ignore>
490                       </action>
491                     </pluginExecution>
492                   </pluginExecutions>
493                 </lifecycleMappingMetadata>
494               </configuration>
495             </plugin>
496             <plugin>
497               <groupId>org.apache.maven.plugins</groupId>
498               <artifactId>maven-failsafe-plugin</artifactId>
499               <configuration>
500                 <!-- Specific to generate mapping between tests and covered code -->
501                 <argLine>${jacoco.agent.it.arg}</argLine>
502                 <properties>
503                   <property>
504                     <name>listener</name>
505                     <value>org.sonar.java.jacoco.JUnitListener</value>
506                   </property>
507                 </properties>
508                 <!-- Let's put failsafe reports with surefire to have access to tests failures/success reports in sonar -->
509                 <reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
510               </configuration>
511             </plugin>
512             <plugin>
513               <groupId>org.apache.maven.plugins</groupId>
514               <artifactId>maven-surefire-plugin</artifactId>
515               <configuration>
516                 <!-- Specific to generate mapping between tests and covered code -->
517                 <argLine>${jacoco.agent.ut.arg}</argLine>
518                 <properties>
519                   <property>
520                     <name>listener</name>
521                     <value>org.sonar.java.jacoco.JUnitListener</value>
522                   </property>
523                 </properties>
524               </configuration>
525             </plugin>
526           </plugins>
527         </pluginManagement>
528     </build>
529
530     <profiles>
531       <profile>
532         <id>findbugsReport</id>
533         <reporting>
534           <plugins>
535             <plugin>
536               <groupId>org.apache.maven.plugins</groupId>
537               <artifactId>maven-project-info-reports-plugin</artifactId>
538               <version>2.7</version>
539               <configuration>
540                 <dependencyDetailsEnabled>false</dependencyDetailsEnabled>
541                 <dependencyLocationsEnabled>false</dependencyLocationsEnabled>
542               </configuration>
543               <reportSets>
544                 <reportSet>
545                   <reports>
546                     <report>index</report>
547                     <report>project-team</report>
548                     <report>license</report>
549                     <report>mailing-list</report>
550                     <report>plugin-management</report>
551                     <report>cim</report>
552                     <report>issue-tracking</report>
553                     <report>scm</report>
554                     <report>summary</report>
555                   </reports>
556                 </reportSet>
557               </reportSets>
558             </plugin>
559             <plugin>
560               <groupId>org.codehaus.mojo</groupId>
561               <artifactId>findbugs-maven-plugin</artifactId>
562               <version>2.5.2</version>
563             </plugin>
564             <plugin>
565               <groupId>org.apache.maven.plugins</groupId>
566               <artifactId>maven-pmd-plugin</artifactId>
567               <version>3.0.1</version>
568             </plugin>
569             <plugin>
570               <groupId>org.apache.maven.plugins</groupId>
571               <artifactId>maven-jxr-plugin</artifactId>
572               <version>2.3</version>
573             </plugin>
574           </plugins>
575         </reporting>
576       </profile>
577     </profiles>
578
579     <repositories>
580       <repository>
581         <id>opendaylight-snapshot</id>
582         <name>opendaylight-snapshot</name>
583         <url>http://nexus.opendaylight.org/content/repositories/opendaylight.snapshot</url>
584         <releases>
585           <enabled>false</enabled>
586         </releases>
587       </repository>
588       <repository>
589         <id>public</id>
590         <name>public</name>
591         <url>http://nexus.opendaylight.org/content/groups/public</url>
592         <snapshots>
593           <enabled>false</enabled>
594         </snapshots>
595       </repository>
596
597     </repositories>
598
599     <pluginRepositories>
600       <pluginRepository>
601         <id>opendaylight-central</id>
602         <name>opendaylight-central</name>
603         <url>http://nexus.opendaylight.org/content/repositories/public</url>
604         <snapshots>
605           <enabled>false</enabled>
606         </snapshots>
607       </pluginRepository>
608       <pluginRepository>
609         <id>opendaylight-snapshot</id>
610         <name>central2</name>
611         <url>http://nexus.opendaylight.org/content/repositories/opendaylight.snapshot</url>
612         <releases>
613           <enabled>false</enabled>
614         </releases>
615       </pluginRepository>
616     </pluginRepositories>
617
618     <modules>
619       <module>openflowplugin-api</module>
620       <module>openflowplugin</module>
621       <module>distribution/base</module>
622       <module>distribution/cbench</module>            
623       <module>openflowplugin-controller-config</module>
624       <module>openflowplugin-it</module>
625       <module>test-provider</module>
626       <module>drop-test</module>
627       <module>features</module>
628       <module>samples/sample-consumer</module>
629       <module>samples/learning-switch</module>
630     </modules>
631 </project>