buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Boisvert <alex.boisv...@gmail.com>
Subject Re: java.util.zip.ZipException: error in opening zip file
Date Tue, 26 Jan 2016 16:39:44 GMT
When you say,

compile with project('xxx')

You're basically saying "compile with all of project xxx's packages.   But
that project has .tgz package which aren't amenable to compilation.

I'd recommend using project('xxx').package(:jar) to specifically pick the
artifact(s) that are compatible.


On Tue, Jan 26, 2016 at 7:11 AM, Jean-Philippe Caruana <jp@target2sell.com>
wrote:

> Hi,
>
> I have projects that generate a jar and a tgz file, but when I am using
> it as a project dependancy, I have the following (non blocking) error
> message :
>
> Unable to obtain resource from
> /home/jp/src/xxx/target/xxx-6.79.0-SNAPSHOT.tgz:
> java.util.zip.ZipException: error in opening zip file
> Unable to obtain resource from
> /home/jp/src/xxx/target/xxx-6.79.0-SNAPSHOT.tgz:
> java.util.zip.ZipException: error in opening zip file
>         at java.util.zip.ZipFile.open(Native Method)
>         at java.util.zip.ZipFile.<init>(ZipFile.java:219)
>         at java.util.zip.ZipFile.<init>(ZipFile.java:149)
>         at java.util.jar.JarFile.<init>(JarFile.java:166)
>         at java.util.jar.JarFile.<init>(JarFile.java:130)
>         at
>
> org.apache.tools.ant.AntClassLoader.getResourceURL(AntClassLoader.java:1006)
>         at
>
> org.apache.tools.ant.AntClassLoader$ResourceEnumeration.findNextResource(AntClassLoader.java:149)
>         at
>
> org.apache.tools.ant.AntClassLoader$ResourceEnumeration.<init>(AntClassLoader.java:110)
>         at
> org.apache.tools.ant.AntClassLoader.findResources(AntClassLoader.java:953)
>         at
>
> org.apache.tools.ant.AntClassLoader.getNamedResources(AntClassLoader.java:922)
>         at
>
> org.apache.tools.ant.loader.AntClassLoader5.getResources(AntClassLoader5.java:56)
>         at
>
> org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.checkForkedPath(JUnitTask.java:1177)
>         at
>
> org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.executeAsForked(JUnitTask.java:1057)
>         at
>
> org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitTask.java:851)
>         at
>
> org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitTask.java:816)
>         at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
>
> What is wrong ?
> How can I avoid this kind of messages
>
> Buildfile snippet :
>
> define 'xxx' do
>     jar = package :jar
>     tgz = package :tgz
>     tgz..path('lib').include(jar, compile.dependencies -
> ARTIFACTS_TO_REMOVE)
> end
>
> define 'yyy' do
>     compile with project('xxx'), project('xxx').dependencies
> end
>
>
>
> Thanks
>
> --
> Jean-Philippe Caruana
> http://www.barreverte.fr
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message