if( resource instanceof Module )
File test = new File( file, "target/build/test" ); if( test.exists() ) { FileSet fileset = new FileSet(); fileset.setDir( test ); fileset.setIncludes( "**/*.java" ); super.addFileset( fileset ); } if( resource instanceof Module )
    private void addTargetToFileset( Resource resource )    {        File file = resource.getBaseDir();        File main = new File( file, "target/build/main" );        if( main.exists() )        {            FileSet fileset = new FileSet();            fileset.setDir( main );            fileset.setIncludes( "**/*.java" );            super.addFileset( fileset );        }        if( resource instanceof Module )            {            Module module = (Module) resource;            Resource[] children = module.getResources();            for( int i=0; i < children.length; i++ )            {                Resource child = children[i];                addTargetToFileset( child );            }        }    }