ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jay Wright <>
Subject jar update problem
Date Mon, 09 Dec 2002 18:05:11 GMT

I am using ant 1.5.1 on windows2000 and have noticed some peculiar behavior.

In the target below, the first operation is a <copy> which copies a jar file
to the dist directory where it will then be upated.  

IF there is a new jar file in the base directory, it is copied to the dist
directory, but the update does NOT happen.  

IF there is no new jar file in the base directory, then the copy does not
take place and the update does happen.

I tried to stick a <sleep seconds="10"/> between the two statements to see
if there was a problem with timing, but that didn't help.   

Why is it that the update will NOT work if the jar file has just been copied
into the directory?

    <target name="server" >
        <copy file="${basedir}\wildcatEJB.jar" todir="${dist.dir}"/>
        <jar jarfile="${dist.dir}\wildcatEJB.jar" update="true">
            <fileset dir="${build.dir}">
                <include name="*.class"/>
            <fileset dir="${conf.dir}">
                <include name="META-INF\ejb-jar.xml"/>
                <include name="META-INF\jboss.xml"/>
        <ear earfile="${dist.dir}/clientA.ear"
            <fileset dir="${dist.dir}" includes="wildcatEJB.jar"/>

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

View raw message