From 11768914f5fe9e383a46d3fddad6252cc3c35968 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20=C5=9Eener?= Date: Sun, 6 Feb 2022 00:49:44 +0100 Subject: [PATCH] [MCOMPILER-479] Clarify compiler arguments Javadoc (#90) --- .../plugin/compiler/AbstractCompilerMojo.java | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) 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 99c263f8..20d92a0c 100644 --- a/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java +++ b/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java @@ -307,12 +307,15 @@ public abstract class AbstractCompilerMojo /** *

- * Sets the arguments to be passed to the compiler (prepending a dash) if {@link #fork} is set to true. + * Sets the arguments to be passed to the compiler (prepending a dash). *

*

* This is because the list of valid arguments passed to a Java compiler varies based on the compiler version. *

*

+ * Note that {@code -J} options are only passed through if {@link #fork} is set to {@code true}. + *

+ *

* To pass -Xmaxerrs 1000 -Xlint -Xlint:-path -Averbose=true you should include the following: *

* @@ -334,7 +337,11 @@ public abstract class AbstractCompilerMojo /** *

- * Sets the arguments to be passed to the compiler if {@link #fork} is set to true. + * Sets the arguments to be passed to the compiler. + *

+ *

+ * Note that {@code -J} options are only passed through if {@link #fork} is set to {@code true}. + *

* Example: *
      * <compilerArgs>
@@ -352,13 +359,15 @@ public abstract class AbstractCompilerMojo
 
     /**
      * 

- * Sets the unformatted single argument string to be passed to the compiler if {@link #fork} is set to - * true. To pass multiple arguments such as -Xmaxerrs 1000 (which are actually two - * arguments) you have to use {@link #compilerArguments}. + * Sets the unformatted single argument string to be passed to the compiler. To pass multiple arguments such as + * -Xmaxerrs 1000 (which are actually two arguments) you have to use {@link #compilerArguments}. *

*

* This is because the list of valid arguments passed to a Java compiler varies based on the compiler version. *

+ *

+ * Note that {@code -J} options are only passed through if {@link #fork} is set to {@code true}. + *

*/ @Parameter protected String compilerArgument;