ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Koss <m.k...@tiscali.co.uk>
Subject how to create a custom mapper programmatically
Date Fri, 29 Aug 2003 12:36:52 GMT

Let's say I use sth. like this :

    java.io.File srcDir = new java.io.File( archiveDirName );
    java.io.File destDir = new java.io.File( myPath );

    FileSet fs = new FileSet();
    fs.setDir( srcDir );
    FilenameSelector fns = new FilenameSelector();
    fns.setName("**/*");
    fs.addFilename( fns );
    fs.setExcludes( FILE_ARCHIVE_NAME );

    // XXXX create a mapper ..........

    Copy copyTask = (Copy) project.createTask( "copy" );
    copyTask.addFileset( fs );
    copyTask.setTodir( destDir );
    copyTask.setIncludeEmptyDirs( true );
    copyTask.execute();


I would like to ad a definition of the mapper after FileNameSelector / FileSet 
setup.


Cheers

Matt

-- 
Matt Koss

e-mail : m.koss@tiscali.co.uk


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message