On Wed, 24 Sep 2003 11:35 am, [EMAIL PROTECTED] wrote:
> Why not just use the maven makeRelativePath tag?
Hmm, firstly because I didn't know it existed, secondly because I am actually
trying to do something more complicated, and thirdly because I really want to
grok how this Jelly coding works. It gets more mysterious, this problem.
I am currently trying this:
<j:forEach var="file" items="${extensionXmlFiles.iterator()}">
<ant:echo>File is ${file}</ant:echo>
<j:set var="srcDir" value="${basedir}/src" />
<j:set var="junk" value="${srcDir}/" />
<j:set var="relative"
value="${file.getAbsolutePath().substring(junk.length())}" />
<j:set var="end" value="${relative.length() - 13}" />
<ant:echo>end is ${end}</ant:echo>
<j:set var="root" value="${relative.substring(0,end)}" />
<ant:echo>Root is ${root}</ant:echo>
</j:forEach>
I get a correct value for end, but an incorrect value for root (i.e. ""). The
exception in maven.log is "java.lang.NumberFormatException: excludes", to
which I say "what the?". I really don't get it right now.
I'll look up makeRelativePath in case there is also a
"doExactlyWhatJohnIsTryingToAchieve" tag in there as well. You never know
your luck...
John
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]