You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by di...@multitask.com.au on 2002/12/31 04:48:44 UTC
[jelly] maven CVS HEAD broken site:generate fix
I think I've fixed this bug for Windows, but not for Unix/Mac (or any os
with / starting paths).
I didn't want to break the existing behaviour which treats any 'uri'
starting with '/' as a resource, rather than as a file.
I can always put the file check before the resource if this wont break
anything else in jelly.
--
dIon Gillard, Multitask Consulting
Blog: http://www.freeroller.net/page/dion/Weblog
Work: http://www.multitask.com.au
robert burrell donkin <ro...@blueyonder.co.uk> wrote on
25/12/2002 12:48:07 AM:
> when i rebuilt maven from CVS HEAD, i found that the betwixt
site:generate
> was broken. i run macOSX and java 1.3.
>
> i found that the same problem occurred when i tried to execute
> site:generate for maven and so i debugged it there. here's the messages
> containing the exception:
>
> xdoc:jelly-transform:
> [echo] Generating
> /Volumes/gSpecials/library/jakarta/jakarta-turbine-
> maven/target/docs/changelog.html from
> /Volumes/gSpecials/library/jakarta/jakarta-turbine-
> maven/target/generated-xdocs/changelog.xml
>
> [ERROR] BUILD FAILED
> [ERROR] /Volumes/gSpecials/library/jakarta/jakarta-turbine-
> maven/Volumes/gSpecials/library/jakarta/jakarta-turbine-
> maven/xdocs/navigation.xml (No such file or directory) Nested exception:
>
/Volumes/gSpecials/library/jakarta/jakarta-turbine-maven/Volumes/gSpecials/
> library/jakarta/jakarta-turbine-maven/xdocs/navigation.xml (No such file
> or directory)
>
> i tracked the problem down to the plugin.jelly for the xdocs plug in.
the
> navigation file is searched for in various locations and ends up with an
> absolute path. it's then passed into a parse tag from the jelly xml
> library. this assumes that all paths starting with a '/' are relative to
> the jelly context base directory. that would seem to explain the
exception
> above.
>
> the attached patch create the path into a proper file URL. it fixed the
> problem for me. i can't think of a good way to test this so i haven't
> created a test case.
>
> - robert
>
> [attachment "plugin.patch" deleted by dIon Gillard/Multitask
Consulting/AU] --
> To unsubscribe, e-mail: <mailto:turbine-maven-dev-
> unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:turbine-maven-dev-
> help@jakarta.apache.org>
> ForwardSourceID:NT0009C016
Re: [jelly] maven CVS HEAD broken site:generate fix
Posted by James Strachan <ja...@yahoo.co.uk>.
From: <di...@multitask.com.au>
> James,
>
> I'm happy to get rid of the added code in the uri handling.
>
> It'll mean a quick change to maven's xdoc plugin, but that's no problem @
> the mo.
Great stuff - thanks.
Lemme know if you need any help.
James
-------
http://radio.weblogs.com/0112098/
__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: [jelly] maven CVS HEAD broken site:generate fix
Posted by di...@multitask.com.au.
James,
I'm happy to get rid of the added code in the uri handling.
It'll mean a quick change to maven's xdoc plugin, but that's no problem @
the mo.
--
dIon Gillard, Multitask Consulting
Blog: http://www.freeroller.net/page/dion/Weblog
Work: http://www.multitask.com.au
"James Strachan" <ja...@yahoo.co.uk> wrote on 31/12/2002 10:23:33
PM:
> I've just modified the <x:parse> tag so that it accepts File objects. So
if
> you're iterating over files you can just pass in the file object
directly.
>
> e.g.
>
> <fileScanner var="myFiles">
> <fileset dir="${foo}">
> <patternset>
> <include name="**/*.xml" />
> </patternset>
> </fileset>
> </fileScanner>
>
> <j:forEach var="myFile" items="${myFiles.iterator()}">
> <x:parse var="doc" xml="${myFile}"/>
>
> <!-- now process the file with XPath... -->
> <x:forEach select="$doc//foo">
> <x:if test="bar[@x='1']">
> ...
> </x:if>
> </x:forEach>
> </j:forEach>
>
> So possibly a neater fix to the original problem raised below would be
to
> leave the URI handling as it was and just to pass in the File object in
the
> plugin when an absolute file name is required?
>
> The only problem could be is if you have a String which you know its a
File,
> in which case you need to either use a helper method or some Jelly
script to
> turn the String into a File. e.g.
>
> <j:new var="myFile" className="java.io.File">
> <j:arg value="${someFileName}"/>
> </j:new>
>
> James
> -------
> http://radio.weblogs.com/0112098/
> ----- Original Message -----
> From: <di...@multitask.com.au>
> To: "Turbine Maven Developers List"
<tu...@jakarta.apache.org>
> Cc: <co...@jakarta.apache.org>
> Sent: Tuesday, December 31, 2002 3:48 AM
> Subject: [jelly] maven CVS HEAD broken site:generate fix
>
>
> > I think I've fixed this bug for Windows, but not for Unix/Mac (or any
os
> > with / starting paths).
> >
> > I didn't want to break the existing behaviour which treats any 'uri'
> > starting with '/' as a resource, rather than as a file.
> >
> > I can always put the file check before the resource if this wont break
> > anything else in jelly.
> > --
> > dIon Gillard, Multitask Consulting
> > Blog: http://www.freeroller.net/page/dion/Weblog
> > Work: http://www.multitask.com.au
> >
> >
> > robert burrell donkin <ro...@blueyonder.co.uk> wrote on
> > 25/12/2002 12:48:07 AM:
> >
> > > when i rebuilt maven from CVS HEAD, i found that the betwixt
> > site:generate
> > > was broken. i run macOSX and java 1.3.
> > >
> > > i found that the same problem occurred when i tried to execute
> > > site:generate for maven and so i debugged it there. here's the
messages
> > > containing the exception:
> > >
> > > xdoc:jelly-transform:
> > > [echo] Generating
> > > /Volumes/gSpecials/library/jakarta/jakarta-turbine-
> > > maven/target/docs/changelog.html from
> > > /Volumes/gSpecials/library/jakarta/jakarta-turbine-
> > > maven/target/generated-xdocs/changelog.xml
> > >
> > > [ERROR] BUILD FAILED
> > > [ERROR] /Volumes/gSpecials/library/jakarta/jakarta-turbine-
> > > maven/Volumes/gSpecials/library/jakarta/jakarta-turbine-
> > > maven/xdocs/navigation.xml (No such file or directory) Nested
exception:
> >
> > >
> >
>
/Volumes/gSpecials/library/jakarta/jakarta-turbine-maven/Volumes/gSpecials/
> > > library/jakarta/jakarta-turbine-maven/xdocs/navigation.xml (No such
file
> >
> > > or directory)
> > >
> > > i tracked the problem down to the plugin.jelly for the xdocs plug
in.
> > the
> > > navigation file is searched for in various locations and ends up
with an
> >
> > > absolute path. it's then passed into a parse tag from the jelly xml
> > > library. this assumes that all paths starting with a '/' are
relative to
> >
> > > the jelly context base directory. that would seem to explain the
> > exception
> > > above.
> > >
> > > the attached patch create the path into a proper file URL. it fixed
the
> > > problem for me. i can't think of a good way to test this so i
haven't
> > > created a test case.
> > >
> > > - robert
> > >
> > > [attachment "plugin.patch" deleted by dIon Gillard/Multitask
> > Consulting/AU] --
> > > To unsubscribe, e-mail: <mailto:turbine-maven-dev-
> > > unsubscribe@jakarta.apache.org>
> > > For additional commands, e-mail: <mailto:turbine-maven-dev-
> > > help@jakarta.apache.org>
> > > ForwardSourceID:NT0009C016
> >
> > --
> > To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> >
>
> __________________________________________________
> Do You Yahoo!?
> Everything you'll ever need on one web page
> from News and Sport to Email and Music Charts
> http://uk.my.yahoo.com
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
> ForwardSourceID:NT0009D79E
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: [jelly] maven CVS HEAD broken site:generate fix
Posted by James Strachan <ja...@yahoo.co.uk>.
I've just modified the <x:parse> tag so that it accepts File objects. So if
you're iterating over files you can just pass in the file object directly.
e.g.
<fileScanner var="myFiles">
<fileset dir="${foo}">
<patternset>
<include name="**/*.xml" />
</patternset>
</fileset>
</fileScanner>
<j:forEach var="myFile" items="${myFiles.iterator()}">
<x:parse var="doc" xml="${myFile}"/>
<!-- now process the file with XPath... -->
<x:forEach select="$doc//foo">
<x:if test="bar[@x='1']">
...
</x:if>
</x:forEach>
</j:forEach>
So possibly a neater fix to the original problem raised below would be to
leave the URI handling as it was and just to pass in the File object in the
plugin when an absolute file name is required?
The only problem could be is if you have a String which you know its a File,
in which case you need to either use a helper method or some Jelly script to
turn the String into a File. e.g.
<j:new var="myFile" className="java.io.File">
<j:arg value="${someFileName}"/>
</j:new>
James
-------
http://radio.weblogs.com/0112098/
----- Original Message -----
From: <di...@multitask.com.au>
To: "Turbine Maven Developers List" <tu...@jakarta.apache.org>
Cc: <co...@jakarta.apache.org>
Sent: Tuesday, December 31, 2002 3:48 AM
Subject: [jelly] maven CVS HEAD broken site:generate fix
> I think I've fixed this bug for Windows, but not for Unix/Mac (or any os
> with / starting paths).
>
> I didn't want to break the existing behaviour which treats any 'uri'
> starting with '/' as a resource, rather than as a file.
>
> I can always put the file check before the resource if this wont break
> anything else in jelly.
> --
> dIon Gillard, Multitask Consulting
> Blog: http://www.freeroller.net/page/dion/Weblog
> Work: http://www.multitask.com.au
>
>
> robert burrell donkin <ro...@blueyonder.co.uk> wrote on
> 25/12/2002 12:48:07 AM:
>
> > when i rebuilt maven from CVS HEAD, i found that the betwixt
> site:generate
> > was broken. i run macOSX and java 1.3.
> >
> > i found that the same problem occurred when i tried to execute
> > site:generate for maven and so i debugged it there. here's the messages
> > containing the exception:
> >
> > xdoc:jelly-transform:
> > [echo] Generating
> > /Volumes/gSpecials/library/jakarta/jakarta-turbine-
> > maven/target/docs/changelog.html from
> > /Volumes/gSpecials/library/jakarta/jakarta-turbine-
> > maven/target/generated-xdocs/changelog.xml
> >
> > [ERROR] BUILD FAILED
> > [ERROR] /Volumes/gSpecials/library/jakarta/jakarta-turbine-
> > maven/Volumes/gSpecials/library/jakarta/jakarta-turbine-
> > maven/xdocs/navigation.xml (No such file or directory) Nested exception:
>
> >
>
/Volumes/gSpecials/library/jakarta/jakarta-turbine-maven/Volumes/gSpecials/
> > library/jakarta/jakarta-turbine-maven/xdocs/navigation.xml (No such file
>
> > or directory)
> >
> > i tracked the problem down to the plugin.jelly for the xdocs plug in.
> the
> > navigation file is searched for in various locations and ends up with an
>
> > absolute path. it's then passed into a parse tag from the jelly xml
> > library. this assumes that all paths starting with a '/' are relative to
>
> > the jelly context base directory. that would seem to explain the
> exception
> > above.
> >
> > the attached patch create the path into a proper file URL. it fixed the
> > problem for me. i can't think of a good way to test this so i haven't
> > created a test case.
> >
> > - robert
> >
> > [attachment "plugin.patch" deleted by dIon Gillard/Multitask
> Consulting/AU] --
> > To unsubscribe, e-mail: <mailto:turbine-maven-dev-
> > unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail: <mailto:turbine-maven-dev-
> > help@jakarta.apache.org>
> > ForwardSourceID:NT0009C016
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com
Re: [jelly] maven CVS HEAD broken site:generate fix
Posted by James Strachan <ja...@yahoo.co.uk>.
I've just modified the <x:parse> tag so that it accepts File objects. So if
you're iterating over files you can just pass in the file object directly.
e.g.
<fileScanner var="myFiles">
<fileset dir="${foo}">
<patternset>
<include name="**/*.xml" />
</patternset>
</fileset>
</fileScanner>
<j:forEach var="myFile" items="${myFiles.iterator()}">
<x:parse var="doc" xml="${myFile}"/>
<!-- now process the file with XPath... -->
<x:forEach select="$doc//foo">
<x:if test="bar[@x='1']">
...
</x:if>
</x:forEach>
</j:forEach>
So possibly a neater fix to the original problem raised below would be to
leave the URI handling as it was and just to pass in the File object in the
plugin when an absolute file name is required?
The only problem could be is if you have a String which you know its a File,
in which case you need to either use a helper method or some Jelly script to
turn the String into a File. e.g.
<j:new var="myFile" className="java.io.File">
<j:arg value="${someFileName}"/>
</j:new>
James
-------
http://radio.weblogs.com/0112098/
----- Original Message -----
From: <di...@multitask.com.au>
To: "Turbine Maven Developers List" <tu...@jakarta.apache.org>
Cc: <co...@jakarta.apache.org>
Sent: Tuesday, December 31, 2002 3:48 AM
Subject: [jelly] maven CVS HEAD broken site:generate fix
> I think I've fixed this bug for Windows, but not for Unix/Mac (or any os
> with / starting paths).
>
> I didn't want to break the existing behaviour which treats any 'uri'
> starting with '/' as a resource, rather than as a file.
>
> I can always put the file check before the resource if this wont break
> anything else in jelly.
> --
> dIon Gillard, Multitask Consulting
> Blog: http://www.freeroller.net/page/dion/Weblog
> Work: http://www.multitask.com.au
>
>
> robert burrell donkin <ro...@blueyonder.co.uk> wrote on
> 25/12/2002 12:48:07 AM:
>
> > when i rebuilt maven from CVS HEAD, i found that the betwixt
> site:generate
> > was broken. i run macOSX and java 1.3.
> >
> > i found that the same problem occurred when i tried to execute
> > site:generate for maven and so i debugged it there. here's the messages
> > containing the exception:
> >
> > xdoc:jelly-transform:
> > [echo] Generating
> > /Volumes/gSpecials/library/jakarta/jakarta-turbine-
> > maven/target/docs/changelog.html from
> > /Volumes/gSpecials/library/jakarta/jakarta-turbine-
> > maven/target/generated-xdocs/changelog.xml
> >
> > [ERROR] BUILD FAILED
> > [ERROR] /Volumes/gSpecials/library/jakarta/jakarta-turbine-
> > maven/Volumes/gSpecials/library/jakarta/jakarta-turbine-
> > maven/xdocs/navigation.xml (No such file or directory) Nested exception:
>
> >
>
/Volumes/gSpecials/library/jakarta/jakarta-turbine-maven/Volumes/gSpecials/
> > library/jakarta/jakarta-turbine-maven/xdocs/navigation.xml (No such file
>
> > or directory)
> >
> > i tracked the problem down to the plugin.jelly for the xdocs plug in.
> the
> > navigation file is searched for in various locations and ends up with an
>
> > absolute path. it's then passed into a parse tag from the jelly xml
> > library. this assumes that all paths starting with a '/' are relative to
>
> > the jelly context base directory. that would seem to explain the
> exception
> > above.
> >
> > the attached patch create the path into a proper file URL. it fixed the
> > problem for me. i can't think of a good way to test this so i haven't
> > created a test case.
> >
> > - robert
> >
> > [attachment "plugin.patch" deleted by dIon Gillard/Multitask
> Consulting/AU] --
> > To unsubscribe, e-mail: <mailto:turbine-maven-dev-
> > unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail: <mailto:turbine-maven-dev-
> > help@jakarta.apache.org>
> > ForwardSourceID:NT0009C016
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>