maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benoit Guerin (JIRA)" <j...@codehaus.org>
Subject [jira] (MJAR-179) Adding empty files to jar failed with a ZipException : bad CRC checksum
Date Wed, 16 Jul 2014 09:55:10 GMT

     [ https://jira.codehaus.org/browse/MJAR-179?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Benoit Guerin updated MJAR-179:
-------------------------------

    Attachment: mjar-179.zip

Sample project to reproduce

> Adding empty files to jar failed with a ZipException : bad CRC checksum
> -----------------------------------------------------------------------
>
>                 Key: MJAR-179
>                 URL: https://jira.codehaus.org/browse/MJAR-179
>             Project: Maven JAR Plugin
>          Issue Type: Bug
>    Affects Versions: 2.5
>            Reporter: Benoit Guerin
>            Priority: Blocker
>             Fix For: more-investigation
>
>         Attachments: mjar-179.zip
>
>
> Here is the trace :
> [INFO] --- maven-jar-plugin:2.5:jar (default-jar) @ project ---
> [INFO] Building jar: workspace/project/project-1.0.0-SNAPSHOT.jar
> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-jar-plugin:2.5:jar
(default-jar) on project project: Error assembling JAR
> 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
> 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
> 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
> 	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
> 	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
> 	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
> 	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
> 	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347)
> 	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154)
> 	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
> 	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213)
> 	at org.apache.maven.cli.MavenCli.main(MavenCli.java:157)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:606)
> 	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
> 	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
> 	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
> 	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
> Caused by: org.apache.maven.plugin.MojoExecutionException: Error assembling JAR
> 	at org.apache.maven.plugin.jar.AbstractJarMojo.createArchive(AbstractJarMojo.java:233)
> 	at org.apache.maven.plugin.jar.AbstractJarMojo.execute(AbstractJarMojo.java:251)
> 	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
> 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
> 	... 19 more
> Caused by: org.codehaus.plexus.archiver.ArchiverException: IOException when zipping Test.class:
bad CRC checksum for entry empty_file: 2144df1c instead of 0
> 	at org.codehaus.plexus.archiver.zip.AbstractZipArchiver.zipFile(AbstractZipArchiver.java:602)
> 	at org.codehaus.plexus.archiver.zip.AbstractZipArchiver.addResources(AbstractZipArchiver.java:401)
> 	at org.codehaus.plexus.archiver.zip.AbstractZipArchiver.createArchiveMain(AbstractZipArchiver.java:326)
> 	at org.codehaus.plexus.archiver.zip.AbstractZipArchiver.execute(AbstractZipArchiver.java:223)
> 	at org.codehaus.plexus.archiver.AbstractArchiver.createArchive(AbstractArchiver.java:910)
> 	at org.apache.maven.archiver.MavenArchiver.createArchive(MavenArchiver.java:582)
> 	at org.apache.maven.plugin.jar.AbstractJarMojo.createArchive(AbstractJarMojo.java:226)
> 	... 22 more
> Caused by: java.util.zip.ZipException: bad CRC checksum for entry empty_file: 2144df1c
instead of 0
> 	at org.codehaus.plexus.archiver.zip.ZipOutputStream.closeEntry(ZipOutputStream.java:372)
> 	at org.codehaus.plexus.archiver.zip.ZipOutputStream.putNextEntry(ZipOutputStream.java:422)
> 	at org.codehaus.plexus.archiver.zip.AbstractZipArchiver.zipFile(AbstractZipArchiver.java:563)
> 	at org.codehaus.plexus.archiver.jar.JarArchiver.zipFile(JarArchiver.java:480)
> 	at org.codehaus.plexus.archiver.zip.AbstractZipArchiver.zipFile(AbstractZipArchiver.java:598)
> 	... 28 more



--
This message was sent by Atlassian JIRA
(v6.1.6#6162)

Mime
View raw message