Why not just use the maven makeRelativePath tag?
--
dIon Gillard, Multitask Consulting
Blog:      http://blogs.codehaus.org/people/dion/


John Farrell <[EMAIL PROTECTED]> wrote on 24/09/2003 11:25:20 AM:

> I am writing Jelly code like this:
> 
>         <ant:fileScanner var="extensionXmlFiles">
>             <ant:fileset dir="${basedir}/src">
>                 <ant:patternset>
>                     <ant:include name="**/extension.xml"/>
>                </ant:patternset>
>             </ant:fileset>
>         </ant:fileScanner>
> 
>         <j:forEach var="file" items="${extensionXmlFiles.iterator()}">
>             <ant:echo>File is ${file}</ant:echo>
>             <j:set var="srcDir" value="${basedir}/src" />
>             <j:set var="relative" 
> value="${file.getAbsolutePath().substring(srcDir.length() + 1)}" />
>             <ant:echo>Relative is ${relative}</ant:echo>
>         </j:forEach>
> 
> 
> Now when I add the "+1" in, relative is "", but without it relative is 
> correct. My understanding is that there's some sort of error occurring 
in the 
> execution of the Java in the Jelly, but I can't guess what, and -e and 
-X 
> don't tell me anything useful. Is there a way I can find out what is 
going 
> on?
> 
> Thanks,
> 
> John
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to