ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 10755] - Ant 1.5's jar task fails to add new files when run multiple times
Date Mon, 29 Jul 2002 15:10:25 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10755>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10755

Ant 1.5's jar task fails to add new files when run multiple times





------- Additional Comments From phale@cnnxn.com  2002-07-29 15:10 -------
I have a simalr situation when trying to add files to a jar using <jar> and 
<zip>. The first task adds files properly bu the second produces an error for 
each file to be added, stating that the target jar is "up to date" and the file 
to be added is "skipped".

Target looks like this:
    <target name="jar" depends="compile" description="Create client jar file">
        <jar destfile="${jar.file.name}.jar" includes="**" 
basedir="${dest.dir}" manifest="ant/dashclient-nosign.mf" update="true" />
        <zip destfile="${jar.file.name}.jar" update="true" >
            <zipfileset src="shared/Cnnxn/CnnxnUtils.jar" excludes="META-
INF/MANIFEST.MF" />
        </zip>
    </target>


I was able to workaround the problem by adding a <touch> task between the <jar>

and <zip> tasks using a date that I know is in the past.

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

Peter Hale phale@cnnxn.com

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message