[
https://issues.apache.org/jira/browse/MCOMPILER-460?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Maarten Mulders updated MCOMPILER-460:
--------------------------------------
Description:
I've created an example to showcase the issue:
[https://github.com/johanjanssen/mavenexample]
When running without the Toolchains on Java 16
{code:java}
mvn compile or docker build -t mavenexample -f DockerfileJava16 .
{code}
Gives
{code:java}
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile)
on project broken: Fatal error compiling: java.lang.IllegalAccessError: class
lombok.javac.apt.LombokProcessor (in unnamed module @0x21bd20ee) cannot access
class com.sun.tools.javac.processing.JavacProcessingEnvironment (in module
jdk.compiler) because module jdk.compiler does not export
com.sun.tools.javac.processing to unnamed module @0x21bd20ee -> [Help 1]{code}
When running with the Toolchains on Java 16
{code:java}
mvn compile -Ptoolchain or docker build -t mavenexample -f
DockerfileJava16Toolchain .
{code}
Gives
{code:java}
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile)
on project broken: Compilation failure -> [Help 1]{code}
So the Toolchain setup lacks quite some information about the compilation
failure.
Is it possible to get the same error information when using the toolchain?
My usecase is having a quick way to build the same code with 2 different
versions of Java. To show one version works and the other fails. It's also
possible with Docker or setting the JAVA_HOME variable. But I was curious to
see if it would work with toolchains as well.
was:
I've created an example to showcase the issue:
https://github.com/johanjanssen/mavenexample
When running without the Toolchains on Java 16
{{}}
{code:java}
mvn compile or docker build -t mavenexample -f DockerfileJava16 .
{code}
Gives
{{}}
{code:java}
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile)
on project broken: Fatal error compiling: java.lang.IllegalAccessError: class
lombok.javac.apt.LombokProcessor (in unnamed module @0x21bd20ee) cannot access
class com.sun.tools.javac.processing.JavacProcessingEnvironment (in module
jdk.compiler) because module jdk.compiler does not export
com.sun.tools.javac.processing to unnamed module @0x21bd20ee -> [Help 1]{code}
{{}}
When running with the Toolchains on Java 16
{{}}
{code:java}
mvn compile -Ptoolchain or docker build -t mavenexample -f
DockerfileJava16Toolchain .
{code}
Gives
{{}}
{code:java}
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile)
on project broken: Compilation failure -> [Help 1]{code}
{{}}
So the Toolchain setup lacks quite some information about the compilation
failure.
Is it possible to get the same error information when using the toolchain?
My usecase is having a quick way to build the same code with 2 different
versions of Java. To show one version works and the other fails. It's also
possible with Docker or setting the JAVA_HOME variable. But I was curious to
see if it would work with toolchains as well.
> Compiler doesn't show detailed information with the Maven Toolchains
> --------------------------------------------------------------------
>
> Key: MCOMPILER-460
> URL: https://issues.apache.org/jira/browse/MCOMPILER-460
> Project: Maven Compiler Plugin
> Issue Type: Bug
> Affects Versions: 3.8.1
> Environment: Windows Java 16
> Reporter: Johan Janssen
> Priority: Major
>
> I've created an example to showcase the issue:
> [https://github.com/johanjanssen/mavenexample]
> When running without the Toolchains on Java 16
> {code:java}
> mvn compile or docker build -t mavenexample -f DockerfileJava16 .
> {code}
> Gives
> {code:java}
> [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile
> (default-compile) on project broken: Fatal error compiling:
> java.lang.IllegalAccessError: class lombok.javac.apt.LombokProcessor (in
> unnamed module @0x21bd20ee) cannot access class
> com.sun.tools.javac.processing.JavacProcessingEnvironment (in module
> jdk.compiler) because module jdk.compiler does not export
> com.sun.tools.javac.processing to unnamed module @0x21bd20ee -> [Help 1]{code}
> When running with the Toolchains on Java 16
> {code:java}
> mvn compile -Ptoolchain or docker build -t mavenexample -f
> DockerfileJava16Toolchain .
> {code}
> Gives
> {code:java}
> [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile
> (default-compile) on project broken: Compilation failure -> [Help 1]{code}
> So the Toolchain setup lacks quite some information about the compilation
> failure.
> Is it possible to get the same error information when using the toolchain?
> My usecase is having a quick way to build the same code with 2 different
> versions of Java. To show one version works and the other fails. It's also
> possible with Docker or setting the JAVA_HOME variable. But I was curious to
> see if it would work with toolchains as well.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)