ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stephan beal <step...@wanderinghorse.net>
Subject Re: Ant object idea
Date Fri, 22 Mar 2002 03:20:58 GMT
On Friday 22 March 2002 03:53, i wrote:
> It seems to me like that would make cross-project-file interaction
> relatively simple.
>
> Or am i way behind here?

And that would allow loading "libraries" of pre-configured tasks from xml
files in a classloader-like manner...

Inside a task, we could do the following:

Project sharedtasks = getProject().getAnt().getProject( "sharedtasks.xml" );
Task task = sharedtasks.getTask( "somecooltask" );
task.setProject( getProject() ); // ??? depends on task, i guess.
task->execute();

(error checking left out for clarity)

or:
Project sharedtasks = getProject().getAnt().getProject( "sharedtasks.xml" );
Task task = sharedtasks.getTask( "SomeSuperIncredibleTask" );
if( task instanceof SomeSuperIncredibleTask ) {
...
}


am i making any sense?

----- stephan@wanderinghorse.net
http://qub.sourceforge.net  - http://radioaqtiph.sourceforge.net
http://www.countermoves.net - http://stephan.rootonfire.org
"Unix: the shell is your oyster."

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


Mime
View raw message