Skip to content

Commit

Permalink
Turn on findbugs and add annotation support
Browse files Browse the repository at this point in the history
It was already there as a plugin. I updated the version and enabled it
to run during builds. Without failing them for now.

Also adds dependencies to the findbugs annotations library, so one can
use things like `@Nullable` and `@Nonnull`.
  • Loading branch information
spacecowboy committed Feb 10, 2016
1 parent 11c05a3 commit 946d455
Show file tree
Hide file tree
Showing 5 changed files with 112 additions and 66 deletions.
10 changes: 10 additions & 0 deletions community/function/pom.xml
Expand Up @@ -70,5 +70,15 @@ the relevant Commercial Agreement.
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
<version>3.0.0</version>
</dependency>
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>annotations</artifactId>
<version>3.0.0</version>
</dependency>
</dependencies>
</project>
10 changes: 10 additions & 0 deletions community/logging/pom.xml
Expand Up @@ -88,5 +88,15 @@ the relevant Commercial Agreement.
<artifactId>commons-lang3</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
<version>3.0.0</version>
</dependency>
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>annotations</artifactId>
<version>3.0.0</version>
</dependency>
</dependencies>
</project>
4 changes: 2 additions & 2 deletions enterprise/pom.xml
Expand Up @@ -76,8 +76,8 @@ terms of the relevant Commercial Agreement.
<build>
<plugins>
<plugin>
<groupId>org.neo4j.build.plugins</groupId>
<artifactId>ease-maven-plugin</artifactId>
<groupId>org.neo4j.build.plugins</groupId>
<artifactId>ease-maven-plugin</artifactId>
<executions>
<execution>
<id>aggregate-artifacts</id>
Expand Down
47 changes: 37 additions & 10 deletions pom.xml
Expand Up @@ -46,6 +46,10 @@

<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
Expand Down Expand Up @@ -99,7 +103,33 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>2.5.2</version>
<version>3.0.3</version>
<configuration>
<!--
Enables analysis which takes more memory but finds more bugs.
If you run out of memory, changes the value of the effort element
to 'Low'.
-->
<effort>Max</effort>
<!-- (values are low, medium, and max) -->
<threshold>Medium</threshold>
<!-- Fail the build or only generate report -->
<failOnError>false</failOnError>
<!-- Produces XML report -->
<xmlOutput>true</xmlOutput>
<includeTests>true</includeTests>
<!-- Configures the directory in which the XML report is created -->
<findbugsXmlOutputDirectory>${project.build.directory}/findbugs</findbugsXmlOutputDirectory>
</configuration>
<executions>
<!-- Run with as part of the build -->
<execution>
<phase>verify</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down Expand Up @@ -312,15 +342,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<configuration>
<xmlOutput>true</xmlOutput>
<findbugsXmlOutput>true</findbugsXmlOutput>
<!-- For jenkins to pick stuff up -->
</configuration>
</plugin>
</plugins>
</build>
</profile>
Expand Down Expand Up @@ -542,6 +563,12 @@
</dependency>

<!-- other -->
<dependency>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>3.0.3</version>
<type>maven-plugin</type>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
Expand Down
107 changes: 53 additions & 54 deletions tools/pom.xml
Expand Up @@ -121,60 +121,59 @@
</dependency>
</dependencies>

<build>
<plugins>
<!-- Disable the ComponentVersion generation -->
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>generate-version</id>
<phase>none</phase>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.3</version>
<executions>
<build>
<plugins>
<!-- Disable the ComponentVersion generation -->
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>generate-version</id>
<phase>none</phase>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.3</version>
<executions>

<execution>
<id>boltalyzer-jar</id>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<finalName>boltalyzer</finalName>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>org.neo4j.tools.boltalyzer.Boltalyzer</mainClass>
</transformer>
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
</transformers>
</configuration>
</execution>

<execution>
<id>txlog-jar</id>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<finalName>checktxlogs</finalName>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>org.neo4j.tools.txlog.CheckTxLogs</mainClass>
</transformer>
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<execution>
<id>boltalyzer-jar</id>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<finalName>boltalyzer</finalName>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>org.neo4j.tools.boltalyzer.Boltalyzer</mainClass>
</transformer>
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
</transformers>
</configuration>
</execution>

<execution>
<id>txlog-jar</id>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<finalName>checktxlogs</finalName>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>org.neo4j.tools.txlog.CheckTxLogs</mainClass>
</transformer>
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

0 comments on commit 946d455

Please sign in to comment.