Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plexus-compiler-eclipse 2.13.0 produces ZipException: zip END header not found on POM dependency #302

Closed
wilx opened this issue Aug 28, 2023 · 4 comments

Comments

@wilx
Copy link

wilx commented Aug 28, 2023

I am getting the following exception (see bottom) when I am using the Eclipse compiler together with the Git Versioning Extension. This exception does not happen / is not visible with 2.12.1. I can see the pom-project-master-SNAPSHOT.pom on classpath as passed from Maven Compiler Plugin, so it must have been handled differently in the previous version.

Here is a small reproducer project: https://github.com/wilx/eclipse-compiler-exception

Failed to init Classpath for jar file C:\Users\XXX\.m2\repository\test\pom-project\master-SNAPSHOT\pom-project-master-SNAPSHOT.pom
java.util.zip.ZipException: zip END header not found
        at java.base/java.util.zip.ZipFile$Source.findEND(ZipFile.java:1599)
        at java.base/java.util.zip.ZipFile$Source.initCEN(ZipFile.java:1607)
        at java.base/java.util.zip.ZipFile$Source.<init>(ZipFile.java:1445)
        at java.base/java.util.zip.ZipFile$Source.get(ZipFile.java:1407)
        at java.base/java.util.zip.ZipFile$CleanableResource.<init>(ZipFile.java:716)
        at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:250)
        at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:179)
        at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:193)
        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:235)
        at org.eclipse.jdt.internal.compiler.batch.Main.getLibraryAccess(Main.java:3498)
        at org.eclipse.jdt.internal.compiler.batch.Main.performCompilation(Main.java:4744)
        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:359)
        at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:1140)
        at org.apache.maven.plugin.compiler.CompilerMojo.execute(CompilerMojo.java:193)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
        at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2(MojoExecutor.java:370)
        at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute(MojoExecutor.java:351)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:215)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:171)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:163)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
        at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:294)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:960)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:293)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:196)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)
@wilx wilx changed the title plexus-compiler-eclipse 2.13.0 with maven-git-versioning-extension produces ZipException: zip END header not found on POM dependency plexus-compiler-eclipse 2.13.0 produces ZipException: zip END header not found on POM dependency Aug 28, 2023
@wilx
Copy link
Author

wilx commented Aug 28, 2023

Actually, the Git Versioning Extension is not necessary to reproduce this. It was one of the generated pom files that it manifested with but it manifests even without it in the reproducer repo.

@pzygielo
Copy link
Contributor

4d33507

4d33507b4853280781927e5974000df0a8590137 is the first bad commit
commit 4d33507b4853280781927e5974000df0a8590137
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Sun Oct 30 19:21:04 2022 +0000

    Bump ecj from 3.30.0 to 3.31.0

@wilx
Copy link
Author

wilx commented Aug 28, 2023

@gnodet
Copy link
Member

gnodet commented Oct 27, 2023

Fixed by apache/maven-compiler-plugin#198

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants