Thanks for the reply. I tried that and I got:
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile)
on project pdfblack-model: Execution default-compile of goal
org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile failed: A required
class was missing while executing
org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile:
org/codehaus/plexus/languages/java/jpms/ResolvePathsResult$ModuleNameSource
[ERROR] -
[ERROR] realm =plugin>org.apache.maven.plugins:maven-compiler-plugin:3.8.1
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] =
file:/home/torakiki/.m2/repository/org/apache/maven/plugins/maven-compiler-plugin/3.8.1/maven-compiler-plugin-3.8.1.jar
[ERROR] urls[1] =
file:/home/torakiki/.m2/repository/org/codehaus/plexus/plexus-java/0.9.11/plexus-java-0.9.11.jar
[ERROR] urls[2] =
file:/home/torakiki/.m2/repository/org/ow2/asm/asm/7.0-beta/asm-7.0-beta.jar
[ERROR] urls[3] =
file:/home/torakiki/.m2/repository/com/thoughtworks/qdox/qdox/2.0-M9/qdox-2.0-M9.jar
[ERROR] urls[4] =
file:/home/torakiki/.m2/repository/org/sonatype/sisu/sisu-inject-bean/1.4.2/sisu-inject-bean-1.4.2.jar
[ERROR] urls[5] =
file:/home/torakiki/.m2/repository/org/sonatype/sisu/sisu-guice/2.1.7/sisu-guice-2.1.7-noaop.jar
[ERROR] urls[6] =
file:/home/torakiki/.m2/repository/org/codehaus/plexus/plexus-utils/2.0.4/plexus-utils-2.0.4.jar
[ERROR] urls[7] =
file:/home/torakiki/.m2/repository/org/sonatype/aether/aether-util/1.7/aether-util-1.7.jar
[ERROR] urls[8] =
file:/home/torakiki/.m2/repository/org/codehaus/plexus/plexus-interpolation/1.14/plexus-interpolation-1.14.jar
[ERROR] urls[9] =
file:/home/torakiki/.m2/repository/org/codehaus/plexus/plexus-component-annotations/1.7.1/plexus-component-annotations-1.7.1.jar
[ERROR] urls[10] =
file:/home/torakiki/.m2/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.3/plexus-sec-dispatcher-1.3.jar
[ERROR] urls[11] =
file:/home/torakiki/.m2/repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar
[ERROR] urls[12] =
file:/home/torakiki/.m2/repository/org/apache/maven/shared/maven-shared-utils/3.2.1/maven-shared-utils-3.2.1.jar
[ERROR] urls[13] =
file:/home/torakiki/.m2/repository/commons-io/commons-io/2.5/commons-io-2.5.jar
[ERROR] urls[14] =
file:/home/torakiki/.m2/repository/org/apache/maven/shared/maven-shared-incremental/1.1/maven-shared-incremental-1.1.jar
[ERROR] urls[15] =
file:/home/torakiki/.m2/repository/org/codehaus/plexus/plexus-compiler-api/2.8.4/plexus-compiler-api-2.8.4.jar
[ERROR] urls[16] =
file:/home/torakiki/.m2/repository/org/codehaus/plexus/plexus-compiler-manager/2.8.4/plexus-compiler-manager-2.8.4.jar
[ERROR] urls[17] =
file:/home/torakiki/.m2/repository/org/codehaus/plexus/plexus-compiler-javac/2.8.4/plexus-compiler-javac-2.8.4.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import from realm ClassRealm[maven.api, parent: null]]
[ERROR]
[ERROR] -
I get this error even if I move plexus-java up of one minor version to
plexus-java 0.9.11.
I also tried to update asm with:
org.ow2.asm
asm
9.1
so pexus-java 0.9.10 and asm latest but I got the same original error.
Andrea
On 2021/02/07 20:19:40, Benjamin Marwell wrote:
> Hi Andrea,
>
> looking at the maven-compiler-plugin, it uses plexus-java 0.9.10 which
> in turn uses an old 6.x asm version.
>
> Try adding a more recent version of plexus-java (which uses asm 9.0)
> and see if that works.
>
> org.apache.maven.plugins
> maven-compiler-plugin
> 3.8.1
>
> 15
>
> --enable-preview
>
>
>
> org.codehaus.plexus
> plexus-java
> 1.0.6
>
>
>
> If it works, please kindly open a ticket at
> http://issues.apache.org/jira/projects/MCOMPILER with the full stack
> trace.
>
> - Ben
>
> Am Sa., 6. Feb. 2021 um 08:47 Uhr schrieb Andrea Vacondio
> :
> >
> > Hi,
> > I hope this is the right channel.
> > I have a multi module project that I'm trying to modularize in the JPMS
> > sense.
> > It's configured to run maven with java 11 and run the compiler plugin using
> > java 15 through the toolchain plugin and this is what I get:
> >
> > [INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @
> > pdfblack-model ---
> > [INFO] Toolchain in maven-compiler-plugin: JDK[/usr/lib/jvm/jdk-15.0.1+9]
> > [INFO]
> >
> > [INFO] BUILD FAILURE
> > [INFO]
> >
> > [INFO] Total time: 1.141 s
> > [INFO] Finished at: 2021-02-05T18:07:26+01:00
> > [INFO]
> >
> > [ERROR] Failed to execute goal
> >