Howdy, Can you post debug output how the compiler plugin is invoked?
Also, looks related: https://github.com/eclipse-jdt/eclipse.jdt.core/issues/1578 T On Fri, Mar 1, 2024 at 10:37 AM Václav Haisman <vhais...@gmail.com> wrote: > I am getting the following error during build with Maven 3.9.6 and Java 21. > The effective POM part for the compiler plugin is below the exception > trace. Is this a known issue? > > [INFO] --- compiler:3.12.1:compile (default-compile) @ apmservices.artemis > --- > [INFO] Recompiling the module because of changed source code. > [INFO] Compiling with eclipse [debug:lines,vars,source parameters release > 21] to target\classes > *Failed to init Classpath for jar file > C:\apache-maven-3.9.6\boot\plexus-classworlds.license* > java.util.zip.ZipException: zip END header not found > at java.base/java.util.zip.ZipFile$Source.findEND(ZipFile.java:1649) > at java.base/java.util.zip.ZipFile$Source.initCEN(ZipFile.java:1657) > at java.base/java.util.zip.ZipFile$Source.<init>(ZipFile.java:1495) > at java.base/java.util.zip.ZipFile$Source.get(ZipFile.java:1458) > at > java.base/java.util.zip.ZipFile$CleanableResource.<init>(ZipFile.java:724) > at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:251) > at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:180) > at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:194) > at > > org.eclipse.jdt.internal.compiler.batch.ClasspathJar.initialize(ClasspathJar.java:204) > at > > org.eclipse.jdt.internal.compiler.batch.ClasspathMultiReleaseJar.initialize(ClasspathMultiReleaseJar.java:38) > at > > org.eclipse.jdt.internal.compiler.batch.FileSystem.<init>(FileSystem.java:233) > at > > org.eclipse.jdt.internal.compiler.batch.Main.getLibraryAccess(Main.java:3480) > at > > org.eclipse.jdt.internal.compiler.batch.Main.performCompilation(Main.java:4726) > at > > org.eclipse.jdt.internal.compiler.tool.EclipseCompilerImpl.call(EclipseCompilerImpl.java:101) > at > > org.eclipse.jdt.internal.compiler.tool.EclipseCompiler$1.call(EclipseCompiler.java:196) > at > > org.codehaus.plexus.compiler.eclipse.EclipseJavaCompiler.performCompile(EclipseJavaCompiler.java:307) > at > > org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:1188) > at > > org.apache.maven.plugin.compiler.CompilerMojo.execute(CompilerMojo.java:212) > at > > org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:126) > at > > org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2(MojoExecutor.java:328) > at > > org.apache.maven.lifecycle.internal.MojoExecutor.doExecute(MojoExecutor.java:316) > at > > org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212) > at > > org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:174) > at > > org.apache.maven.lifecycle.internal.MojoExecutor.access$000(MojoExecutor.java:75) > at > > org.apache.maven.lifecycle.internal.MojoExecutor$1.run(MojoExecutor.java:162) > at > > org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute(DefaultMojosExecutionStrategy.java:39) > at > > org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:159) > at > > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:105) > at > > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:73) > at > > org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:53) > at > > org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:118) > at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:261) > at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:173) > at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:101) > at org.apache.maven.cli.MavenCli.execute(MavenCli.java:906) > at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:283) > at org.apache.maven.cli.MavenCli.main(MavenCli.java:206) > at > > java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) > at java.base/java.lang.reflect.Method.invoke(Method.java:580) > at > > org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:283) > at > org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:226) > at > > org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:407) > at > org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:348) > at org.codehaus.classworlds.Launcher.main(Launcher.java:47) > > Effective POM section: > > <plugin> > <artifactId>maven-compiler-plugin</artifactId> > <version>3.12.1</version> > <executions> > <execution> > <id>default-compile</id> > <phase>compile</phase> > <goals> > <goal>compile</goal> > </goals> > <configuration> > <release>21</release> > <source>21</source> > <target>21</target> > <compilerId>eclipse</compilerId> > <parameters>true</parameters> > <debug>true</debug> > <debuglevel>lines,vars,source</debuglevel> > <compilerArgs> > <arg>-properties</arg> > > > <arg>${settings.localRepository}/com/ca/apm/binaries/jdt.core.prefs/1.0.2/jdt.core.prefs-1.0.2.prefs</arg> > </compilerArgs> > <showWarnings>true</showWarnings> > </configuration> > </execution> > </executions> > <dependencies> > <dependency> > <groupId>com.ca.apm.binaries</groupId> > <artifactId>jdt.core.prefs</artifactId> > <version>1.0.2</version> > <type>prefs</type> > <scope>compile</scope> > </dependency> > <dependency> > <groupId>org.codehaus.plexus</groupId> > <artifactId>plexus-compiler-eclipse</artifactId> > <version>2.14.2</version> > <scope>compile</scope> > </dependency> > </dependencies> > <configuration> > <release>21</release> > <source>21</source> > <target>21</target> > <compilerId>eclipse</compilerId> > <parameters>true</parameters> > <debug>true</debug> > <debuglevel>lines,vars,source</debuglevel> > <compilerArgs> > <arg>-properties</arg> > > > <arg>${settings.localRepository}/com/ca/apm/binaries/jdt.core.prefs/1.0.2/jdt.core.prefs-1.0.2.prefs</arg> > </compilerArgs> > <showWarnings>true</showWarnings> > </configuration> > </plugin> > > -- > VH >