Details
-
Bug
-
Status: Closed
-
Critical
-
Resolution: Fixed
-
2.5.4, 2.5.5, 2.6
-
None
-
Windows 7
Java 7 & 8 latest bugfixes
Maven 3.3.3
Description
Using the maven-assembly-plugin in version greater than 2.5.3 with goal [{assembly:single}} results in an UndeclaredThrowableException, see stack trace below.
The assembly descriptor includes re-packing a tar archive with binary files in it (in the real world scenario it's a java runtime).
I attached a sample project. Steps to reproduce:
- mvn clean generate-resources (installs the tar.gz in local repository)
- mvn clean assembly:single (unpacks tar.gz and repacks it)
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.5.4:single (default-cli) on project mrelease-bugreport: Execution default-cli of goal org.apache.maven.plugins:maven-assembly-plugin:2.5.4:single failed. UndeclaredThrowableException: Error detected parsing the header: Invalid byte 69 at offset 0 in 'E?E►Hï·L' len=8 -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.5.4:single (default-cli) on project mrelease-bugreport: Execution default-cli of goal org.apache.maven.plugins:maven-assembly-plugin:2.5.4:single failed. at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:224) 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:128) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:862) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:286) at org.apache.maven.cli.MavenCli.main(MavenCli.java:197) 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.PluginExecutionException: Execution default-cli of goal org.apache.maven.plugins:maven-assembly-plugin:2.5.4:single failed. at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:145) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208) ... 20 more Caused by: java.lang.reflect.UndeclaredThrowableException at org.codehaus.plexus.archiver.tar.TarFile$1.hasMoreElements(TarFile.java:80) at org.codehaus.plexus.archiver.tar.PlexusIoTarFileResourceCollection$1.hasNext(PlexusIoTarFileResourceCollection.java:51) at org.codehaus.plexus.components.io.resources.AbstractPlexusIoArchiveResourceCollection$FilteringIterator.doNext(AbstractPlexusIoArchiveResourceCollection.java:82) at org.codehaus.plexus.components.io.resources.AbstractPlexusIoArchiveResourceCollection$FilteringIterator.hasNext(AbstractPlexusIoArchiveResourceCollection.java:100) at org.codehaus.plexus.components.io.resources.proxy.PlexusIoProxyResourceCollection$FwdIterator.getNextResource(PlexusIoProxyResourceCollection.java:126) at org.codehaus.plexus.components.io.resources.proxy.ForwardingIterator.hasNext(ForwardingIterator.java:43) at org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:514) at org.codehaus.plexus.archiver.zip.AbstractZipArchiver.addResources(AbstractZipArchiver.java:350) at org.codehaus.plexus.archiver.zip.AbstractZipArchiver.createArchiveMain(AbstractZipArchiver.java:326) at org.codehaus.plexus.archiver.zip.AbstractZipArchiver.execute(AbstractZipArchiver.java:227) at org.codehaus.plexus.archiver.AbstractArchiver.createArchive(AbstractArchiver.java:990) at org.apache.maven.plugin.assembly.archive.archiver.AssemblyProxyArchiver.createArchive(AssemblyProxyArchiver.java:437) at org.apache.maven.plugin.assembly.archive.DefaultAssemblyArchiver.createArchive(DefaultAssemblyArchiver.java:181) at org.apache.maven.plugin.assembly.mojos.AbstractAssemblyMojo.execute(AbstractAssemblyMojo.java:484) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134) ... 21 more Caused by: java.io.IOException: Error detected parsing the header at org.codehaus.plexus.archiver.commonscompress.archivers.tar.TarArchiveInputStream.getNextTarEntry(TarArchiveInputStream.java:280) at org.codehaus.plexus.archiver.tar.TarFile$1.hasMoreElements(TarFile.java:76) ... 35 more Caused by: java.lang.IllegalArgumentException: Invalid byte 69 at offset 0 in 'E?E►Hï·L' len=8 at org.codehaus.plexus.archiver.commonscompress.archivers.tar.TarUtils.parseOctal(TarUtils.java:137) at org.codehaus.plexus.archiver.commonscompress.archivers.tar.TarUtils.parseOctalOrBinary(TarUtils.java:168) at org.codehaus.plexus.archiver.commonscompress.archivers.tar.TarArchiveEntry.parseTarHeader(TarArchiveEntry.java:952) at org.codehaus.plexus.archiver.commonscompress.archivers.tar.TarArchiveEntry.parseTarHeader(TarArchiveEntry.java:941) at org.codehaus.plexus.archiver.commonscompress.archivers.tar.TarArchiveEntry.<init>(TarArchiveEntry.java:325) at org.codehaus.plexus.archiver.commonscompress.archivers.tar.TarArchiveInputStream.getNextTarEntry(TarArchiveInputStream.java:278) ... 36 more [ERROR] [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException