ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Salter <marksal...@talktalk.net>
Subject Re: FileSet with copy fails with NPE..
Date Wed, 10 Dec 2008 14:28:37 GMT
Raja Nagendra Kumar wrote:
> Hi,
> 
> We are writing ant task, which needs to copy files based on  fileset
> defination like this..
This is really a question for the user mailing list...

On that list was a recent discussion about probably the same problem...

"Using Ant Tasks programmatically - SignJar Tasl"

The result there was to make sure you had a project:-

 Project project = new Project();
.
.
 sj.setProject(project);


> 
> Copy c = createCopyTask();
> 			    FileSet fs = new FileSet();
> 			    fs.setProject(getProject());
> 			    fs.setDir(new File("."));
> 			    fs.setFile(f);
> 			    c.addFileset(fs);
> 			    c.execute();

I would think getProject() might be returning a null?

Have a look at the thread in user list it holds other information about why.


-- 
Mark

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


Mime
View raw message