forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Crossley <cross...@apache.org>
Subject Re: forrest.properties
Date Mon, 04 Oct 2004 02:46:54 GMT
Sean Wheller wrote:
> In forrest.properties is a list of project properties that use dynamic values 
> based on the pwd when the app was built.
> These are commented (#), so I assume unless uncommented that everything 
> defaults to the installation source and not the seed project.
> 
> #project.content-dir=src/documentation
> #project.raw-content-dir=${project.content-dir}/content
> #project.conf-dir=${project.content-dir}/conf
> ...
> 
> If I uncomment the values specified will be applied. However, if I do 'forrest 
> run' inside a seed project dir this becomes the root of the app. So, adding 
> custom DTD's and XSL's to the installation source paths below is no good.
> src/core/context/resources/schema/dtd/
> src/core/context/resources/stylesheets
> ....

Perhaps you missed the comment at the top of that section.
-----
# Parent properties must be set. This usually means uncommenting
# project.content-dir if any other property using it is uncommented
-----

> By specifying in a seed project sitmap.xmap
> <map:transform src="{project:resources.stylesheets}/download2document.xsl" />
> as per the documented download example, the app expects to find the DTD and 
> XSL is the seed project dir.  
> 
> Whether I leave the project values uncommented or not has no effect since 
> custom DTD's and XSL's, copied to the installation source paths, above are 
> not being referenced unless hard coded into the project properties and 
> map:transform.
> #project.stylesheets-dir=${project.resources-dir}/stylesheets
> #project.schema-dir=${project.resources-dir}/schema
> ...
> 
> Now I expect you would not have gone to all the trouble of providing project 
> properties that point to the seed project, unless you meant it.
> 
> Am I therefore to understand that custom DTD's and XSL's should have dirs 
> created for them in the seed project and, instead of being placed in the 
> installation source paths, be copied to the seed project paths?

No. You create the extra directories yourself if you need them.

> If so then how can I easily manage multiple seed projects that may reuse the 
> DTD's and XSL's I create?

Good point. We have some ideas of providing some
additional core "seed sites" e.g. a really basic one.

Perhaps we can provide the ability for a project to
provide their own seeds, i.e. 'forest seed <name>'.

I think that there might be a Issue in our Jira for
this already. If not then please add one. 

> I expected that when project properties remain commented that forrest would 
> default to using the installation source paths. That way all DTD's and XSL's 
> are in one place and can be reused without having to copy between seed 
> projects. This appears not to be the case, unless you hard code the values of 
> project properties and map:transforms.
>
> To avert problems I need to hard code with map:transform paths in see
project 
> sitemap.xmap. As you know, that induces portability problems since things are 
> not always in the same place on every system.

What do you mean by "hard-code". You can use the
sitemap variables, e.g.
<map:transform src="{forrest:stylesheets}/extract-svg.xsl"/>

> Now I can use a new SourceTypeAction in forrest.xmap but then why add anything 
> to the sitemap.xmap. If this is true then the examples (1 & 2) provided at 
> http://forrest.apache.org/docs/your-project.html#sitemap.xmap
> Are not correct in using dynamic paths for the values since these paths are 
> not created in the seed project.

I am not sure what you mean. The "Download DTD" example
needs to add a new SourceTypeAction. You have two choices:
hack the core forrest.xmap or provide the match in your
project sitemap. Both ways will work. With the former
you will have a synchronisation and update problem.
If you can manage that, then fine.

> It's all a bit of a twist and turn that results in broken pipeline when 
> implimenting the examples provided. Or, perhaps, I just can't see the forrest 
> for the trees. Can somebody clear it for me?

There might be twists in your pipelines, but hopefully
not in ours or there is serious trouble.

-- 
David Crossley


Mime
View raw message