You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by Ross Gardler <rg...@apache.org> on 2008/09/10 00:26:04 UTC
Resolving relative locations in the locationmap
I've hit a problem with my work on multiple site integration in the
whiteboard. I thought it was all going too well ;-)
I've got a site that is made up of 1 master site and 3 sub sites. The
process for doing this is documented in the sample in whiteboard. The
primary trick is a locationmap that "mounts" the sub sites.
In my worksite I've done this with relative paths and it worked great.
That is, subsiteA is "mounted" from "../../../subsiteA".
Unfortunately someone else has just tried to build this on their machine
and it doesn't work.
After some digging I discovered that the resolved location from the
sitemap is relative to the Forrest install not the site being built.
i.e. instead of
"/mysite/src/documentation/content/../../../../subsiteA..." we get
"/forrest/src/documentation/content/../../../../subsiteA..."
On my machine this works because Forrest is at the same directory depth
as my master site. On my colleagues machine this is not the case and so
it fails.
So, my question is. How can I get the location of the locationmap file
itself for use in these relative matches?
Ross
Re: Resolving relative locations in the locationmap
Posted by Ross Gardler <rg...@apache.org>.
Thorsten Scherler wrote:
> On Wed, 2008-09-10 at 08:56 +0100, Ross Gardler wrote:
...
>> This is the first time in years I broke my rule of "if struggling for
>> more than 30 mins to figure it out, ask on the list" - good to have it
>> reaffirmed occasionally.
>
> Yeah, lists are just great. How many times I solved my problem starting
> a mail and with reading what I wrote I actually found the solution (even
> without sending the mail).
That's the other advantage of course. Must put that in our (OSS Watch)
upcoming briefing doc on why to work with the community mailing lists.
Ross
Re: Resolving relative locations in the locationmap
Posted by Thorsten Scherler <th...@juntadeandalucia.es>.
On Wed, 2008-09-10 at 08:56 +0100, Ross Gardler wrote:
> Thorsten Scherler wrote:
> > On Tue, 2008-09-09 at 23:26 +0100, Ross Gardler wrote:
>
> ...
>
> >> So, my question is. How can I get the location of the locationmap file
> >> itself for use in these relative matches?
> >
> > Have you tried {properties:home}../../../subsiteA ?
> >
> > IMO should work as I understand your mail.
>
> AhHa - of course, that should work. Sometimes new eyes are what is
> needed, I spent hours trying to find a way of getting it out of our Java
> code last night.
>
> This is the first time in years I broke my rule of "if struggling for
> more than 30 mins to figure it out, ask on the list" - good to have it
> reaffirmed occasionally.
Yeah, lists are just great. How many times I solved my problem starting
a mail and with reading what I wrote I actually found the solution (even
without sending the mail).
>
> Thanks Thorsten.
You are very welcome.
salu2
> Ross
--
Thorsten Scherler thorsten.at.apache.org
Open Source Java consulting, training and solutions
Re: Resolving relative locations in the locationmap
Posted by Ross Gardler <rg...@apache.org>.
Thorsten Scherler wrote:
> On Tue, 2008-09-09 at 23:26 +0100, Ross Gardler wrote:
...
>> So, my question is. How can I get the location of the locationmap file
>> itself for use in these relative matches?
>
> Have you tried {properties:home}../../../subsiteA ?
>
> IMO should work as I understand your mail.
AhHa - of course, that should work. Sometimes new eyes are what is
needed, I spent hours trying to find a way of getting it out of our Java
code last night.
This is the first time in years I broke my rule of "if struggling for
more than 30 mins to figure it out, ask on the list" - good to have it
reaffirmed occasionally.
Thanks Thorsten.
Ross
Re: Resolving relative locations in the locationmap
Posted by Thorsten Scherler <th...@apache.org>.
On Tue, 2008-09-09 at 23:26 +0100, Ross Gardler wrote:
> I've hit a problem with my work on multiple site integration in the
> whiteboard. I thought it was all going too well ;-)
>
> I've got a site that is made up of 1 master site and 3 sub sites. The
> process for doing this is documented in the sample in whiteboard. The
> primary trick is a locationmap that "mounts" the sub sites.
>
> In my worksite I've done this with relative paths and it worked great.
> That is, subsiteA is "mounted" from "../../../subsiteA".
>
> Unfortunately someone else has just tried to build this on their machine
> and it doesn't work.
>
> After some digging I discovered that the resolved location from the
> sitemap is relative to the Forrest install not the site being built.
>
> i.e. instead of
> "/mysite/src/documentation/content/../../../../subsiteA..." we get
> "/forrest/src/documentation/content/../../../../subsiteA..."
>
> On my machine this works because Forrest is at the same directory depth
> as my master site. On my colleagues machine this is not the case and so
> it fails.
>
> So, my question is. How can I get the location of the locationmap file
> itself for use in these relative matches?
Have you tried {properties:home}../../../subsiteA ?
IMO should work as I understand your mail.
salu2
> Ross
--
Thorsten Scherler thorsten.at.apache.org
Open Source Java consulting, training and solutions