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 2020/06/17 20:25:47 UTC
[maven-compiler-plugin] 01/01: Update default source/target from
1.6 to 1.7
This is an automated email from the ASF dual-hosted git repository.
rfscholte pushed a commit to branch MCOMPILER-404
in repository https://gitbox.apache.org/repos/asf/maven-compiler-plugin.git
commit dc4a5635ba4eb2ba5e461fa53b2c47c58d7fa397
Author: Andrey Turbanov <tu...@gmail.com>
AuthorDate: Thu Apr 9 23:06:44 2020 +0300
Update default source/target from 1.6 to 1.7
---
.../apache/maven/plugin/compiler/AbstractCompilerMojo.java | 12 +++++++-----
src/site/apt/index.apt.vm | 6 +++---
2 files changed, 10 insertions(+), 8 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 48a152a..257d1a1 100644
--- a/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java
+++ b/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java
@@ -98,9 +98,9 @@ public abstract class AbstractCompilerMojo
{
protected static final String PS = System.getProperty( "path.separator" );
- static final String DEFAULT_SOURCE = "1.6";
+ static final String DEFAULT_SOURCE = "1.7";
- static final String DEFAULT_TARGET = "1.6";
+ static final String DEFAULT_TARGET = "1.7";
// Used to compare with older targets
static final String MODULE_INFO_TARGET = "1.9";
@@ -167,7 +167,8 @@ public abstract class AbstractCompilerMojo
/**
* <p>The -source argument for the Java compiler.</p>
*
- * <b>NOTE: </b>Since 3.8.0 the default value has changed from 1.5 to 1.6
+ * <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
*/
@Parameter( property = "maven.compiler.source", defaultValue = DEFAULT_SOURCE )
protected String source;
@@ -175,7 +176,8 @@ public abstract class AbstractCompilerMojo
/**
* <p>The -target argument for the Java compiler.</p>
*
- * <b>NOTE: </b>Since 3.8.0 the default value has changed from 1.5 to 1.6
+ * <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
*/
@Parameter( property = "maven.compiler.target", defaultValue = DEFAULT_TARGET )
protected String target;
@@ -1361,7 +1363,7 @@ public abstract class AbstractCompilerMojo
Object mavenExecutionRequest = getRequestMethod.invoke( this.session );
Method getThreadCountMethod = mavenExecutionRequest.getClass().getMethod( "getThreadCount" );
String threadCount = (String) getThreadCountMethod.invoke( mavenExecutionRequest );
- return Integer.valueOf( threadCount );
+ return Integer.parseInt( threadCount );
}
catch ( Exception e )
{
diff --git a/src/site/apt/index.apt.vm b/src/site/apt/index.apt.vm
index 38e0eb1..7162b2b 100644
--- a/src/site/apt/index.apt.vm
+++ b/src/site/apt/index.apt.vm
@@ -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.6>>> and the default <<<target>>>
- setting is <<<1.6>>>, independently of the JDK you run Maven with.
+ 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.
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}}.
@@ -42,7 +42,7 @@ ${project.name}
on AspectJ, .NET, and C#.
<<NOTE:>> <To know more about the JDK javac, please see:
- {{http://download.oracle.com/javase/6/docs/technotes/tools/windows/javac.html}}.>
+ {{https://docs.oracle.com/javase/8/docs/technotes/tools/windows/javac.html}}.>
* Goals Overview