Hi My ant build script snippest looks like this.
<copy todir="${warDir}/WEB-INF/classes">
<fileset dir="${classdir}" includes="**/*.class" />
</copy>
I'm getting this error message when I execute ant against this build.xml
The <copy> type doesn't support nested text data (" ").
Can someone point out the issue I'm using fedora 16 and ant distribution 1.7.0
I figure out the issue. I
copied the content and pasted in the vim editor
, there were some garbage character due to encoding which was invisible. If whole content is typed in vim editor without copying it works fine.
It looks like this is due to the parser encountering a bad character. Inside the parenthesis at the end of the error, it tells you what the problem character is. I encountered the same problem, due to a bad copy-paste (a semicolon got introduced at the end of an element).
Can't reproduce your problem. Perhaps this error is being reported against a different copy task within your build?
ANT normally throws this error message, when you've incorrectly specified your ANT task.
For example:
<copy> todir="${warDir}/WEB-INF/classes"
<fileset dir="${classdir}" includes="**/*.class" />
</copy>
ANT doesn't like this because the "todir" parameter is now within the body of the tag, instead of being specified as an XML attribute.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With