Skip to content

Commit 1176891

Browse files
authored
[MCOMPILER-479] Clarify compiler arguments Javadoc (#90)
1 parent defecd0 commit 1176891

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -307,12 +307,15 @@ public abstract class AbstractCompilerMojo
307307

308308
/**
309309
* <p>
310-
* Sets the arguments to be passed to the compiler (prepending a dash) if {@link #fork} is set to <code>true</code>.
310+
* Sets the arguments to be passed to the compiler (prepending a dash).
311311
* </p>
312312
* <p>
313313
* This is because the list of valid arguments passed to a Java compiler varies based on the compiler version.
314314
* </p>
315315
* <p>
316+
* Note that {@code -J} options are only passed through if {@link #fork} is set to {@code true}.
317+
* </p>
318+
* <p>
316319
* To pass <code>-Xmaxerrs 1000 -Xlint -Xlint:-path -Averbose=true</code> you should include the following:
317320
* </p>
318321
*
@@ -334,7 +337,11 @@ public abstract class AbstractCompilerMojo
334337

335338
/**
336339
* <p>
337-
* Sets the arguments to be passed to the compiler if {@link #fork} is set to <code>true</code>.
340+
* Sets the arguments to be passed to the compiler.
341+
* </p>
342+
* <p>
343+
* Note that {@code -J} options are only passed through if {@link #fork} is set to {@code true}.
344+
* </p>
338345
* Example:
339346
* <pre>
340347
* &lt;compilerArgs&gt;
@@ -352,13 +359,15 @@ public abstract class AbstractCompilerMojo
352359

353360
/**
354361
* <p>
355-
* Sets the unformatted single argument string to be passed to the compiler if {@link #fork} is set to
356-
* <code>true</code>. To pass multiple arguments such as <code>-Xmaxerrs 1000</code> (which are actually two
357-
* arguments) you have to use {@link #compilerArguments}.
362+
* Sets the unformatted single argument string to be passed to the compiler. To pass multiple arguments such as
363+
* <code>-Xmaxerrs 1000</code> (which are actually two arguments) you have to use {@link #compilerArguments}.
358364
* </p>
359365
* <p>
360366
* This is because the list of valid arguments passed to a Java compiler varies based on the compiler version.
361367
* </p>
368+
* <p>
369+
* Note that {@code -J} options are only passed through if {@link #fork} is set to {@code true}.
370+
* </p>
362371
*/
363372
@Parameter
364373
protected String compilerArgument;

0 commit comments

Comments
 (0)