Kristian Rink
2011-02-04 12:58:10 UTC
Folks;
after using assembly / jar-with-dependencies in many internal cases so
far in order to quickly build "fat", runnable jar files, at the moment
I happen to be completely stuck with this. The project to be built is a
.jar artifact, having jcouchdb, apache tika 0.8 and a few other
dependencies declared.
My configuration looks like this, in pom.xml:
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<mainClass>svcs.Launcher</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
Usually I run mvn clean install assembly:assembly which, for that
setup, works fine in all my other projects - same as introducing an
<execution> ("attached" to lifecycle phase "package") does. In this
project, however, things reproducibly fail like this:
[...]
Caused by: org.apache.maven.plugin.MojoExecutionException: Failed to
create assembly: Error creating assembly archive jar-with-dependencies:
Problem creating jar: Unexpected end of ZLIB input stream at
org.apache.maven.plugin.assembly.mojos.AbstractAssemblyMojo.execute(AbstractAssemblyMojo.java:429)
[...]
22 more Caused by: java.io.EOFException: Unexpected end of ZLIB input
stream at java.util.zip.ZipFile$1.fill(ZipFile.java:227) at
java.util.zip.InflaterInputStream.read(InflaterInputStream.java:141) at
java.io.FilterInputStream.read(FilterInputStream.java:116) at
org.codehaus.plexus.archiver.zip.AbstractZipArchiver.zipFile(AbstractZipArchiver.java:565)
at
org.codehaus.plexus.archiver.jar.JarArchiver.zipFile(JarArchiver.java:553)
at
org.codehaus.plexus.archiver.zip.AbstractZipArchiver.zipFile(AbstractZipArchiver.java:595)
at
org.codehaus.plexus.archiver.zip.AbstractZipArchiver.addResources(AbstractZipArchiver.java:426)
at
org.codehaus.plexus.archiver.zip.AbstractZipArchiver.createArchiveMain(AbstractZipArchiver.java:349)
at
org.codehaus.plexus.archiver.zip.AbstractZipArchiver.execute(AbstractZipArchiver.java:250)
at
org.codehaus.plexus.archiver.AbstractArchiver.createArchive(AbstractArchiver.java:852) ...
24 more
[...]
Surprisingly, as soon as I disable / leave out the tika dependency,
assembly:assembly works as intended. Unfortunately, this is not what I
want / need. :) So, is there anything I can completely do wrong here?
Where could be the problem? Any size restrictions to .jar files in
terms of byte size or file count? Is there any way to make maven more
"verbose" about what exactly is happening, i.e. at which point in
building the .jar the EOFException is being thrown? mvn version, by the
way:
[13:50:03] ***@n428:~$ mvn --version
Apache Maven 3.0 (r1004208; 2010-10-04 13:50:56+0200)
Java version: 1.6.0_21
TIA and all the best,
Kristian
after using assembly / jar-with-dependencies in many internal cases so
far in order to quickly build "fat", runnable jar files, at the moment
I happen to be completely stuck with this. The project to be built is a
.jar artifact, having jcouchdb, apache tika 0.8 and a few other
dependencies declared.
My configuration looks like this, in pom.xml:
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<mainClass>svcs.Launcher</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
Usually I run mvn clean install assembly:assembly which, for that
setup, works fine in all my other projects - same as introducing an
<execution> ("attached" to lifecycle phase "package") does. In this
project, however, things reproducibly fail like this:
[...]
Caused by: org.apache.maven.plugin.MojoExecutionException: Failed to
create assembly: Error creating assembly archive jar-with-dependencies:
Problem creating jar: Unexpected end of ZLIB input stream at
org.apache.maven.plugin.assembly.mojos.AbstractAssemblyMojo.execute(AbstractAssemblyMojo.java:429)
[...]
22 more Caused by: java.io.EOFException: Unexpected end of ZLIB input
stream at java.util.zip.ZipFile$1.fill(ZipFile.java:227) at
java.util.zip.InflaterInputStream.read(InflaterInputStream.java:141) at
java.io.FilterInputStream.read(FilterInputStream.java:116) at
org.codehaus.plexus.archiver.zip.AbstractZipArchiver.zipFile(AbstractZipArchiver.java:565)
at
org.codehaus.plexus.archiver.jar.JarArchiver.zipFile(JarArchiver.java:553)
at
org.codehaus.plexus.archiver.zip.AbstractZipArchiver.zipFile(AbstractZipArchiver.java:595)
at
org.codehaus.plexus.archiver.zip.AbstractZipArchiver.addResources(AbstractZipArchiver.java:426)
at
org.codehaus.plexus.archiver.zip.AbstractZipArchiver.createArchiveMain(AbstractZipArchiver.java:349)
at
org.codehaus.plexus.archiver.zip.AbstractZipArchiver.execute(AbstractZipArchiver.java:250)
at
org.codehaus.plexus.archiver.AbstractArchiver.createArchive(AbstractArchiver.java:852) ...
24 more
[...]
Surprisingly, as soon as I disable / leave out the tika dependency,
assembly:assembly works as intended. Unfortunately, this is not what I
want / need. :) So, is there anything I can completely do wrong here?
Where could be the problem? Any size restrictions to .jar files in
terms of byte size or file count? Is there any way to make maven more
"verbose" about what exactly is happening, i.e. at which point in
building the .jar the EOFException is being thrown? mvn version, by the
way:
[13:50:03] ***@n428:~$ mvn --version
Apache Maven 3.0 (r1004208; 2010-10-04 13:50:56+0200)
Java version: 1.6.0_21
TIA and all the best,
Kristian