You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Rajiv Jaitly <Ra...@lchclearnet.com> on 2005/01/11 16:41:59 UTC

custom task

++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Please read the disclaimer at the bottom of this e-mail.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Hi,

I have written an custom task that can take FileSet. The task looks like

 public void addFileset(FileSet fs) {    
        System.out.println("About to enter ...");         
        if (fs == null){
        	throw new BuildException("Specify files ... ");
        }
        filesets.add(fs);
        System.out.println("got to the end");
    }



When i run Ant target i get the following error:

[helloworld] About to enter ...
BUILD FAILED: C:\javadev\workspace\java-files\creatTasks.xml:83: No directory specified for FileSet.

Here is my target:

    <target name="file-handling" description="example to handle files"             depends="use.init">       
		<trial>
			<fileset dir="${basedir}">
				<include name="**/*.java"/>
			</fileset>
		</trial>            
    </target>

There are definitely java files in the directory. 

Any ideas.

Thanks

Raj


**********************************************************************
This email is intended for the named recipient(s) only. Its contents
are  confidential and may only be retained by the named recipient(s)
and may only be copied or  disclosed  with the consent of 
LCH.Clearnet Limited.   If you are not an intended recipient please
delete this e-mail and notify postmaster@lchclearnet.com.

The contents  of this  email are  subject to  contract in all cases, 
and LCH.Clearnet Limited makes no contractual commitment save where
confirmed by hard copy.  LCH.Clearnet Limited accepts no liability, 
including liability for negligence, in respect of any statement in 
this email.

LCH.Clearnet Limited, Registered Office: Aldgate House, 
33 Aldgate High Street, London EC3N 1EA.    Recognised as a Clearing 
House under the Financial Services & Markets Act 2000. Reg in England No.25932 
Telephone: +44 20 7426 7000              Internet: http://www.lchclearnet.com
**********************************************************************