You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by ro...@elastica.com on 2000/10/28 03:10:46 UTC

Don't understand

Why is it attempting to actually delete the directory?

The docs say it will try and delete everything from the directory

<target name="clean" depends="init">
		<delete dir="${outputDir}" verbose="yes">
			<fileset dir="." includes="**/*.class"/>
		</delete>

	</target>

Here I get a build failed saying that it couldn't remove ${outputdir}
why?




Re: Don't understand

Posted by Stefan Bodewig <bo...@bost.de>.
>>>>> "r" == robert  <ro...@elastica.com> writes:

 r> Why is it attempting to actually delete the directory?

 r> <delete dir="${outputDir}" verbose="yes"> 
 r>   <fileset dir="." includes="**/*.class"/> 
 r> </delete>

What this delete is supposed to do:

(1) delete directory ${outputDir} with all its contents

(2) delete all .class files found somewhere below the project's
basedir (which . becomes when Ant resolves relative filenames).

I guess, what you really want is to delete all .class files found
under ${outputDir}. This would be

<delete verbose="yes"> 
  <fileset dir="${outputDir}" includes="**/*.class"/> 
</delete>

Hope this helps

        Stefan

Re: Don't understand

Posted by Benjamin Reed <ra...@befunk.com>.
On Fri, 27 Oct 2000 robert@elastica.com wrote:

> Here I get a build failed saying that it couldn't remove
> ${outputdir} why?

Have you checked that the outputdir property is actually being set before
the delete?  Otherwise, it should have already interpreted it instead of
printing it as an error.

-- 
Ben Reed a.k.a. Ranger Rick (ranger@befunk.com)
http://defiance.dyndns.org/ / http://radio.scenespot.org/
lOST: oNE 'cAPS lOCK' KEY.  rEWARD OFFERED.
Now playing on Defiance Radio: Don't Blow Your Top by KMFDM