Skip to content

Commit

Permalink
[MCOMPILER-505] - Update default source/target from 1.7 to 1.8
Browse files Browse the repository at this point in the history
Signed-off-by: Jorge Solórzano <[email protected]>
  • Loading branch information
jorsol authored and slachiewicz committed Sep 8, 2022
1 parent 7761563 commit 415c5a2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,10 @@ public abstract class AbstractCompilerMojo

private static final String INPUT_FILES_LST_FILENAME = "inputFiles.lst";

static final String DEFAULT_SOURCE = "1.7";
static final String DEFAULT_TARGET = "1.7";
static final String DEFAULT_SOURCE = "1.8";

static final String DEFAULT_TARGET = "1.8";

// Used to compare with older targets
static final String MODULE_INFO_TARGET = "1.9";

Expand Down Expand Up @@ -184,6 +184,7 @@ public abstract class AbstractCompilerMojo
*
* <b>NOTE: </b>Since 3.8.0 the default value has changed from 1.5 to 1.6.
* Since 3.9.0 the default value has changed from 1.6 to 1.7
* Since 3.11.0 the default value has changed from 1.7 to 1.8
*/
@Parameter( property = "maven.compiler.source", defaultValue = DEFAULT_SOURCE )
protected String source;
Expand All @@ -193,6 +194,7 @@ public abstract class AbstractCompilerMojo
*
* <b>NOTE: </b>Since 3.8.0 the default value has changed from 1.5 to 1.6.
* Since 3.9.0 the default value has changed from 1.6 to 1.7
* Since 3.11.0 the default value has changed from 1.7 to 1.8
*/
@Parameter( property = "maven.compiler.target", defaultValue = DEFAULT_TARGET )
protected String target;
Expand Down
4 changes: 2 additions & 2 deletions src/site/apt/index.apt.vm
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ ${project.name}
default compiler is javax.tools.JavaCompiler (if you are using java 1.6) and is used to compile Java sources.
If you want to force the plugin using <<<javac>>>, you must configure the plugin option {{{./compile-mojo.html#forceJavacCompilerUse}<<<forceJavacCompilerUse>>>}}.

Also note that at present the default <<<source>>> setting is <<<1.7>>> and the default <<<target>>>
setting is <<<1.7>>>, independently of the JDK you run Maven with.
Also note that at present the default <<<source>>> setting is <<<1.8>>> and the default <<<target>>>
setting is <<<1.8>>>, independently of the JDK you run Maven with.
You are highly encouraged to change these defaults by setting <<<source>>> and <<<target>>>
as described in
{{{./examples/set-compiler-source-and-target.html}Setting the -source and -target of the Java Compiler}}.
Expand Down

0 comments on commit 415c5a2

Please sign in to comment.