You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Joseph Milora <jo...@cox.net> on 2003/05/03 10:59:24 UTC

DVSLPathTool.getRelativePath( String basedir, String filename )

I've been having some problems with generating a site using Maven.

All of the directory references in the documentation are wrong. Because of this, the formatting and links
are broken.
For example, in the index.html file I have the following:

               /style/tigris.css instead of  ./style/tigris.css (missing dot)
All of my references are like this.

It looks like the site.jsl file uses DVSLPathTool.getRelativePath(String basedir, String fileName) to retrieve the
relative path and prepend it to the rest of the path. The portion of  getRelativePath that determines that 
an empty string should be returned is:

       if ( basedir == null || basedir.length() == 0 || filename == null
            || filename.length() == 0 || !filename.startsWith( basedir ) )
        {
            return "";
        }

What's causing my project to pass arguments evaluating to an empty string instead of the '.'?
Is there anything in the maven.xml or project.xml file that could cause this?

BTW, I did an echo in the project.xml file and the basedir was the correct value.

Thanks in advance.
Joe Milora

Re: DVSLPathTool.getRelativePath( String basedir, String filename )

Posted by Joseph Milora <jo...@cox.net>.
Ben,

I'm running maven b8 on windows xp with jdk1.4.
One of the echo outputs is
c:/mistura/projects/commons/services/target/generated-xdocs /

c:/mistura/projects/commons/services/target/generated-xdocs/linkcheck.xml

So the getRelativePath shouldn't be returning an empty string.

I don't know if this is relevant, but I have one parent maven project in the
commons directory to generate
all of the child commons. I usually just execute the child project directly,
but the parent project is there
if I need it.

Thanks,
Joe

----- Original Message ----- 
From: "Ben Walding" <de...@walding.com>
To: "Maven Users List" <us...@maven.apache.org>
Sent: Sunday, May 04, 2003 3:20 AM
Subject: Re: DVSLPathTool.getRelativePath( String basedir, String filename )


> It's not in site.jsl - I should have said plugin.jelly
>
> Ben Walding wrote:
>
> > Can you do an echo of the arguments being passed into getRelativePath
> >
> > around line 286 of site.jsl in the xdoc plugin
> > add <echo>${docsForward} / ${outFileForward}</echo>
> >
> > just before <j:set var="relativePath"
> > value="${pathTool.getRelativePath(docsForward, outFileForward)}"/>
> >
> > Also, which platform and build are you running on
> > Maven beta 8 / beta 9
> > eg. Linux / JDK1.x, WinXP, Cygwin JDK 1.x?
> >
> >
> > Joseph Milora wrote:
> >
> >> I've been having some problems with generating a site using Maven.
> >>
> >> All of the directory references in the documentation are wrong.
> >> Because of this, the formatting and links
> >> are broken.
> >> For example, in the index.html file I have the following:
> >>
> >>               /style/tigris.css instead of  ./style/tigris.css
> >> (missing dot)
> >> All of my references are like this.
> >>
> >> It looks like the site.jsl file uses
> >> DVSLPathTool.getRelativePath(String basedir, String fileName) to
> >> retrieve the
> >> relative path and prepend it to the rest of the path. The portion of
> >> getRelativePath that determines that an empty string should be
> >> returned is:
> >>
> >>       if ( basedir == null || basedir.length() == 0 || filename == null
> >>            || filename.length() == 0 || !filename.startsWith( basedir
> >> ) )
> >>        {
> >>            return "";
> >>        }
> >>
> >> What's causing my project to pass arguments evaluating to an empty
> >> string instead of the '.'?
> >> Is there anything in the maven.xml or project.xml file that could
> >> cause this?
> >>
> >> BTW, I did an echo in the project.xml file and the basedir was the
> >> correct value.
> >>
> >> Thanks in advance.
> >> Joe Milora
> >>
> >>
> >>
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: DVSLPathTool.getRelativePath( String basedir, String filename )

Posted by Ben Walding <de...@walding.com>.
It's not in site.jsl - I should have said plugin.jelly

Ben Walding wrote:

> Can you do an echo of the arguments being passed into getRelativePath
>
> around line 286 of site.jsl in the xdoc plugin
> add <echo>${docsForward} / ${outFileForward}</echo>
>
> just before <j:set var="relativePath" 
> value="${pathTool.getRelativePath(docsForward, outFileForward)}"/>
>
> Also, which platform and build are you running on
> Maven beta 8 / beta 9
> eg. Linux / JDK1.x, WinXP, Cygwin JDK 1.x?
>
>
> Joseph Milora wrote:
>
>> I've been having some problems with generating a site using Maven.
>>
>> All of the directory references in the documentation are wrong. 
>> Because of this, the formatting and links
>> are broken.
>> For example, in the index.html file I have the following:
>>
>>               /style/tigris.css instead of  ./style/tigris.css 
>> (missing dot)
>> All of my references are like this.
>>
>> It looks like the site.jsl file uses 
>> DVSLPathTool.getRelativePath(String basedir, String fileName) to 
>> retrieve the
>> relative path and prepend it to the rest of the path. The portion of  
>> getRelativePath that determines that an empty string should be 
>> returned is:
>>
>>       if ( basedir == null || basedir.length() == 0 || filename == null
>>            || filename.length() == 0 || !filename.startsWith( basedir 
>> ) )
>>        {
>>            return "";
>>        }
>>
>> What's causing my project to pass arguments evaluating to an empty 
>> string instead of the '.'?
>> Is there anything in the maven.xml or project.xml file that could 
>> cause this?
>>
>> BTW, I did an echo in the project.xml file and the basedir was the 
>> correct value.
>>
>> Thanks in advance.
>> Joe Milora
>>
>>  
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: DVSLPathTool.getRelativePath( String basedir, String filename )

Posted by Ben Walding <de...@walding.com>.
Can you do an echo of the arguments being passed into getRelativePath

around line 286 of site.jsl in the xdoc plugin
add <echo>${docsForward} / ${outFileForward}</echo>

just before <j:set var="relativePath" 
value="${pathTool.getRelativePath(docsForward, outFileForward)}"/>

Also, which platform and build are you running on
Maven beta 8 / beta 9
eg. Linux / JDK1.x, WinXP, Cygwin JDK 1.x?


Joseph Milora wrote:

>I've been having some problems with generating a site using Maven.
>
>All of the directory references in the documentation are wrong. Because of this, the formatting and links
>are broken.
>For example, in the index.html file I have the following:
>
>               /style/tigris.css instead of  ./style/tigris.css (missing dot)
>All of my references are like this.
>
>It looks like the site.jsl file uses DVSLPathTool.getRelativePath(String basedir, String fileName) to retrieve the
>relative path and prepend it to the rest of the path. The portion of  getRelativePath that determines that 
>an empty string should be returned is:
>
>       if ( basedir == null || basedir.length() == 0 || filename == null
>            || filename.length() == 0 || !filename.startsWith( basedir ) )
>        {
>            return "";
>        }
>
>What's causing my project to pass arguments evaluating to an empty string instead of the '.'?
>Is there anything in the maven.xml or project.xml file that could cause this?
>
>BTW, I did an echo in the project.xml file and the basedir was the correct value.
>
>Thanks in advance.
>Joe Milora
>
>  
>



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org