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