Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 63845 invoked from network); 26 Jan 2004 09:23:49 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 26 Jan 2004 09:23:49 -0000 Received: (qmail 80156 invoked by uid 500); 26 Jan 2004 09:23:17 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 79992 invoked by uid 500); 26 Jan 2004 09:23:16 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 79979 invoked from network); 26 Jan 2004 09:23:15 -0000 Received: from unknown (HELO 137100.vserver.de) (62.75.137.100) by daedalus.apache.org with SMTP; 26 Jan 2004 09:23:15 -0000 Received: from antbuild.com (localhost.localdomain [127.0.0.1]) by 137100.vserver.de (8.11.6/8.11.6) with ESMTP id i0Q9NDh26181 for ; Mon, 26 Jan 2004 10:23:18 +0100 Message-ID: <4014DC06.2050803@antbuild.com> Date: Mon, 26 Jan 2004 10:21:10 +0100 From: =?ISO-8859-1?Q?Antoine_L=E9vy-Lambert?= User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6b) Gecko/20031205 Thunderbird/0.4 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ant Users List Subject: Re: Telling DirectoryScanner to scan each directory separately. References: In-Reply-To: X-Enigmail-Version: 0.82.4.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Antony paul wrote: > Hi all, > I am writing a custom task which needs to get the list of included > files for each directory but not any subdirectory and files inside it. > First I have to get all included directories which is set in the build > file. Then I will scan each individual directory to get the included > files. While scanning a directory I dont want to get any subdirectory > name or files in subdirectory. How to do this. > > > This snippet is really for ant 1.6.0, because the type selector has been introduced in 1.6.0 If you do not want to include subdirectories in a fileset, do something like : if you have put such a snippet in a build file, for which you have created a Project object, you can get the reference back to your fileset with Reference r = getProject().getReference("myfileset"); FileSet myFileset = (FileSet) r.getReferencedObject(); > I am using 1.5.4. Custome task is extending MatchingTask. Also a minor problem. I am using the same build file to compile and run the custom task. First compile, make it a jar, copy the jar file to ANT_HOME\lib directory >then call the target to run the task. If I run the task in one step it will run the old class file. I have to launch ant a second time to run the newly copied task. Is it possible to compile and run it in one step ?. You might want to wrap your build process in a script or .bat file and separate the compilation/jarring of the custom task, and the use of the custom task. (Just my feeling). Antoine --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org