You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Mansour Al Akeel <ma...@gmail.com> on 2012/01/10 12:36:27 UTC

Nested type as an Integer

In a custom task, I need to use a nested element to set the port number.
The nested element looks like this:

<c:myCustomTask>
<port>9090</port>
<context>myApplication</context>
</c:myCustomTask>

The problem I am getting is:

build.xml:76: class java.lang.String doesn't support nested text data
("myApplication").

at
org.apache.tools.ant.IntrospectionHelper.addText(IntrospectionHelper.java:464)
        at
org.apache.tools.ant.ProjectHelper.addText(ProjectHelper.java:384)
        at
org.apache.tools.ant.RuntimeConfigurable.maybeConfigure(RuntimeConfigurable.java:413)
        at
org.apache.tools.ant.RuntimeConfigurable.maybeConfigure(RuntimeConfigurable.java:344)


And the same thing for the port.What type of objects I need to use to set
these values ?
Thank you.