Brian O'Connor
Committed by Gerrit Code Review

Root pom.xml fixes

- Adding jsr305 to remove annotation errors in findbugs/sonarqube
- Moving argLine to properties from maven-surefire-plugin
  to fix sonarqube test coverage
- Updating maven-jar-plugin to 2.6, so that we can add
  skipIfEmpty to avoid generating test jars for pom artifacts

Change-Id: Iea9eff91dab42bfa2a41012908dd563632819741
Showing 1 changed file with 25 additions and 4 deletions
...@@ -83,6 +83,10 @@ ...@@ -83,6 +83,10 @@
83 <onos-maven-plugin.version>1.7-SNAPSHOT</onos-maven-plugin.version> 83 <onos-maven-plugin.version>1.7-SNAPSHOT</onos-maven-plugin.version>
84 <karaf.version>3.0.3</karaf.version> 84 <karaf.version>3.0.3</karaf.version>
85 <jersey.version>1.19</jersey.version> 85 <jersey.version>1.19</jersey.version>
86 + <!-- TODO argLine was originally added maven-surfire-plugin configuration
87 + to fix locale errors for non-US developers. However, it breaks
88 + SonarQube's test coverage, so moving here for now. -->
89 + <argLine>-Duser.language=en -Duser.region=US</argLine>
86 </properties> 90 </properties>
87 91
88 <distributionManagement> 92 <distributionManagement>
...@@ -502,6 +506,12 @@ ...@@ -502,6 +506,12 @@
502 <artifactId>joda-time</artifactId> 506 <artifactId>joda-time</artifactId>
503 <version>2.5</version> 507 <version>2.5</version>
504 </dependency> 508 </dependency>
509 +
510 + <dependency>
511 + <groupId>com.google.code.findbugs</groupId>
512 + <artifactId>jsr305</artifactId>
513 + <version>3.0.0</version>
514 + </dependency>
505 </dependencies> 515 </dependencies>
506 </dependencyManagement> 516 </dependencyManagement>
507 517
...@@ -526,6 +536,15 @@ ...@@ -526,6 +536,15 @@
526 <groupId>org.slf4j</groupId> 536 <groupId>org.slf4j</groupId>
527 <artifactId>slf4j-jdk14</artifactId> 537 <artifactId>slf4j-jdk14</artifactId>
528 </dependency> 538 </dependency>
539 + <!-- TODO sonar-maven-plugin prints the following ERROR many times:
540 + Class not found: javax.annotation.Nullable
541 + The following dependency alleviates this problem, but perhaps
542 + it can be better located in the future. -->
543 + <dependency>
544 + <groupId>com.google.code.findbugs</groupId>
545 + <artifactId>jsr305</artifactId>
546 + <version>3.0.0</version>
547 + </dependency>
529 </dependencies> 548 </dependencies>
530 549
531 <build> 550 <build>
...@@ -546,11 +565,10 @@ ...@@ -546,11 +565,10 @@
546 <plugin> 565 <plugin>
547 <groupId>org.apache.maven.plugins</groupId> 566 <groupId>org.apache.maven.plugins</groupId>
548 <artifactId>maven-surefire-plugin</artifactId> 567 <artifactId>maven-surefire-plugin</artifactId>
568 + <!-- TODO newer version available -->
549 <version>2.18.1</version> 569 <version>2.18.1</version>
550 <configuration> 570 <configuration>
551 - <argLine>-Duser.language=en -Duser.region=US</argLine> 571 + <redirectTestOutputToFile>true</redirectTestOutputToFile>
552 - <redirectTestOutputToFile>true
553 - </redirectTestOutputToFile>
554 <printSummary>true</printSummary> 572 <printSummary>true</printSummary>
555 <excludedGroups>org.onlab.junit.IntegrationTest 573 <excludedGroups>org.onlab.junit.IntegrationTest
556 </excludedGroups> 574 </excludedGroups>
...@@ -574,7 +592,10 @@ ...@@ -574,7 +592,10 @@
574 <plugin> 592 <plugin>
575 <groupId>org.apache.maven.plugins</groupId> 593 <groupId>org.apache.maven.plugins</groupId>
576 <artifactId>maven-jar-plugin</artifactId> 594 <artifactId>maven-jar-plugin</artifactId>
577 - <version>2.3.1</version> 595 + <version>2.6</version>
596 + <configuration>
597 + <skipIfEmpty>true</skipIfEmpty>
598 + </configuration>
578 <executions> 599 <executions>
579 <execution> 600 <execution>
580 <phase>package</phase> 601 <phase>package</phase>
......