You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by rf...@apache.org on 2021/03/12 18:41:26 UTC
[maven-compiler-plugin] branch master updated: [MCOMPILER-428]
Improve documentation regarding useIncrementalCompilation
This is an automated email from the ASF dual-hosted git repository.
rfscholte pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-compiler-plugin.git
The following commit(s) were added to refs/heads/master by this push:
new 9445d78 [MCOMPILER-428] Improve documentation regarding useIncrementalCompilation
9445d78 is described below
commit 9445d78c604ad6b6815066edf63841a78dfd5d98
Author: Thomas Bracher <th...@malt.com>
AuthorDate: Fri Mar 12 19:41:13 2021 +0100
[MCOMPILER-428] Improve documentation regarding useIncrementalCompilation
Signed-off-by: rfscholte <rf...@apache.org>
---
.../apache/maven/plugin/compiler/AbstractCompilerMojo.java | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java b/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java
index 257d1a1..7d67f4a 100644
--- a/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java
+++ b/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java
@@ -483,7 +483,19 @@ public abstract class AbstractCompilerMojo
private List<String> fileExtensions;
/**
- * to enable/disable incrementation compilation feature
+ * <p>to enable/disable incremental compilation feature.</p>
+ * <p>This leads to two different modes depending on the underlying compiler. The default javac compiler does the
+ * following:</p>
+ * <ul>
+ * <li>true <strong>(default)</strong> in this mode the compiler plugin determines whether any JAR files the
+ * current module depends on have changed in the current build run; or any source file was added, removed or
+ * changed since the last compilation. If this is the case, the compiler plugin recompiles all sources.</li>
+ * <li>false <strong>(not recommended)</strong> this only compiles source files which are newer than their
+ * corresponding class files, namely which have changed since the last compilation. This does not
+ * recompile other classes which use the changed class, potentially leaving them with references to methods that no
+ * longer exist, leading to errors at runtime.</li>
+ * </ul>
+ *
* @since 3.1
*/
@Parameter( defaultValue = "true", property = "maven.compiler.useIncrementalCompilation" )