ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antoine Levy-Lambert" <>
Subject Re: Different behavior 1.4.1 - 1.5.1 (adding files to existing jar files)
Date Sat, 04 Jan 2003 14:17:29 GMT
Dear Sean,
there is awareness about this issue,
in this web page Peter Hale suggested a workaround of touching the jar file,
setting its date in the past.
You should try this.
I have tried to suggest fixes of the code actually this morning, but you
should probably try to use the workaround first, and wait until the bug is
officially fixed by one of the ant commiters.


>>I was able to workaround the problem by adding a <touch> task between the
>>and <zip> tasks using a date that I know is in the past.

    <target name="jar" depends="compile" description="Create client jar
        <jar destfile="${}.jar" includes="**"
basedir="${dest.dir}" manifest="ant/" update="true" />
        <touch file="${}.jar" datetime="06/28/2000 2:02 pm"/>
        <zip destfile="${}.jar" update="true" >
            <zipfileset src="shared/Cnnxn/CnnxnUtils.jar" excludes="META-

>> Peter Hale

----- Original Message -----
From: "Sean Landis" <>
To: "Ant User List (E-mail)" <>;
Sent: Friday, January 03, 2003 4:48 PM
Subject: Different behavior 1.4.1 - 1.5.1

> We noticed an important difference in behavior between 1.4.1  and 1.5.1
> regarding the jar built-in. The difference is demonstrated in the
> following
> build file fragment:
>   <jar jarfile="${service-dl.jars}/controller-surrogate.jar"
>          basedir="${build}"  includesfile="tmp"/>
>   <jar jarfile="${service-dl.jars}/controller-surrogate.jar"
>         manifest="${manifests}/"
>          update="true"
>          basedir="${service-dl.jars}"
>          includes="service-surrogate.jar"/>
> In 1.4.1, the first jar command would create the jar and the second
> would
> update the jar file. In 1.5.1, the first would create, but the second
> would
> be skipped. With -debug, a message is printed that states the second
> command was skipped because the jar file was up to date.
> This seems to be a bug in 1.5.1 since the 'update="true"' ought to
> force update regardless of the state of the jar file.
> Is this a bug to be fixed?
> If not, is there a correct way to do what we want?
> If so, is there a work-around technique to get what we want?
> Thanks,
> Sean
> --
> To unsubscribe, e-mail:   <>
> For additional commands, e-mail: <>

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message