You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Yves Martin <yv...@elca.ch> on 2005/09/05 12:23:47 UTC
Task writing: generic type support
Hello,
I find the 'addTask(Task)' support really interesting for a task - used to
embed any task in parallel for instance.
I tried to use 'addDataType(DataType)' in my own task to embed any DataType in
my task... and it does not seem to work. Have I done a mistake ? Or such a
method is not supported ?
Thank you in advance for your help
--
Yves Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
Re: Task writing: generic type support
Posted by Yves Martin <yv...@elca.ch>.
Steve Loughran <st...@apache.org> writes:
>> My issue comes from my build system architecture:
>> - a main Ant project parse a XML configuration file which is a Ant build
>> file
>> itself, and where I would like to make available custom DataType in a
>> specific antlib/namespace
>> - a plugin is a Ant project which is able to do anything it wants. Like
>> taskdef and typedef...
>> The plugin project has been "forked" from the main Ant project. How can I
>> (programmatically speaking) transfer taskdef/typedef from the plugin project
>> to the main project ?
>
> you can't --that is what "forking" implies. you are operating within a new
> environment.
Ok I know it is not cleaned - regarded the Ant task development
guidelines. I'm working on 'el4ant' (sourceforge) and I need some extract
features in Ant for my build.xml generation from project description works
smoothly. I have "misuse" Ant to parse my project description XML files and
it is really convenient in fact ;)
My question may be simpler:
- How can I copy tasks and types from one Ant project to another ?
It is simple to do that with properties. I suppose it is not impossible to do
that with tasks/types. I just ask for help to avoid to "waste" time into Ant
internals hacking... but I will do it in case of non response.
Thank you for your help
--
Yves Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
Re: Task writing: generic type support
Posted by Steve Loughran <st...@apache.org>.
Yves Martin wrote:
> Steve Loughran <st...@apache.org> writes:
>
>
>>> I have also found another issue in my code: my 'typedef' is done in a "child"
>>> Ant Project... not in the parent Ant Project which uses this type.
>>> Is there a "standard" way to propagate typedef/taskdef/antlib from a project
>>> to another project ? Of course, I have access to ClassLoader and anything I
>>> want...
>>
>>you need to use <import> to pull the child build file into your project, not
>><ant>.
>
>
> Thank you for this option but it is not enough for me.
>
> My issue comes from my build system architecture:
>
> - a main Ant project parse a XML configuration file which is a Ant build file
> itself, and where I would like to make available custom DataType in a
> specific antlib/namespace
>
> - a plugin is a Ant project which is able to do anything it wants. Like
> taskdef and typedef...
>
> The plugin project has been "forked" from the main Ant project. How can I
> (programmatically speaking) transfer taskdef/typedef from the plugin project
> to the main project ?
you can't --that is what "forking" implies. you are operating within a
new environment.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
Re: Task writing: generic type support
Posted by Yves Martin <yv...@elca.ch>.
Steve Loughran <st...@apache.org> writes:
>> I have also found another issue in my code: my 'typedef' is done in a "child"
>> Ant Project... not in the parent Ant Project which uses this type.
>> Is there a "standard" way to propagate typedef/taskdef/antlib from a project
>> to another project ? Of course, I have access to ClassLoader and anything I
>> want...
>
> you need to use <import> to pull the child build file into your project, not
> <ant>.
Thank you for this option but it is not enough for me.
My issue comes from my build system architecture:
- a main Ant project parse a XML configuration file which is a Ant build file
itself, and where I would like to make available custom DataType in a
specific antlib/namespace
- a plugin is a Ant project which is able to do anything it wants. Like
taskdef and typedef...
The plugin project has been "forked" from the main Ant project. How can I
(programmatically speaking) transfer taskdef/typedef from the plugin project
to the main project ?
Regards,
--
Yves Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
Re: Task writing: generic type support
Posted by Steve Loughran <st...@apache.org>.
Yves Martin wrote:
> Antoine Levy-Lambert <an...@gmx.de> writes:
>
>
>>Hello Yves,
>>
>>AFAIK add(DataType) would work. This would map any nested element
>>containing a type defined using typedef, which is an instance of DataType.
>>
>>addDataType(DataType) implies that you are mapping the <datatype/>
>>nested element to adding datatypes in your class.
>
>
> Hello,
>
> Thank you for your answer.
>
> I have also found another issue in my code: my 'typedef' is done in a "child"
> Ant Project... not in the parent Ant Project which uses this type.
>
> Is there a "standard" way to propagate typedef/taskdef/antlib from a project
> to another project ? Of course, I have access to ClassLoader and anything I
> want...
you need to use <import> to pull the child build file into your project,
not <ant>.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
Re: Task writing: generic type support
Posted by Yves Martin <yv...@elca.ch>.
Antoine Levy-Lambert <an...@gmx.de> writes:
> Hello Yves,
>
> AFAIK add(DataType) would work. This would map any nested element
> containing a type defined using typedef, which is an instance of DataType.
>
> addDataType(DataType) implies that you are mapping the <datatype/>
> nested element to adding datatypes in your class.
Hello,
Thank you for your answer.
I have also found another issue in my code: my 'typedef' is done in a "child"
Ant Project... not in the parent Ant Project which uses this type.
Is there a "standard" way to propagate typedef/taskdef/antlib from a project
to another project ? Of course, I have access to ClassLoader and anything I
want...
Regards,
--
Yves Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
Re: Task writing: generic type support
Posted by Antoine Levy-Lambert <an...@gmx.de>.
Hello Yves,
AFAIK add(DataType) would work. This would map any nested element
containing a type defined using typedef, which is an instance of DataType.
addDataType(DataType) implies that you are mapping the <datatype/>
nested element to adding datatypes in your class.
Cheers,
Antoine
Yves Martin wrote:
> Hello,
>
> I find the 'addTask(Task)' support really interesting for a task - used to
> embed any task in parallel for instance.
>
> I tried to use 'addDataType(DataType)' in my own task to embed any DataType in
> my task... and it does not seem to work. Have I done a mistake ? Or such a
> method is not supported ?
>
> Thank you in advance for your help
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
Re: Task writing: generic type support
Posted by Jeffrey E Care <ca...@us.ibm.com>.
I think you are looking for "add(DataType)"...
--
Jeffrey E. Care (carej@us.ibm.com)
WebSphere v7 Release Engineer
WebSphere Build Tooling Lead (Project Mantis)
Yves Martin <yv...@elca.ch> wrote on 09/05/2005 06:23:47 AM:
>
> Hello,
>
> I find the 'addTask(Task)' support really interesting for a task - used
to
> embed any task in parallel for instance.
>
> I tried to use 'addDataType(DataType)' in my own task to embed any
> DataType in
> my task... and it does not seem to work. Have I done a mistake ? Or
such a
> method is not supported ?
>
> Thank you in advance for your help
> --
> Yves Martin
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
>