You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Stefano Mazzocchi <st...@apache.org> on 2000/01/27 22:56:39 UTC
Re: cvs commit: jakarta-ant/src/main/org/apache/tools/ant
TaskAdapter.java Project.java ProjectHelper.java
costin@locus.apache.org wrote:
>
> costin 00/01/26 20:43:52
>
> Modified: . bootstrap.sh
> src/main/org/apache/tools/ant Project.java
> ProjectHelper.java
> Added: src/main/org/apache/tools/ant TaskAdapter.java
> Log:
> Added TaskAdapter - allows use of external Beans, without requiring them to
> extend Task or have any ideea that Ant will use them.
>
> The only requirement is to have a
> void execute() throws Exception
>
> That allows Tomcat ( and other projects) to define normal Beans and still
> be able to script them.
>
> The usage is identical with normal Task-extending Beans.
Could you please elaborate more on this?
--
Stefano Mazzocchi One must still have chaos in oneself to be
able to give birth to a dancing star.
<st...@apache.org> Friedrich Nietzsche
--------------------------------------------------------------------
Come to the first official Apache Software Foundation Conference!
------------------------- http://ApacheCon.Com ---------------------
Re: cvs commit: jakarta-ant/src/main/org/apache/tools/ant
TaskAdapter.java Project.java ProjectHelper.java
Posted by co...@eng.sun.com.
> > That allows Tomcat ( and other projects) to define normal Beans and still
> > be able to script them.
> >
> > The usage is identical with normal Task-extending Beans.
>
> Could you please elaborate more on this?
Right now you have to extend Task and implement setters and
void execute() throws BuildException
With the patch you can use arbitrary objects that implement setters and
void execute() throws Exception
The change is usefull if you want to write tasks without dependencies
on Ant. ( some objects are not only Build-related, but can be used in Ant
too).
Examples:
- GTest object ( used to tomcat, but it can be included in Ant scripts)
- Various configuration tasks ( generate Apache and tomcat config ) -
usefull for Ant build and install but used in an admin tool too.
Costin