ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vimil Saju <vimils...@yahoo.com>
Subject Re: project.createTask() not working with ant-1.8.2
Date Tue, 15 Feb 2011 16:47:38 GMT
 
> Just to clarify, if I use getProject(), I'm not getting an
> error.  But I
> would like to create a new Project in the Obfuscate's
> execute method where I
> want to run my tasks.
> 
> Is there no way to create a new Project and run the tasks
> that I want?

It s not advisable to create a new project unless there is a specific reason. If a new project
is created, the task cannot access any of the properties or references defined in the project
under which task is defined. 

If you want to execute your task under a new project all you need is to put the task under
a separate target and the invoke the target using the antcall task.

If you really need to create a new Project object, i think it is not sufficient to just create
an instance of the Project object. Look at the source code of antcall task to see how a new
project is created.



 
____________________________________________________________________________________
It's here! Your new message!  
Get new email alerts with the free Yahoo! Toolbar.
http://tools.search.yahoo.com/toolbar/features/mail/

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


Mime
View raw message