You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by ni...@apache.org on 2004/04/26 12:31:07 UTC
svn commit: rev 10281 - in xml/forrest/branches/copyless: scratchpad/forrestbot2/core src/core src/core/context src/core/targets src/java/org/apache/forrest/conf
Author: nicolaken
Date: Mon Apr 26 03:31:04 2004
New Revision: 10281
Added:
xml/forrest/branches/copyless/src/core/context/default-forrest.properties
- copied unchanged from rev 10277, xml/forrest/branches/copyless/src/core/default-forrest.properties
Removed:
xml/forrest/branches/copyless/src/core/default-forrest.properties
Modified:
xml/forrest/branches/copyless/scratchpad/forrestbot2/core/getsrc.xml
xml/forrest/branches/copyless/src/core/forrest.build.xml
xml/forrest/branches/copyless/src/core/targets/context.xml
xml/forrest/branches/copyless/src/core/targets/webapp.xml
xml/forrest/branches/copyless/src/java/org/apache/forrest/conf/ForrestConfModule.java
Log:
Move default-forrest.properties to the context, where it really belongs. This is needed as Forrest deployed as a webapp contains only the contents of FORREST_HOME/context
Modified: xml/forrest/branches/copyless/scratchpad/forrestbot2/core/getsrc.xml
==============================================================================
--- xml/forrest/branches/copyless/scratchpad/forrestbot2/core/getsrc.xml (original)
+++ xml/forrest/branches/copyless/scratchpad/forrestbot2/core/getsrc.xml Mon Apr 26 03:31:04 2004
@@ -62,7 +62,7 @@
<echo>Loading ${build.cvsmodule-dir}/${getsrc.cvs.module}/forrest.properties..</echo>
<loadproperties srcFile="${build.cvsmodule-dir}/${getsrc.cvs.module}/forrest.properties"/>
- <loadproperties srcFile="${forrest.home}/default-forrest.properties"/>
+ <loadproperties srcFile="${forrest.home}/context/default-forrest.properties"/>
<!-- only the project.content-dir directory -->
<echo><![CDATA[<cvs cvsRoot=":pserver:${getsrc.cvs.user}@${getsrc.cvs.host}:${getsrc.cvs.root}"
@@ -111,7 +111,7 @@
<echo>Loading ${build.svn-dir}/${ant.project.name}/forrest.properties..</echo>
<loadproperties srcFile="${build.svn-dir}/${ant.project.name}/forrest.properties"/>
- <loadproperties srcFile="${forrest.home}/default-forrest.properties"/>
+ <loadproperties srcFile="${forrest.home}/context/default-forrest.properties"/>
<!-- only the project.content-dir directory -->
<svncheckout repositoryUrl="${getsrc.svn.url}/${project.content-dir}"
Modified: xml/forrest/branches/copyless/src/core/forrest.build.xml
==============================================================================
--- xml/forrest/branches/copyless/src/core/forrest.build.xml (original)
+++ xml/forrest/branches/copyless/src/core/forrest.build.xml Mon Apr 26 03:31:04 2004
@@ -95,8 +95,8 @@
<property file="${project.home}/forrest.properties" />
<echo message="Loading user specific properties from ${user.home}${/}forrest.properties" />
<property file="${user.home}/forrest.properties" />
- <echo message="Loading default properties from ${forrest.home}${/}default-forrest.properties" />
- <property file="${forrest.home}/default-forrest.properties" />
+ <echo message="Loading default properties from ${forrest.home}${/}context{/}default-forrest.properties" />
+ <property file="${forrest.home}/context/default-forrest.properties" />
<!-- people should use forrest.properties to override following defaults -->
<property name="forrest.home" location="." />
Modified: xml/forrest/branches/copyless/src/core/targets/context.xml
==============================================================================
--- xml/forrest/branches/copyless/src/core/targets/context.xml (original)
+++ xml/forrest/branches/copyless/src/core/targets/context.xml Mon Apr 26 03:31:04 2004
@@ -42,28 +42,12 @@
<echo>____________________________________</echo>
<echo>Using skin ${project.skin}</echo>
<echo>____________________________________</echo>
- <filter token="skin" value="${project.skin}" />
- <filter token="menu-scheme" value="${project.menu-scheme}" />
- <filter token="bugtracking-url" value="${project.bugtracking-url}" />
- <filter token="local-catalog" value="${catalog}" />
- <filter token="catalog-verbosity" value="${forrest.catalog.verbosity}" />
- <filter token="i18n" value="${project.i18n}" />
- <copy todir="${project.webapp}/" >
- <fileset dir="${forrest.home}/context" >
- <exclude name="*.xmap" />
- <exclude name="skins/**" />
- <exclude name="resources/**" />
- <exclude name="WEB-INF/*.xconf" />
- <exclude name="jettyconf.xml" />
- </fileset>
- </copy>
+ <mkdir dir="${project.webapp}"/>
<copy todir="${project.webapp}/" filtering="false" overwrite="true">
<fileset dir="${forrest.home}/context" >
- <include name="*.xmap" />
- <include name="WEB-INF/*.xconf" />
- <exclude name="WEB-INF/cocoon-live.xconf"/>
+ <include name="**" />
</fileset>
</copy>
Modified: xml/forrest/branches/copyless/src/core/targets/webapp.xml
==============================================================================
--- xml/forrest/branches/copyless/src/core/targets/webapp.xml (original)
+++ xml/forrest/branches/copyless/src/core/targets/webapp.xml Mon Apr 26 03:31:04 2004
@@ -41,10 +41,12 @@
target if you wish to deploy remotely.">
<!-- this will need revisions in the case of the siteplan
extra project-custom classes then will need to be warred in as well. -->
+<!-- should be already there
<mkdir dir="${project.webapp}/WEB-INF"/>
<copy file="${forrest.home}/context/WEB-INF/web.xml" filtering="true"
todir="${project.webapp}/WEB-INF"/>
-
+-->
+
<!-- Prepare the Lucene search index -->
<!-- FIXME: There must be a better way to configure this.
Is this really a concern of the skinconf?
@@ -126,111 +128,14 @@
<!--
| Copy all non-xdocs content across to the webapp
-->
- <copy toDir="${project.webapp}"
- overwrite="true" failonerror="false">
- <fileset dir="${content-dir}">
- <exclude name="content/xdocs/**"/>
- </fileset>
- </copy>
-
- <!-- Copy Skins -->
- <!-- Copy forrest skin images -->
- <copy toDir="${project.webapp}/skin/common/images" overwrite="true"
- failonerror="false">
- <fileset dir="${forrest.skins-dir}/common/images"/>
- </copy>
- <copy toDir="${project.webapp}/skin/${project.skin}/images" overwrite="true"
- failonerror="false">
- <fileset dir="${forrest.skins-dir}/${project.skin}/images"/>
- </copy>
- <!-- Copy project skin images -->
- <copy toDir="${project.webapp}/skin/common/images" overwrite="true"
- failonerror="false">
- <fileset dir="${project.skins-dir}/common/images"/>
- </copy>
- <copy toDir="${project.webapp}/skin/${project.skin}/images" overwrite="true"
- failonerror="false">
- <fileset dir="${project.skins-dir}/${project.skin}/images"/>
- </copy>
-
- <!-- Copy forrest skin XSLT files -->
- <copy toDir="${project.webapp}/skin/common/xslt" overwrite="true"
- failonerror="false">
- <fileset dir="${forrest.skins-dir}/common/xslt"/>
- </copy>
- <copy toDir="${project.webapp}/skin/${project.skin}/xslt" overwrite="true"
- failonerror="false">
- <fileset dir="${forrest.skins-dir}/${project.skin}/xslt"/>
- </copy>
- <!-- Copy project skin XSLT files -->
- <copy toDir="${project.webapp}/skin/common/xslt" overwrite="true"
- failonerror="false">
- <fileset dir="${project.skins-dir}/common/xslt"/>
- </copy>
- <copy toDir="${project.webapp}/skin/${project.skin}/xslt" overwrite="true"
- failonerror="false">
- <fileset dir="${project.skins-dir}/${project.skin}/xslt"/>
- </copy>
-
- <!-- Copy forrest skin CSS files -->
- <copy toDir="${project.webapp}/skin/common/css" overwrite="true"
- failonerror="false">
- <fileset dir="${forrest.skins-dir}/common/css"/>
- </copy>
- <copy toDir="${project.webapp}/skin/${project.skin}/css" overwrite="true"
- failonerror="false">
- <fileset dir="${forrest.skins-dir}/${project.skin}/css"/>
- </copy>
- <!-- Copy project skin CSS files -->
- <copy toDir="${project.webapp}/skin/common/css" overwrite="true"
- failonerror="false">
- <fileset dir="${project.skins-dir}/common/css"/>
- </copy>
- <copy toDir="${project.webapp}/skin/${project.skin}/css" overwrite="true"
- failonerror="false">
- <fileset dir="${project.skins-dir}/${project.skin}/css"/>
- </copy>
-
- <!-- Copy all other non-resource files from Forrest skins -->
- <copy toDir="${project.webapp}/skin/common"
- overwrite="true"
- failonerror="false">
- <fileset dir="${forrest.skins-dir}/common">
- <exclude name="images/**"/>
- <exclude name="xslt/**"/>
- <exclude name="css/**"/>
- </fileset>
- </copy>
- <copy toDir="${project.webapp}/skin/${project.skin}"
- overwrite="true"
- failonerror="false">
- <fileset dir="${forrest.skins-dir}/${project.skin}">
- <exclude name="images/**"/>
- <exclude name="xslt/**"/>
- <exclude name="css/**"/>
+ <mkdir dir="${project.webapp}/project"/>
+ <copy toDir="${project.webapp}/project" overwrite="true" failonerror="false">
+ <fileset dir="${project.home}">
+ <include name="**"/>
+ <include name="build/**"/>
</fileset>
</copy>
- <!-- Copy all other non-resource files from project skins-->
- <copy toDir="${project.webapp}/skin/common"
- overwrite="true"
- failonerror="false">
- <fileset dir="${project.skins-dir}/common">
- <exclude name="images/**"/>
- <exclude name="xslt/**"/>
- <exclude name="css/**"/>
- </fileset>
- </copy>
- <copy toDir="${project.webapp}/skin/${project.skin}"
- overwrite="true"
- failonerror="false">
- <fileset dir="${project.skins-dir}/${project.skin}">
- <exclude name="images/**"/>
- <exclude name="xslt/**"/>
- <exclude name="css/**"/>
- </fileset>
- </copy>
-
<!-- copy custom xmaps -->
<copy toDir="${project.webapp}"
overwrite="true"
@@ -239,55 +144,18 @@
<include name="*.xmap"/>
</fileset>
</copy>
-
- <!-- copy Schemas -->
- <copy toDir="${project.webapp}/resources"
- overwrite="true"
- failonerror="false">
- <fileset dir="${forrest.home}/context/resources"/>
- </copy>
-
- <!-- Change the filter tokens for cocoon.xconf.
- Note that we don't need to change the
- forrest filters since either these are the same as for the local
- webapp or their values can be fixed in the cocoon.xconf template. -->
- <!-- FIXME: Do these tokens need to be customisable via forrest.properties? -->
- <filter token="project.home" value="."/>
- <filter token="project.skins-dir" value="skin"/>
- <filter token="project.skinconf" value="../../../../skinconf.xml"/>
- <filter token="project.content-dir" value="."/>
- <filter token="project.raw-content-dir" value="content"/>
- <filter token="project.xdocs-dir" value="content/xdocs"/>
- <filter token="project.translations-dir" value="translations"/>
- <filter token="project.stylesheets-dir" value="resources/stylesheets"/>
- <filter token="project.images-dir" value="resources/images"/>
- <filter token="local-catalog" value="resources/schema/catalog.xcat"/>
- <!--copy tofile="${project.webapp}/WEB-INF/cocoon.xconf"
- filtering="true"
- overwrite="true"
- file="${forrest.home}/context/WEB-INF/cocoon-live.xconf" -->
-
<loadfile property="webapp-generated-message"
srcFile="${forrest.home}/var/webapp-generated-message.txt">
<filterchain><expandproperties/></filterchain>
</loadfile>
<echo>${webapp-generated-message}</echo>
</target>
- <target name="copy-xdocs" if="xdocs.present">
- <sync toDir="${project.webapp}/content/xdocs">
- <fileset dir="${xdocs-dir}"/>
- </sync>
+
+ <target name="copy-xdocs" if="xdocs.present">
</target>
- <!-- Copy all non-xdocs content -->
<target name="copy-content" if="raw-content.present">
- <copy toDir="${project.webapp}/content"
- overwrite="false" failonerror="false">
- <fileset dir="${raw-content-dir}">
- <exclude name="${xdocs-dir}/**"/>
- </fileset>
- </copy>
</target>
<!-- ===============================================================
Modified: xml/forrest/branches/copyless/src/java/org/apache/forrest/conf/ForrestConfModule.java
==============================================================================
--- xml/forrest/branches/copyless/src/java/org/apache/forrest/conf/ForrestConfModule.java (original)
+++ xml/forrest/branches/copyless/src/java/org/apache/forrest/conf/ForrestConfModule.java Mon Apr 26 03:31:04 2004
@@ -119,6 +119,9 @@
forrestHome = getSystemProperty("forrest.home");
projectHome = getSystemProperty("project.home");
if(projectHome.equals(defaultHome)) {
+ projectHome = defaultHome + SystemUtils.FILE_SEPARATOR + "/project";
+ }
+ if(forrestHome.equals(defaultHome)) {
contextHome = defaultHome;
}else {
contextHome = forrestHome + SystemUtils.FILE_SEPARATOR + "/context";
@@ -143,7 +146,7 @@
// get default-forrest.properties and load the values
- String defaultRorrestPropertiesStringURI = forrestHome
+ String defaultRorrestPropertiesStringURI = contextHome
+ SystemUtils.FILE_SEPARATOR
+ "default-forrest.properties";