You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Yves Martin <yv...@elca.ch> on 2005/11/04 10:09:05 UTC
Support any type inclusion
Hello,
I'm writing a task in which I would like to be able to include any 'DataType'
implementation, whatever its tag name is - exactly the same way the
TaskContainer.addTask work but for DataType only.
I have tried add(DataType) but it does not work (or I made a mistake) with
Ant 1.6.5
Is it really possible ?
Thank you in advance
--
Yves Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: Support any type inclusion
Posted by Yves Martin <yv...@elca.ch>.
Yves Martin <yv...@elca.ch> writes:
> Stefan Bodewig <bo...@apache.org> writes:
>
>> On Fri, 04 Nov 2005, Yves Martin <yv...@elca.ch> wrote:
>>
>>> I have tried add(DataType) but it does not work (or I made a
>>> mistake) with Ant 1.6.5
>>
>> What does "does not work" mean? Do you get an exception? Which? Or
>> does Ant silently process your task but the add method is never
>> called?
>
> My task is 'Plugin' with the method add(DataType userType), defined as
> <antlib:ch.elca.el4ant:plugin>.
>
> The DataType I want to embedded is 'package'... registered as
> "antlib:ch.elca.el4ant.binrelease:package"
>
> Here is the task usage:
> <plugin
> name="binrelease"
> file="buildsystem/tools/binrelease/binrelease.xml"
> xmlns:binrelease="antlib:ch.elca.el4ant.binrelease">
> <attribute
> name="binrelease.default.excludes"
> value="java/**,.classpath,.project,.checkstyle,.externalToolBuilders/**"/>
> <binrelease:package module="helloworldweb" version="0.6"/>
> </plugin>
> I do not understand what I did wrong.
Now, I have understood. The namespace 'antlib:ch.elca.el4ant.binrelease' is
not defined yet, as far as the 'plugin' task is responsible to register it !!
--
Yves Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: Support any type inclusion
Posted by Yves Martin <yv...@elca.ch>.
Stefan Bodewig <bo...@apache.org> writes:
> On Fri, 04 Nov 2005, Yves Martin <yv...@elca.ch> wrote:
>
>> I have tried add(DataType) but it does not work (or I made a
>> mistake) with Ant 1.6.5
>
> What does "does not work" mean? Do you get an exception? Which? Or
> does Ant silently process your task but the add method is never
> called?
My task is 'Plugin' with the method add(DataType userType), defined as
<antlib:ch.elca.el4ant:plugin>.
The DataType I want to embedded is 'package'... registered as
"antlib:ch.elca.el4ant.binrelease:package"
Here is the task usage:
<plugin
name="binrelease"
file="buildsystem/tools/binrelease/binrelease.xml"
xmlns:binrelease="antlib:ch.elca.el4ant.binrelease">
<attribute
name="binrelease.default.excludes"
value="java/**,.classpath,.project,.checkstyle,.externalToolBuilders/**"/>
<binrelease:package module="helloworldweb" version="0.6"/>
</plugin>
And the log in verbose mode... So the 'add' is refused
BUILD FAILED
/home/yma/leaf/leaf3/el4ant/bootstrap.xml:177: The following error occurred while executing this line:
/home/yma/leaf/leaf3/el4ant/project.xml:8: The following error occurred while executing this line:
/home/yma/leaf/leaf3/el4ant/plugins.xml:167: The <antlib:ch.elca.el4ant:plugin> type doesn't support the nested "antlib:ch.elca.el4ant.binrelease:package" element.
at org.apache.tools.ant.ProjectHelper.addLocationToBuildException(ProjectHelper.java:539)
at ch.elca.el4ant.taskdefs.LoadProjectTask.execute(LoadProjectTask.java:125)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
I do not understand what I did wrong.
Thank you in advance
--
Yves Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: Support any type inclusion
Posted by Stefan Bodewig <bo...@apache.org>.
On Fri, 04 Nov 2005, Yves Martin <yv...@elca.ch> wrote:
> I have tried add(DataType) but it does not work (or I made a
> mistake) with Ant 1.6.5
What does "does not work" mean? Do you get an exception? Which? Or
does Ant silently process your task but the add method is never
called?
Stefan
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: Support any type inclusion
Posted by Matt Benson <gu...@yahoo.com>.
--- Yves Martin <yv...@elca.ch> wrote:
>
> Hello,
>
> I'm writing a task in which I would like to be able
> to include any 'DataType'
> implementation, whatever its tag name is - exactly
> the same way the
> TaskContainer.addTask work but for DataType only.
>
> I have tried add(DataType) but it does not work
> (or I made a mistake) with
> Ant 1.6.5
>
> Is it really possible ?
This should work, so you must have made a mistake. :)
-Matt
> Thank you in advance
> --
> Yves Martin
>
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> user-help@ant.apache.org
>
>
__________________________________
Start your day with Yahoo! - Make it your home page!
http://www.yahoo.com/r/hs
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org