You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@forrest.apache.org by Sean Hower <ho...@freehomepage.com> on 2005/06/09 19:06:03 UTC

change site directory

Hi. Newbie Forrest guy again.
I was wondering if there was a way to change where Forrest puts the site folder when it builds a project. I need to dump it into a distribution folder and not its default location.

Links or other info would be great. I'm on digest mode, so if you could cc me on responses, that would be great.

Thanks in advance.


********************************************
Sean Hower - tech writer
http://hokum.freehomepage.com


_____________________________________________________________
Create your own web site for FREE at http://www.freehomepage.com

Re: change site directory

Posted by Ross Gardler <rg...@apache.org>.
Sean Hower wrote:
> Hi. Newbie Forrest guy again.
> I was wondering if there was a way to change where Forrest puts the site folder when it builds a project. I need to dump it into a distribution folder and not its default location.

Depends on exactly what you want to do. If you want the site folder to 
appear in a different directory then you can change project.build-dir in 
forrest.properties. The problem with this is that all build files will 
appear in that location.

If you want to change the name of the root directory (i.e. something 
other than site). Or if you only want the site to appear in the dist 
directory then you will need to make some changes to Forrest. You can 
hack a solution or you could add a new property to forrest.properties 
called project.site-dir and use that.

Either way you need to make changes in 
FORREST_HOME/main/webapp/forrest-build.xml look for:

<if>
         <equals arg1="${project.i18n}" arg2="true"/>
         <then>
           <property name="project.site-dir" 
location="${project.build-dir}/site/${user.language}"    />
         </then>
         <else>
           <property name="project.site-dir" 
location="${project.build-dir}/site"    />
         </else>
     </if>

If you do it the proper way (adding a property), please add the property to:

FORREST_HOME/main/webapp/default-forrest.properties

and in fresh-site/forrest.properties

make the default value what it is now, i.e. ${project.build-dir)/site

create a patch and add it to our issue tracker.

The extra effort will be worthwhile as it will mean you don't need to 
hack your version of Forrest everytime you upgrade.

Ross