You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@orc.apache.org by om...@apache.org on 2017/10/24 18:37:13 UTC

orc git commit: ORC-259. Make RAT and findbugs optional during the build.

Repository: orc
Updated Branches:
  refs/heads/master 62d84f198 -> ec905da4d


ORC-259. Make RAT and findbugs optional during the build.

Fixes #182

Signed-off-by: Owen O'Malley <om...@apache.org>


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

Branch: refs/heads/master
Commit: ec905da4debbf14de47d54d3ec02e9273dcb9bde
Parents: 62d84f1
Author: Owen O'Malley <om...@apache.org>
Authored: Tue Oct 24 10:02:40 2017 -0700
Committer: Owen O'Malley <om...@apache.org>
Committed: Tue Oct 24 10:04:11 2017 -0700

----------------------------------------------------------------------
 .travis.yml         |   2 +-
 CMakeLists.txt      |   4 ++
 java/CMakeLists.txt |   8 +++-
 java/pom.xml        | 108 +++++++++++++++++++++++++++--------------------
 4 files changed, 74 insertions(+), 48 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/orc/blob/ec905da4/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
index 86bd67f..7b5ddcb 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -29,5 +29,5 @@ env:
 script:
   - mkdir build
   - cd build
-  - cmake ..
+  - cmake -DANALYZE_JAVA=ON ..
   - make package test-out
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/orc/blob/ec905da4/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1dc91e4..0441855 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -30,6 +30,10 @@ option (BUILD_JAVA
     "Include ORC Java library in the build process"
      ON)
 
+option (ANALYZE_JAVA
+    "Run static analysis of the Java"
+     OFF)
+
 option (BUILD_LIBHDFSPP
     "Include LIBHDFSPP library in the build process"
      ON)

http://git-wip-us.apache.org/repos/asf/orc/blob/ec905da4/java/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/java/CMakeLists.txt b/java/CMakeLists.txt
index 5ac7664..6845ae1 100644
--- a/java/CMakeLists.txt
+++ b/java/CMakeLists.txt
@@ -22,9 +22,15 @@ set(ORC_JARS
   ${CMAKE_CURRENT_BINARY_DIR}/tools/orc-tools-${ORC_VERSION}-uber.jar
 )
 
+if (ANALYZE_JAVA)
+  set(JAVA_PROFILE "-Pcmake,analyze")
+else()
+  set(JAVA_PROFILE "-Pcmake")
+endif()
+
 add_custom_command(
    OUTPUT ${ORC_JARS}
-   COMMAND mvn -Pcmake -Dbuild.dir=${CMAKE_CURRENT_BINARY_DIR} -DskipTests package
+   COMMAND mvn ${JAVA_PROFILE} -Dbuild.dir=${CMAKE_CURRENT_BINARY_DIR} -DskipTests package
    WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
    COMMENT "Build the java directory"
    VERBATIM)

http://git-wip-us.apache.org/repos/asf/orc/blob/ec905da4/java/pom.xml
----------------------------------------------------------------------
diff --git a/java/pom.xml b/java/pom.xml
index a9b5def..ee77f54 100644
--- a/java/pom.xml
+++ b/java/pom.xml
@@ -170,57 +170,57 @@
         <artifactId>maven-project-info-reports-plugin</artifactId>
         <version>2.9</version>
       </plugin>
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>findbugs-maven-plugin</artifactId>
-        <version>3.0.3</version>
-        <configuration>
-          <effort>Max</effort>
-          <excludeFilterFile>${basedir}/src/findbugs/exclude.xml</excludeFilterFile>
-          <xmlOutput>true</xmlOutput>
-          <findbugsXmlOutputDirectory>${project.build.directory}/findbugs</findbugsXmlOutputDirectory>
-        </configuration>
-        <executions>
-          <execution>
-            <id>analyze-compile</id>
-            <phase>compile</phase>
-            <goals>
-              <goal>check</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.rat</groupId>
-        <artifactId>apache-rat-plugin</artifactId>
-        <version>0.10</version>
-        <executions>
-          <execution>
-            <phase>package</phase>
-            <goals>
-              <goal>check</goal>
-            </goals>
-          </execution>
-        </executions>
-        <configuration>
-          <excludeSubProject>false</excludeSubProject>
-          <excludes>
-            <exclude>**/data/**</exclude>
-            <exclude>**/*.json</exclude>
-            <exclude>**/*.json.gz</exclude>
-            <exclude>**/*.orc</exclude>
-            <exclude>**/*.out</exclude>
-            <exclude>**/*.schema</exclude>
-            <exclude>**/target/**</exclude>
-            <exclude>.idea/**</exclude>
-          </excludes>
-        </configuration>
-      </plugin>
     </plugins>
     <pluginManagement>
       <plugins>
         <plugin>
           <groupId>org.codehaus.mojo</groupId>
+          <artifactId>findbugs-maven-plugin</artifactId>
+          <version>3.0.3</version>
+          <configuration>
+            <effort>Max</effort>
+            <excludeFilterFile>${basedir}/src/findbugs/exclude.xml</excludeFilterFile>
+            <xmlOutput>true</xmlOutput>
+            <findbugsXmlOutputDirectory>${project.build.directory}/findbugs</findbugsXmlOutputDirectory>
+          </configuration>
+          <executions>
+            <execution>
+              <id>analyze-compile</id>
+              <phase>compile</phase>
+              <goals>
+                <goal>check</goal>
+              </goals>
+            </execution>
+          </executions>
+        </plugin>
+        <plugin>
+          <groupId>org.apache.rat</groupId>
+          <artifactId>apache-rat-plugin</artifactId>
+          <version>0.10</version>
+          <executions>
+            <execution>
+              <phase>package</phase>
+              <goals>
+                <goal>check</goal>
+              </goals>
+            </execution>
+          </executions>
+          <configuration>
+            <excludeSubProject>false</excludeSubProject>
+            <excludes>
+              <exclude>**/data/**</exclude>
+              <exclude>**/*.json</exclude>
+              <exclude>**/*.json.gz</exclude>
+              <exclude>**/*.orc</exclude>
+              <exclude>**/*.out</exclude>
+              <exclude>**/*.schema</exclude>
+              <exclude>**/target/**</exclude>
+              <exclude>.idea/**</exclude>
+            </excludes>
+          </configuration>
+        </plugin>
+        <plugin>
+          <groupId>org.codehaus.mojo</groupId>
           <artifactId>build-helper-maven-plugin</artifactId>
           <version>1.10</version>
           <executions>
@@ -318,6 +318,22 @@
         <directory>${build.dir}</directory>
       </build>
     </profile>
+    <profile>
+      <!-- a profile to check the source for common problems -->
+      <id>analyze</id>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.codehaus.mojo</groupId>
+            <artifactId>findbugs-maven-plugin</artifactId>
+	  </plugin>
+          <plugin>
+            <groupId>org.apache.rat</groupId>
+            <artifactId>apache-rat-plugin</artifactId>
+	  </plugin>
+	</plugins>
+      </build>
+    </profile>
   </profiles>
 
   <dependencyManagement>