You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Simon Spero <se...@gmail.com> on 2017/06/26 22:02:15 UTC
Things in a POM file that are not probably incorrect
<maven.compiler.source>1.5</maven.compiler.source>
<maven.compiler.target>1.5</maven.compiler.target>
<commons.module.name>org.apache.commons.functor</commons.module.name>
JDK 9 cannot generate or parse class files compiled with -target 1.5 [1].
Per the JPMS Armistice talks, "Automatic-Module-Name" header should only
be added to jars that have been tested under JDK 9 [2].
Also, javac now supports the new "--release" argument as an alternative to
source + target.
Roughly speaking, this option combines -source & -target with a little bit
of animal sniffing. JDK 9 includes signatures for JDK 6,7,8, and 9 (i.e.
all the releases which jdk9 can compile for).
This option is supported by maven-compiler-plugin [4] via a <release>
element in the plugin configuration, or by settting the property
*maven.compiler.release* .
Simon
[1] https://bugs.openjdk.java.net/browse/JDK-8011044
[2]
http://openjdk.java.net/projects/jigsaw/spec/minutes/2017-05-18#AutomaticModuleNames--ModuleNameInManifest
[3] http://openjdk.java.net/jeps/247
[4]
https://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#release
Re: Things in a POM file that are not probably incorrect
Posted by Matt Sicker <bo...@gmail.com>.
Java 9 can still run old bytecode, but they're removing compiler support
for outputting that bytecode apparently (either that or syntax support).
On 27 June 2017 at 18:45, Emmanuel Bourg <eb...@apache.org> wrote:
> Le 27/06/2017 à 00:02, Simon Spero a écrit :
>
> > JDK 9 cannot generate or parse class files compiled with -target 1.5
> [1].
>
> AFAIK Java 9 can still parse 1.5 (and lower) class files.
>
> Emmanuel Bourg
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>
--
Matt Sicker <bo...@gmail.com>
Re: Things in a POM file that are not probably incorrect
Posted by Rob Tompkins <ch...@gmail.com>.
> On Jun 27, 2017, at 7:45 PM, Emmanuel Bourg <eb...@apache.org> wrote:
>
>> Le 27/06/2017 à 00:02, Simon Spero a écrit :
>>
>> JDK 9 cannot generate or parse class files compiled with -target 1.5 [1].
>
> AFAIK Java 9 can still parse 1.5 (and lower) class files.
But it does matter what you declare the target to be: http://openjdk.java.net/jeps/182
-Rob
>
> Emmanuel Bourg
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
Re: Things in a POM file that are not probably incorrect
Posted by Emmanuel Bourg <eb...@apache.org>.
Le 27/06/2017 à 00:02, Simon Spero a écrit :
> JDK 9 cannot generate or parse class files compiled with -target 1.5 [1].
AFAIK Java 9 can still parse 1.5 (and lower) class files.
Emmanuel Bourg
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
Re: Things in a POM file that are not probably incorrect
Posted by Ralph Goers <ra...@dslextreme.com>.
It seems so, although it sounds like there is a solution to do it with Java 7 and 8 as well.
http://events.linuxfoundation.org/sites/events/files/slides/Java9%20and%20the%20impact%20on%20Maven%20projects.pdf <http://events.linuxfoundation.org/sites/events/files/slides/Java9%20and%20the%20impact%20on%20Maven%20projects.pdf>
Ralph
> On Jun 28, 2017, at 10:05 AM, Gary Gregory <ga...@gmail.com> wrote:
>
> It sounds like building on Java 9 renders the animal sniffer Maven plugin
> obsolete.
>
> Gary
>
> On Jun 26, 2017 15:02, "Simon Spero" <se...@gmail.com> wrote:
>
>> <maven.compiler.source>1.5</maven.compiler.source>
>> <maven.compiler.target>1.5</maven.compiler.target>
>> <commons.module.name>org.apache.commons.functor</commons.module.name>
>>
>> JDK 9 cannot generate or parse class files compiled with -target 1.5 [1].
>>
>> Per the JPMS Armistice talks, "Automatic-Module-Name" header should only
>> be added to jars that have been tested under JDK 9 [2].
>>
>> Also, javac now supports the new "--release" argument as an alternative to
>> source + target.
>> Roughly speaking, this option combines -source & -target with a little bit
>> of animal sniffing. JDK 9 includes signatures for JDK 6,7,8, and 9 (i.e.
>> all the releases which jdk9 can compile for).
>> This option is supported by maven-compiler-plugin [4] via a <release>
>> element in the plugin configuration, or by settting the property
>> *maven.compiler.release* .
>>
>> Simon
>>
>> [1] https://bugs.openjdk.java.net/browse/JDK-8011044
>> [2]
>> http://openjdk.java.net/projects/jigsaw/spec/minutes/2017-05-18#
>> AutomaticModuleNames--ModuleNameInManifest
>> [3] http://openjdk.java.net/jeps/247
>> [4]
>> https://maven.apache.org/plugins/maven-compiler-plugin/
>> compile-mojo.html#release
>>
Re: Things in a POM file that are not probably incorrect
Posted by Gary Gregory <ga...@gmail.com>.
It sounds like building on Java 9 renders the animal sniffer Maven plugin
obsolete.
Gary
On Jun 26, 2017 15:02, "Simon Spero" <se...@gmail.com> wrote:
> <maven.compiler.source>1.5</maven.compiler.source>
> <maven.compiler.target>1.5</maven.compiler.target>
> <commons.module.name>org.apache.commons.functor</commons.module.name>
>
> JDK 9 cannot generate or parse class files compiled with -target 1.5 [1].
>
> Per the JPMS Armistice talks, "Automatic-Module-Name" header should only
> be added to jars that have been tested under JDK 9 [2].
>
> Also, javac now supports the new "--release" argument as an alternative to
> source + target.
> Roughly speaking, this option combines -source & -target with a little bit
> of animal sniffing. JDK 9 includes signatures for JDK 6,7,8, and 9 (i.e.
> all the releases which jdk9 can compile for).
> This option is supported by maven-compiler-plugin [4] via a <release>
> element in the plugin configuration, or by settting the property
> *maven.compiler.release* .
>
> Simon
>
> [1] https://bugs.openjdk.java.net/browse/JDK-8011044
> [2]
> http://openjdk.java.net/projects/jigsaw/spec/minutes/2017-05-18#
> AutomaticModuleNames--ModuleNameInManifest
> [3] http://openjdk.java.net/jeps/247
> [4]
> https://maven.apache.org/plugins/maven-compiler-plugin/
> compile-mojo.html#release
>
Re: Things in a POM file that are not probably incorrect
Posted by Benedikt Ritter <br...@apache.org>.
Hello Simon,
> Am 27.06.2017 um 00:02 schrieb Simon Spero <se...@gmail.com>:
>
> <maven.compiler.source>1.5</maven.compiler.source>
> <maven.compiler.target>1.5</maven.compiler.target>
> <commons.module.name>org.apache.commons.functor</commons.module.name>
>
> JDK 9 cannot generate or parse class files compiled with -target 1.5 [1].
>
> Per the JPMS Armistice talks, "Automatic-Module-Name" header should only
> be added to jars that have been tested under JDK 9 [2].
>
> Also, javac now supports the new "--release" argument as an alternative to
> source + target.
> Roughly speaking, this option combines -source & -target with a little bit
> of animal sniffing. JDK 9 includes signatures for JDK 6,7,8, and 9 (i.e.
> all the releases which jdk9 can compile for).
> This option is supported by maven-compiler-plugin [4] via a <release>
> element in the plugin configuration, or by settting the property
> *maven.compiler.release* .
Thank you for the heads up! We should definitely try to use the new release option once JDK9 is released and our components require at least Java 1.6.
Cheers,
Benedikt
>
> Simon
>
> [1] https://bugs.openjdk.java.net/browse/JDK-8011044
> [2]
> http://openjdk.java.net/projects/jigsaw/spec/minutes/2017-05-18#AutomaticModuleNames--ModuleNameInManifest
> [3] http://openjdk.java.net/jeps/247
> [4]
> https://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#release
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org