You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@drill.apache.org by pa...@apache.org on 2017/06/12 01:27:41 UTC

[3/4] drill git commit: DRILL-5545: Update POM to add support for running findbugs

DRILL-5545: Update POM to add support for running findbugs


Project: http://git-wip-us.apache.org/repos/asf/drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/drill/commit/610602eb
Tree: http://git-wip-us.apache.org/repos/asf/drill/tree/610602eb
Diff: http://git-wip-us.apache.org/repos/asf/drill/diff/610602eb

Branch: refs/heads/master
Commit: 610602eb13fb883acab8bc2b73ab304896b4f0b6
Parents: 5d2eedf
Author: Parth Chandra <pc...@maprtech.com>
Authored: Tue May 23 11:04:15 2017 -0700
Committer: Parth Chandra <pa...@apache.org>
Committed: Sun Jun 11 17:28:53 2017 -0700

----------------------------------------------------------------------
 contrib/storage-hive/hive-exec-shade/pom.xml |  7 ++
 pom.xml                                      | 94 ++++++++++++++++++++++-
 2 files changed, 100 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/drill/blob/610602eb/contrib/storage-hive/hive-exec-shade/pom.xml
----------------------------------------------------------------------
diff --git a/contrib/storage-hive/hive-exec-shade/pom.xml b/contrib/storage-hive/hive-exec-shade/pom.xml
index bec13fd..d9a5761 100644
--- a/contrib/storage-hive/hive-exec-shade/pom.xml
+++ b/contrib/storage-hive/hive-exec-shade/pom.xml
@@ -128,6 +128,13 @@
           </execution>
         </executions>
       </plugin>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>findbugs-maven-plugin</artifactId>
+        <configuration>
+          <skip>true</skip>
+        </configuration>
+      </plugin>
     </plugins>
   </build>
 </project>

http://git-wip-us.apache.org/repos/asf/drill/blob/610602eb/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 071f086..3158b42 100644
--- a/pom.xml
+++ b/pom.xml
@@ -42,6 +42,7 @@
     <mapr.release.version>5.2.1-mapr</mapr.release.version>
     <ojai.version>1.1</ojai.version>
     <kerby.version>1.0.0-RC2</kerby.version>
+    <findbugs.version>3.0.0</findbugs.version>
 
     <!--
       Currently Hive storage plugin only supports Apache Hive 1.2 or vendor specific variants of the
@@ -299,7 +300,6 @@
         </executions>
       </plugin>
 
-
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-resources-plugin</artifactId>
@@ -460,6 +460,16 @@
             <arguments>-Papache-release ${arguments}</arguments>
           </configuration>
         </plugin>
+        <plugin>
+          <groupId>org.codehaus.mojo</groupId>
+          <artifactId>findbugs-maven-plugin</artifactId>
+          <version>${findbugs.version}</version>
+        </plugin>
+        <plugin>
+          <groupId>org.codehaus.mojo</groupId>
+          <artifactId>xml-maven-plugin</artifactId>
+          <version>1.0</version>
+        </plugin>
 
         <!--This plugin's configuration is used to store Eclipse m2e settings
           only. It has no influence on the Maven build itself. -->
@@ -2219,6 +2229,88 @@
         <module>contrib</module>
       </modules>
     </profile>
+    <profile>
+      <id>findbugs</id>
+      <activation>
+        <activeByDefault>false</activeByDefault>
+      </activation>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.codehaus.mojo</groupId>
+            <artifactId>findbugs-maven-plugin</artifactId>
+            <version>3.0.0</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>Normal</effort>
+              <!-- Reports all bugs (other values are medium and max) -->
+              <threshold>Low</threshold>
+              <!-- Build doesn't fail if problems are found -->
+              <failOnError>false</failOnError>
+              <!-- Produces XML report -->
+              <xmlOutput>true</xmlOutput>
+              <!-- Configures the directory in which the XML report is created -->
+              <findbugsXmlOutputDirectory>${project.build.directory}/findbugs
+              </findbugsXmlOutputDirectory>
+            </configuration>
+            <executions>
+              <!--
+                Ensures that FindBugs inspects source code when project is compiled.
+              -->
+              <execution>
+                <phase>verify</phase>
+                <goals>
+                  <goal>check</goal>
+                </goals>
+              </execution>
+            </executions>
+          </plugin>
+          <plugin>
+            <groupId>org.codehaus.mojo</groupId>
+            <artifactId>xml-maven-plugin</artifactId>
+            <version>1.0</version>
+            <executions>
+              <execution>
+                <phase>verify</phase>
+                <goals>
+                  <goal>transform</goal>
+                </goals>
+              </execution>
+            </executions>
+            <configuration>
+              <transformationSets>
+                <transformationSet>
+                  <dir>${project.build.directory}/findbugs</dir>
+                  <outputDir>${project.build.directory}/findbugs</outputDir>
+                  <stylesheet>fancy-hist.xsl</stylesheet>
+                  <!--<stylesheet>default.xsl</stylesheet>-->
+                  <!--<stylesheet>plain.xsl</stylesheet>-->
+                  <!--<stylesheet>fancy.xsl</stylesheet>-->
+                  <!--<stylesheet>summary.xsl</stylesheet>-->
+                  <fileMappers>
+                    <fileMapper
+                            implementation="org.codehaus.plexus.components.io.filemappers.FileExtensionMapper">
+                      <targetExtension>.html</targetExtension>
+                    </fileMapper>
+                  </fileMappers>
+                </transformationSet>
+              </transformationSets>
+            </configuration>
+            <dependencies>
+              <dependency>
+                <groupId>com.google.code.findbugs</groupId>
+                <artifactId>findbugs</artifactId>
+                <version>2.0.0</version>
+              </dependency>
+            </dependencies>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
   </profiles>
   <modules>
     <module>tools</module>