ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Donal Quinlan" <>
Subject Re: Existing class file are not removed when the corresponding source file is removed
Date Sat, 02 Mar 2002 00:19:24 GMT
We use the deleteAssociated task (relevant java code attached) written by my
colleague Richard Hansen. We use it in our regular clean to remove java
files generated from precompiling jsp's. We have java files that do not
result from precompiled jsp's in the same directory, so simple delete
**/*.java tasks would not work.

Here's an example on how we use it.

  <target name="cleanjsp">
    <deleteAssociated Filetype=".java" verbose="true">
      <fileset dir="${webui.dir}/jsp" includes="**/*.jsp"/>

I hope it works for you.



----- Original Message -----
From: "Gareth Thorburn" <>
To: <>
Sent: Friday, March 01, 2002 8:17 AM
Subject: Re: Existing class file are not removed when the corresponding
source file is removed

>> Scenario.
>> 0. build project
>> 1. is removed.
>> 2. build project again.
>> In this case, the corresponding somefile.class is not removed.
>> I have found the same behaviour also occurs when using the optional
>> depend target.
>> Does anyone have any solutions ?

>Write a "clean" target and call that reasonably frequently.

I hope you are meaning a 'clean' target which goes through and deletes
class files for which there is no longer a corresponding java source file.
If so could someone give me an example of such a target.

I hope you are not meaning a 'full' clean, which removes all class files. I
trying to avoid the need to perform a full rebuild everytime I sync my
with the source repository.



Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte
Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail
irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und
vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte
Weitergabe dieser Mail ist nicht gestattet.

This e-mail may contain confidential and/or privileged information. If you
are not the intended recipient (or have received this e-mail in error)
please notify the sender immediately and destroy this e-mail. Any
unauthorized copying, disclosure or distribution of the material in this
e-mail is strictly forbidden.

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

View raw message