Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-12761

incremental maven build is not really incremental

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.7.2
    • Fix Version/s: 2.8.0, 2.7.3, 3.0.0-alpha1
    • Component/s: build
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      For any version that uses v.3.1 of the maven-compiler-plugin, the incremental maven build is basically broken. For most of the modules, an incremental build (mvn install -DskipTests on an already built directory for example) rebuilds the whole module again:

      [INFO] ------------------------------------------------------------------------
      [INFO] Building Apache Hadoop Common 3.0.0-SNAPSHOT
      [INFO] ------------------------------------------------------------------------
      [INFO] 
      [INFO] --- maven-antrun-plugin:1.7:run (create-testdirs) @ hadoop-common ---
      [INFO] Executing tasks
      
      main:
      [INFO] Executed tasks
      [INFO] 
      [INFO] --- hadoop-maven-plugins:3.0.0-SNAPSHOT:protoc (compile-protoc) @ hadoop-common ---
      [INFO] No changes detected in protoc files, skipping generation.
      [INFO] 
      [INFO] --- hadoop-maven-plugins:3.0.0-SNAPSHOT:version-info (version-info) @ hadoop-common ---
      [WARNING] [svn, info] failed with error code 1
      [INFO] SCM: GIT
      [INFO] Computed MD5: c8e92ce138fcd723204649e4d7c6ddd
      [INFO] 
      [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ hadoop-common ---
      [INFO] Using 'UTF-8' encoding to copy filtered resources.
      [INFO] Copying 7 resources
      [INFO] Copying 1 resource
      [INFO] 
      [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ hadoop-common ---
      [INFO] Changes detected - recompiling the module!
      [INFO] Compiling 871 source files to /Users/foo/hadoop/hadoop-common-project/hadoop-common/target/classes
      

      It turns out that the incremental build feature of the maven compiler plugin is basically broken at v3.1 (see http://stackoverflow.com/questions/17944108/maven-compiler-plugin-always-detecting-a-set-of-sources-as-stale and MCOMPILER-209). Ironically, this can be fixed by turning off the "incremental build" configuration of the plugin.

        Attachments

          Activity

            People

            • Assignee:
              sjlee0 Sangjin Lee
              Reporter:
              sjlee0 Sangjin Lee
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: