You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Adam Murdoch <ad...@yahoo.com> on 2001/12/14 00:50:37 UTC
invocation api
Hi,
I'd like to suggest another item for the Ant1.9 action list: An invocation
API which would allow Ant to be embedded inside other apps (such as GUIs,
IDEs, build schedulers, build servlets, etc).
Right now, invoking Ant is not as clean as it could be - for example, you
can use Main.start() and give up control over a bunch of things, or you can
copy and hack Main. The goal of this task is to come up with a cleaner and
more flexible way of doing this, by pushing the container related code from
Main and Project behind an API.
This task would involve putting together an API which would allow an app to:
- Create a project from a bunch of sources - file, InputStream, URL, SAX
events, etc.
- Configure a project:
- set classloader.
- set user properties.
- add task and datatype definitions.
- add/remove listeners
- add/remove loggers.
- Get meta-info about the targets in the project (just a tiny subset for
now):
- name
- description
- Execute a task, or a set of tasks.
There's a bunch of extra stuff an invocation API *could* do - I wanted to
keep the initial list short and reasonably well-defined. Some things that
might be good to add later:
- A similar API that a task can use to invoke a target in either the same
project or another project.
- Adding tasklibs, vfs mount points, etc.
- Managing the project definition: things like adding and removing targets
and tasks, setting task attributes, etc.
- Expose a more general task engine API.
Any interest in something like this? I'd be happy to do the work.
Adam
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: invocation api
Posted by Peter Donald <pe...@apache.org>.
On Fri, 14 Dec 2001 10:50, Adam Murdoch wrote:
> I'd like to suggest another item for the Ant1.9 action list: An invocation
> API which would allow Ant to be embedded inside other apps (such as GUIs,
> IDEs, build schedulers, build servlets, etc).
excellent idea !
> Right now, invoking Ant is not as clean as it could be - for example, you
> can use Main.start() and give up control over a bunch of things, or you can
> copy and hack Main. The goal of this task is to come up with a cleaner and
> more flexible way of doing this, by pushing the container related code from
> Main and Project behind an API.
+10000
> This task would involve putting together an API which would allow an app
> to:
>
> - Create a project from a bunch of sources - file, InputStream, URL, SAX
> events, etc.
> - Configure a project:
> - set classloader.
> - set user properties.
> - add task and datatype definitions.
> - add/remove listeners
> - add/remove loggers.
> - Get meta-info about the targets in the project (just a tiny subset for
> now):
> - name
> - description
> - Execute a task, or a set of tasks.
>
> There's a bunch of extra stuff an invocation API *could* do - I wanted to
> keep the initial list short and reasonably well-defined. Some things that
> might be good to add later:
>
> - A similar API that a task can use to invoke a target in either the same
> project or another project.
> - Adding tasklibs, vfs mount points, etc.
> - Managing the project definition: things like adding and removing targets
> and tasks, setting task attributes, etc.
> - Expose a more general task engine API.
>
> Any interest in something like this? I'd be happy to do the work.
Plenty of interest. The way that I originally envisaged it was separating it
into essentially two components. One was the "task engine" which allowed you
to embed execution of all the tasks and so forth outside the context of an
ant build file. You would need to manually set up all of the tasklibs and so
forth but it allows you maximum flexability.
Then there would be the other component that would basically allow you to
execute build files from withing another application. These would basically
be a simplified way to interact with ant.
This is definetly a good idea!
--
Cheers,
Pete
---------------------------------------------------------------
The difference between genius, and stupidity? Genius has limits
---------------------------------------------------------------
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: invocation api
Posted by Peter Donald <pe...@apache.org>.
I just added these items to the action list - thanks!
On Fri, 14 Dec 2001 10:50, Adam Murdoch wrote:
> Hi,
>
> I'd like to suggest another item for the Ant1.9 action list: An invocation
> API which would allow Ant to be embedded inside other apps (such as GUIs,
> IDEs, build schedulers, build servlets, etc).
>
> Right now, invoking Ant is not as clean as it could be - for example, you
> can use Main.start() and give up control over a bunch of things, or you can
> copy and hack Main. The goal of this task is to come up with a cleaner and
> more flexible way of doing this, by pushing the container related code from
> Main and Project behind an API.
>
> This task would involve putting together an API which would allow an app
> to:
>
> - Create a project from a bunch of sources - file, InputStream, URL, SAX
> events, etc.
> - Configure a project:
> - set classloader.
> - set user properties.
> - add task and datatype definitions.
> - add/remove listeners
> - add/remove loggers.
> - Get meta-info about the targets in the project (just a tiny subset for
> now):
> - name
> - description
> - Execute a task, or a set of tasks.
>
> There's a bunch of extra stuff an invocation API *could* do - I wanted to
> keep the initial list short and reasonably well-defined. Some things that
> might be good to add later:
>
> - A similar API that a task can use to invoke a target in either the same
> project or another project.
> - Adding tasklibs, vfs mount points, etc.
> - Managing the project definition: things like adding and removing targets
> and tasks, setting task attributes, etc.
> - Expose a more general task engine API.
>
> Any interest in something like this? I'd be happy to do the work.
>
>
> Adam
--
Cheers,
Pete
*----------------------------------------------*
| The best defense against logic is ignorance. |
*----------------------------------------------*
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: invocation api
Posted by Peter Donald <pe...@apache.org>.
On Fri, 14 Dec 2001 11:42, Scott Stirling wrote:
> I totally agree. I asked for this a long time ago when I began a Jakarta
> tag library called "gnat" implementing several of the Ant tasks as JSP tags
> (a lot of the tasks make perfect tags for doing build and file related
> tasks from a Web app). I would much rather have found that tasks were
> somewhat decoupled from Ant or even invocable via an API. But they are
> pretty tight with the Project class, among other things.
yep ;(
> The general response was that Myrmidon (IIRC), one of the Ant 2.0
> proposals, took some of these things into account. Whichever proposal it
> was, it was Peter Donald's. He has advocated this for a long time (before
> I came along).
Still advocating :)
--
Cheers,
Pete
When a stupid man is doing something he's ashamed of, he always
declares that it is his duty.
George Bernard Shaw
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: invocation api
Posted by Scott Stirling <sc...@rcn.com>.
I totally agree. I asked for this a long time ago when I began a Jakarta tag
library called "gnat" implementing several of the Ant tasks as JSP tags (a lot
of the tasks make perfect tags for doing build and file related tasks from a Web
app). I would much rather have found that tasks were somewhat decoupled from
Ant or even invocable via an API. But they are pretty tight with the Project
class, among other things.
The general response was that Myrmidon (IIRC), one of the Ant 2.0 proposals,
took some of these things into account. Whichever proposal it was, it was Peter
Donald's. He has advocated this for a long time (before I came along).
Scott Stirling
Framingham, MA
> -----Original Message-----
> From: Adam Murdoch [mailto:adammurdoch_ml@yahoo.com]
>
> Hi,
>
> I'd like to suggest another item for the Ant1.9 action list: An invocation
> API which would allow Ant to be embedded inside other apps (such as GUIs,
> IDEs, build schedulers, build servlets, etc).
>
> Right now, invoking Ant is not as clean as it could be - for example, you
> can use Main.start() and give up control over a bunch of things, or you can
> copy and hack Main. The goal of this task is to come up with a cleaner and
> more flexible way of doing this, by pushing the container related code from
> Main and Project behind an API.
>
> This task would involve putting together an API which would allow an app to:
>
> - Create a project from a bunch of sources - file, InputStream, URL, SAX
> events, etc.
> - Configure a project:
> - set classloader.
> - set user properties.
> - add task and datatype definitions.
> - add/remove listeners
> - add/remove loggers.
> - Get meta-info about the targets in the project (just a tiny subset for
> now):
> - name
> - description
> - Execute a task, or a set of tasks.
>
> There's a bunch of extra stuff an invocation API *could* do - I wanted to
> keep the initial list short and reasonably well-defined. Some things that
> might be good to add later:
>
> - A similar API that a task can use to invoke a target in either the same
> project or another project.
> - Adding tasklibs, vfs mount points, etc.
> - Managing the project definition: things like adding and removing targets
> and tasks, setting task attributes, etc.
> - Expose a more general task engine API.
>
> Any interest in something like this? I'd be happy to do the work.
>
>
> Adam
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>