ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark McKay <>
Subject Help creating a MatchingTask
Date Wed, 21 Jan 2004 08:44:32 GMT

I'm trying to create a custom ant task that I can call from my build 
scripts.  Right now I'm just trying to figure out how to write a task 
that can accept a fileset and iterate through all valid files.  My best 
guess so far is below.

Unfortunately, this is giving me errors that I have not encountered in 
Java before.  What does 'cannot be applied to ()' mean?  Could anyone 
suggest what I could do to fix my program?


Mark McKay



com/kitfox/anttask/ [26:1] 
getDirectoryScanner( in cannot be applied to ()
        DirectoryScanner scanner = fs.getDirectoryScanner();
1 error
Errors compiling MyAntTask.


package com.kitfox.anttask;


 * @author  kitfox
public class MyAntTask extends MatchingTask {
    /** Creates a new instance of MyAntTask */
    public MyAntTask() {
    public void execute() throws BuildException
        FileSet fs = getImplicitFileSet();
        DirectoryScanner scanner = fs.getDirectoryScanner();
        String[] files = scanner.getIncludedFiles();
        for (int i = 0; i < files.length; i++) {

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

View raw message