ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kev Jackson <kevin.jack...@it.fts-vn.com>
Subject Re: Ant 1.7 NullPointerException AbstractFileSet and OOM error
Date Tue, 18 Apr 2006 02:44:55 GMT
Hm,

In the cargo code we have:

/**
 * Remove all file in the configuration directory.
 */
 private void cleanConfigurationDirectory()
 {
     // Clean up stuff previously put in the temporary directory but do not
     // remove the Cargo timestamp file
     Delete delete = (Delete) getAntUtils().createAntTask("delete");

     FileSet fileSet = new FileSet();
     fileSet.setDir(getHome());
     fileSet.createInclude().setName("**/*");
     fileSet.createExclude().setName(".cargo");

     // Ensure we really delete all files.
     fileSet.setDefaultexcludes(false);
        
     delete.addFileset(fileSet);
     delete.setIncludeEmptyDirs(true);
     delete.setFailOnError(true);
     delete.setQuiet(false);
        
     delete.execute();        
 }

So there's no project being set here for the Delete task, unless 
createAntTask performs some setup magic.

Matt, as you worked on the resource collections for the delete task, do 
you see what's missing in this code?  It certainly seems that from an 
API/programmer viewpoint, the changes to 1.7 are not bwc with code 
written for 1.6.5, but I'm not sure how to go about 'fixing' Delete, or 
what to suggest to the people at cargo to modify this code to get it to 
work with 1.7/trunk

I'm going to check out the 1.6.5 branch and continue testing on that as 
it doesn't contain the new delete code

Thanks
Kev

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


Mime
View raw message