After upgrading to ant 1.9.0 got error "Error opening zip file"

2013-07-18 Thread Rene Groeschke

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

Hello guys,

I'm a committer on the gradle codebase. We want to update our ant
dependencies from ant 1.8.4 to ant 1.9.0 (or better 1.9.2). One of our
integration tests is failing after updating to ant 1.9.0:

We're passing a jar created using ant 1.9.0 as a agent lib to a java
process (java 1.5), the process fails with the following message:

Error opening zip file:
/Users/Rene/github/gradle/gradle/subprojects/plugins/src/integTest/resources/org/gradle/testing/TestEnvironmentIntegrationTest/canRunTestsWithCustomSystemClassLoaderAndJavaAgent/canRunTestsWithCustomSystemClassLoaderAndJavaAgent.jar

Interestingly, this test is only failing with java 1.5. With java 1.6
and java 1.7 does fine. It seems that java 1.5 is not able to use a zip
created with ant 1.9.* as an agent.

You can see the failing test at
http://builds.gradle.org/viewLog.html?buildId=66253&tab=buildResultsDiv&buildTypeId=bt24

Has anybody an idea what we can do here? We would really like to update
to the latest ant version. Is this a known issue?


Best regards,
Rene


-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.19 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBCgAGBQJR57uFAAoJEAh+T40NkTZwkMQH/j3d/iTuDbr9IEny83bguek7
QvnW8E0i9nFj5cVQq+PqzxRBn1bWCOw0Z8gaz8yJjKumTaQijrjPAiKS3KDWZ5u7
rpRK5Vwj5Vlg1/MsVay55izt/N9A7BFZadw1zpCuov6NAKnM/dWq2arKzCSMY6Hn
+xWQMkPYx1WP7A9qQkse/YK3lOZgzRpCW94oU1ybUZgLC4HhWzQVvXMJanydTCj0
rGK9H4oCZ8tbnesqwvWwrgj4x/G3Mk/KAJZbovKbtu+VD1cB8a7Bpdx1QzpBYC3J
BSsbHCXBfPjNWeDOBqA4w7PkB6pp9jTiIYGaLBlPia5MORHIPMUvrJ6NRhH2Rsw=
=MqVT
-END PGP SIGNATURE-


-
To unsubscribe, e-mail: user-unsubscr...@ant.apache.org
For additional commands, e-mail: user-h...@ant.apache.org



Re: After upgrading to ant 1.9.0 got error "Error opening zip file"

2013-07-18 Thread Stefan Bodewig
On 2013-07-18, Rene Groeschke wrote:

> I'm a committer on the gradle codebase. We want to update our ant
> dependencies from ant 1.8.4 to ant 1.9.0 (or better 1.9.2). One of our
> integration tests is failing after updating to ant 1.9.0:

> We're passing a jar created using ant 1.9.0 as a agent lib to a java
> process (java 1.5), the process fails with the following message:

> Error opening zip file:
> /Users/Rene/github/gradle/gradle/subprojects/plugins/src/integTest/resources/org/gradle/testing/TestEnvironmentIntegrationTest/canRunTestsWithCustomSystemClassLoaderAndJavaAgent/canRunTestsWithCustomSystemClassLoaderAndJavaAgent.jar

> Interestingly, this test is only failing with java 1.5. With java 1.6
> and java 1.7 does fine. It seems that java 1.5 is not able to use a zip
> created with ant 1.9.* as an agent.

Yes, this is a known issue.  Java5 doesn't like ZIPs with Zip64
extensions.  This has been fixed - in a way - by Ant 1.9.1 which doesn't
create ZIP64 extensions in  by default anymore.



I'd recommend you go the whole way to 1.9.2 in order to fix javadoc
creation on any JDK that's not brand new, anyway.

Stefan

-
To unsubscribe, e-mail: user-unsubscr...@ant.apache.org
For additional commands, e-mail: user-h...@ant.apache.org



Re: After upgrading to ant 1.9.0 got error "Error opening zip file"

2013-07-18 Thread Rene Groeschke
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

Stefan Bodewig wrote:
> On 2013-07-18, Rene Groeschke wrote:
> 
>> I'm a committer on the gradle codebase. We want to update our ant 
>> dependencies from ant 1.8.4 to ant 1.9.0 (or better 1.9.2). One of
>> our integration tests is failing after updating to ant 1.9.0:
> 
>> We're passing a jar created using ant 1.9.0 as a agent lib to a
>> java process (java 1.5), the process fails with the following
>> message:
> 
>> Error opening zip file: 
>> /Users/Rene/github/gradle/gradle/subprojects/plugins/src/integTest/resources/org/gradle/testing/TestEnvironmentIntegrationTest/canRunTestsWithCustomSystemClassLoaderAndJavaAgent/canRunTestsWithCustomSystemClassLoaderAndJavaAgent.jar
>
>>  Interestingly, this test is only failing with java 1.5. With java
>> 1.6 and java 1.7 does fine. It seems that java 1.5 is not able to
>> use a zip created with ant 1.9.* as an agent.
> 
> Yes, this is a known issue.  Java5 doesn't like ZIPs with Zip64 
> extensions.  This has been fixed - in a way - by Ant 1.9.1 which
> doesn't create ZIP64 extensions in  by default anymore.

Thanks a lot for the pointer I was able to fix our failing test by setting

ZipOutputStream#setUseZip64(Zip64Mode.Never)

Just to understand this completely. Zip64Mode.Never was the default in
earlier ant versions and this has changed with ant 1.9.0?

cheers,

René


> 
> 
> 
> I'd recommend you go the whole way to 1.9.2 in order to fix javadoc 
> creation on any JDK that's not brand new, anyway.
> 
> Stefan
> 
> -
>
> 
To unsubscribe, e-mail: user-unsubscr...@ant.apache.org
> For additional commands, e-mail: user-h...@ant.apache.org
> 

-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.19 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBCgAGBQJR6B7qAAoJEAh+T40NkTZwZZQIAJqB9XC9dqSDEvO02zLx9b6p
P3Z8sV4S6j0nX8M+r9q8vry+wLKzB7qYeXID/IY0aJV73FsTcUUsbPmIuKLlIRHe
E1hyQogVT/A2BpBxxjXTYHwiT/OP4x9uztjWDI08J8uU6vQX0PnT+ARmrBfp2Tsc
BETOiD5HVKd61sDEtPqbSzS9yL23luVpbVIygRni1Z8VlIYh80+biSpWRASO6p0T
/5o1GZOYvxw4JNbwNOqgfdkEucch2REC07az0MJa3TYv67rOSnAbkP0lxXerWf3G
11ASMVcQyPM0+EvryfuKECiU3Dzm8KOVRZ4Px644lwXxjMjq4e78fZA4igGBgxo=
=uh8y
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: user-unsubscr...@ant.apache.org
For additional commands, e-mail: user-h...@ant.apache.org



Re: After upgrading to ant 1.9.0 got error "Error opening zip file"

2013-07-18 Thread Stefan Bodewig
On 2013-07-18, Rene Groeschke wrote:

> Just to understand this completely. Zip64Mode.Never was the default in
> earlier ant versions and this has changed with ant 1.9.0?

Ant didn't support ZIP64 extensions at all prior to 1.9.0, so yes, in a
way "Never" was the default.  In 1.9.0 "AsNeeded" was used with no way
for the user to control it.

ZIP64 extensions are needed to support large archives or big individual
entries (bigger than 4GB).

The ZIP format knows something called "extension fields" and ZIP64 is
one such field.  ZIP readers are supposed to ignore fields they don't
know to handle but Java5's java.util.zip package will rather fail in
that case.  One of the many cases where java.util.zip is broken.

Stefan

-
To unsubscribe, e-mail: user-unsubscr...@ant.apache.org
For additional commands, e-mail: user-h...@ant.apache.org



Re: After upgrading to ant 1.9.0 got error "Error opening zip file"

2013-07-18 Thread Rene Gröschke
On 19.07.2013, at 06:27, Stefan Bodewig  wrote:

> On 2013-07-18, Rene Groeschke wrote:
>
>> Just to understand this completely. Zip64Mode.Never was the default in
>> earlier ant versions and this has changed with ant 1.9.0?
>
> Ant didn't support ZIP64 extensions at all prior to 1.9.0, so yes, in a
> way "Never" was the default.  In 1.9.0 "AsNeeded" was used with no way
> for the user to control it.
>
> ZIP64 extensions are needed to support large archives or big individual
> entries (bigger than 4GB).
>
> The ZIP format knows something called "extension fields" and ZIP64 is
> one such field.  ZIP readers are supposed to ignore fields they don't
> know to handle but Java5's java.util.zip package will rather fail in
> that case.  One of the many cases where java.util.zip is broken.
>
> Stefan
>

Thank you very much for the detailed explanation Stefan.

Cheers,
René

> -
> To unsubscribe, e-mail: user-unsubscr...@ant.apache.org
> For additional commands, e-mail: user-h...@ant.apache.org
>

-
To unsubscribe, e-mail: user-unsubscr...@ant.apache.org
For additional commands, e-mail: user-h...@ant.apache.org