I'd prefer project-level locationmaps to be overrides or extensions rather than replacements for the app-level locationmap. In other words, with this implementation, the project-level lm assumes all location resolving when it exists even if it only needed to add one unique location resolution. Unfortunately, locationmaps don't have the same concept of "mounting" so that we could simply mount project-level lm's ahead of the app-level one. In other words, I'd like them to work exactly as the project- and forrest-level sitemaps work. Thoughts? --tim
On 7/8/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Author: rgardler > Date: Fri Jul 8 08:40:45 2005 > New Revision: 209820 > > URL: http://svn.apache.org/viewcvs?rev=209820&view=rev > Log: > make backward comppatible by providing a fallback locationmap. This will, be > used to define the default forrest locations for a file. > > Added: > forrest/trunk/main/webapp/locationmap.xml (with props) > Modified: > forrest/trunk/main/webapp/WEB-INF/xconf/forrest-core.xconf > forrest/trunk/main/webapp/sitemap.xmap > > Modified: forrest/trunk/main/webapp/WEB-INF/xconf/forrest-core.xconf > URL: > http://svn.apache.org/viewcvs/forrest/trunk/main/webapp/WEB-INF/xconf/forrest-core.xconf?rev=209820&r1=209819&r2=209820&view=diff > ============================================================================== > --- forrest/trunk/main/webapp/WEB-INF/xconf/forrest-core.xconf (original) > +++ forrest/trunk/main/webapp/WEB-INF/xconf/forrest-core.xconf Fri Jul 8 > 08:40:45 2005 > @@ -129,6 +129,7 @@ > <plugins-src>@forrest.home@/plugins</plugins-src> > > <whiteboard-plugins-src>@forrest.home@/whiteboard/plugins</whiteboard-plugins-src> > <plugins>@forrest.home@/build/plugins</plugins> > + <locationmap>@context.home@/locationmap.xml</locationmap> > </values> > </component-instance> > > > Added: forrest/trunk/main/webapp/locationmap.xml > URL: > http://svn.apache.org/viewcvs/forrest/trunk/main/webapp/locationmap.xml?rev=209820&view=auto > ============================================================================== > --- forrest/trunk/main/webapp/locationmap.xml (added) > +++ forrest/trunk/main/webapp/locationmap.xml Fri Jul 8 08:40:45 2005 > @@ -0,0 +1,33 @@ > +<?xml version="1.0" encoding="UTF-8"?> > +<!-- > + Copyright 2002-2005 The Apache Software Foundation or its licensors, > + as applicable. > + > + Licensed under the Apache License, Version 2.0 (the "License"); > + you may not use this file except in compliance with the License. > + You may obtain a copy of the License at > + > + http://www.apache.org/licenses/LICENSE-2.0 > + > + Unless required by applicable law or agreed to in writing, software > + distributed under the License is distributed on an "AS IS" BASIS, > + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. > + See the License for the specific language governing permissions and > + limitations under the License. > +--> > + > +<!-- Default Forrest locationmap --> > + > +<locationmap xmlns="http://apache.org/forrest/locationmap/1.0"> > + > + <components> > + <matchers default="lm"> > + <matcher > + name="lm" > + src="org.apache.forrest.locationmap.WildcardLocationMapHintMatcher"/> > + </matchers> > + </components> > + > + <locator> > + </locator> > +</locationmap> > > Propchange: forrest/trunk/main/webapp/locationmap.xml > ------------------------------------------------------------------------------ > svn:eol-style = native > > Modified: forrest/trunk/main/webapp/sitemap.xmap > URL: > http://svn.apache.org/viewcvs/forrest/trunk/main/webapp/sitemap.xmap?rev=209820&r1=209819&r2=209820&view=diff > ============================================================================== > --- forrest/trunk/main/webapp/sitemap.xmap (original) > +++ forrest/trunk/main/webapp/sitemap.xmap Fri Jul 8 08:40:45 2005 > @@ -358,7 +358,14 @@ > </map:match> > > <map:match pattern="locationmap.xml"> > - <map:generate src="{project:content}/locationmap.xml" /> > + <map:select type="exists"> > + <map:when test="{project:content}/locationmap.xml"> > + <map:generate src="{project:content}/locationmap.xml" /> > + </map:when> > + <map:otherwise> > + <map:generate src="{forrest:locationmap}" /> > + </map:otherwise> > + </map:select> > <map:serialize type="xml"/> > </map:match> > > > >
