ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antoine Levy Lambert <>
Subject Re: questions about dirset and depend task
Date Wed, 13 Jan 2010 14:52:41 GMT
Hello Cheney,

you can probably build your dirset using a scriptselector

about scriptselectors.

read the section about library dependencies, you will needs bsf.jar and 
js.jar on the classpath I think if you add some custom javascript to 
your build.

<dirset dir="webroot" id="containsjs">
<scriptselector language="javascript">
      selected = false;
      filesindir = file.list();
      for (i = 0; i< filesindir.length; i++) {
         if (filesindir[i].endsWith(".js") {


<copy todir="deploy" includeemptydirs="true">
   <dirset refid="containsjs"/>

For the depends task, I do not know it out of heart.



張毓成 wrote:
> Hi, everyone!
>   I wanna ask two questions.
> 1. how to select folders and sub folders that contains the specific
> filetype, and excludes all files.
> e.g.  select all folders that contains js files.
> i use the following script and it did not work.
> <copy todir="deploy">
>     <dirset dir="webroot" includes="**/*.js"/>
> </copy>
> to use the depend task? I delele a java file in the source
> folder and run the following script
> and class file in the classes wont be deleted.
> <depend srcdir="src" destdir="${classes.dir}" closure="on"/>
> thanks in advanced.

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

View raw message