Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
2.7.2
-
None
-
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.