Hi,

in a custom task you usually do not need to use a new Ant project instance, so 
I would use getProject() to access the project attached to the current ant task.

If you are programming a piece of code to execute  an Ant task or ant Ant build 
file from a Java class or framework which is not related to Ant, you would 
create a new Project instance.


Regards,

Antoine

On May 26, 2013, at 10:41 AM, WebServices Development wrote:

> I am trying to create a custom ant task to copy files to a specified location 
> based on some criteria provided to the task.   
> 
> I am using ANT's Copy task for my custom task.  I have seen some discussion 
> about using one of the two - getProject() and "new Project()" but haven't 
> found any discussion on differences between when to use which of these 
> approaches.  I realise the basic difference is getting reference to an 
> existing project vs. creating a new reference, but other than that haven't 
> found any information.
> 
> Is there a specific reason to use one vs. the other?
> 
> Thank you
> 
> 
> 
> 
> 


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

Reply via email to