Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MCOMPILER-505] - Update default source/target from 1.7 to 1.8 #149

Merged
merged 1 commit into from
Sep 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
[MCOMPILER-505] - Update default source/target from 1.7 to 1.8
Signed-off-by: Jorge Solórzano <[email protected]>
  • Loading branch information
jorsol committed Sep 8, 2022
commit 70d69731e4ea46bcbc46b57009f19d0fde42b5b5
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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would introduce in this place a list or line break - now everything is in one line

https://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#source

*/
@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