You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Russell Gold <ru...@oracle.com> on 2017/01/18 15:37:53 UTC

Is it time to change the defaults for source and target?

Currently, the maven-compiler-plugin defaults to 1.5 for the values of “source” and “target.” But Java 1.5 was end-of-lifed some time ago, and Maven doesn’t even run with lower than 1.6. These settings are incompatible with Java 9. Would it not make sense now to change those defaults to at least 1.6, if not 1.7?
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Is it time to change the defaults for source and target?

Posted by Russell Gold <ru...@oracle.com>.
The rule is three-back. If you run Maven with Java 9 and do not set target and source (or release) explicitly, it uses the default of 1.5, which the compiler rejects with

[ERROR] Source option 1.5 is no longer supported. Use 1.6 or later.
[ERROR] Target option 1.5 is no longer supported. Use 1.6 or later.

 Russ

> On Jan 18, 2017, at 3:30 PM, Jochen Wiedmann <jo...@gmail.com> wrote:
> 
> On Wed, Jan 18, 2017 at 4:37 PM, Russell Gold <ru...@oracle.com> wrote:
> 
>> These settings are incompatible with Java 9.
> 
> How so?
> 
> 
> 
> -- 
> The next time you hear: "Don't reinvent the wheel!"
> 
> http://www.keystonedevelopment.co.uk/wp-content/uploads/2014/10/evolution-of-the-wheel-300x85.jpg
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 


Re: Is it time to change the defaults for source and target?

Posted by Jochen Wiedmann <jo...@gmail.com>.
On Wed, Jan 18, 2017 at 4:37 PM, Russell Gold <ru...@oracle.com> wrote:

> These settings are incompatible with Java 9.

How so?



-- 
The next time you hear: "Don't reinvent the wheel!"

http://www.keystonedevelopment.co.uk/wp-content/uploads/2014/10/evolution-of-the-wheel-300x85.jpg

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Is it time to change the defaults for source and target?

Posted by Thomas Broyer <t....@gmail.com>.
One shouldn't ever use source/target without also setting a corresponding
bootclasspath (and Java 8 displays a warning when that's not the case; as
it could lead to code that doesn't actually run on the targeted JVM), so
those settings should have NO default value.
Java 9 will make it better with real cross-compilation without the need for
a bootclasspath (with its new -release argument), but it's not there yet.

Le mer. 18 janv. 2017 16:38, Russell Gold <ru...@oracle.com> a
écrit :

Currently, the maven-compiler-plugin defaults to 1.5 for the values of
“source” and “target.” But Java 1.5 was end-of-lifed some time ago, and
Maven doesn’t even run with lower than 1.6. These settings are incompatible
with Java 9. Would it not make sense now to change those defaults to at
least 1.6, if not 1.7?
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org