You are viewing a plain text version of this content. The canonical link for it is here.
Posted to svn@forrest.apache.org by cd...@apache.org on 2007/03/22 10:35:51 UTC
svn commit: r521170 - in /forrest/trunk/main: build.xml
fresh-site/forrest.properties.dispatcher.properties
Author: cdupoirieux
Date: Thu Mar 22 02:35:50 2007
New Revision: 521170
URL: http://svn.apache.org/viewvc?view=rev&rev=521170
Log:
Don't want to maintain two file with nearly the same content...
Modified:
forrest/trunk/main/build.xml
forrest/trunk/main/fresh-site/forrest.properties.dispatcher.properties
Modified: forrest/trunk/main/build.xml
URL: http://svn.apache.org/viewvc/forrest/trunk/main/build.xml?view=diff&rev=521170&r1=521169&r2=521170
==============================================================================
--- forrest/trunk/main/build.xml (original)
+++ forrest/trunk/main/build.xml Thu Mar 22 02:35:50 2007
@@ -338,38 +338,58 @@
<delete dir="${forrest.home}/build/plugins"/>
</target>
- <target name="testseed" depends="init, cleanPlugins">
+ <target name="testseed"
+ depends="init, cleanPlugins"
+ description="Called by test target - Seeds and generates the different types of sites (skinned, dispatcher...)">
<for list="skinned,dispatcher" param="type">
<sequential>
- <antcall target="testSeedSiteType">
- <param name="test.seed.site.type" value="@{type}"/>
+ <antcall target="testSiteType">
+ <param name="test.site.type" value="@{type}"/>
</antcall>
</sequential>
</for>
</target>
- <target name="testSeedSiteType" if="test.seed.site.type">
+ <target name="testSiteType"
+ depends="testSeedSiteType,testReplacePluginsList"
+ if="test.site.type"
+ description="Called by test target - Seeds, replaces list of required plugins and generates a new site for testing">
+ <ant antfile="${forrest.core}/forrest.build.xml" target="site">
+ <property name="forrest.home" value="${forrest.home}"/>
+ <property name="project.home" value="${test.dir}"/>
+ </ant>
+ </target>
+
+ <target name="testSeedSiteType"
+ description="Called by test target - Seeds a new site for testing and read the value of project.required.plugins if supplied">
<echo>
-------------------------------------
- Testing seeded ${test.seed.site.type} site ...
+ Testing seeded ${test.site.type} site ...
-------------------------------------
</echo>
<echo/>
- <property name="test.dir" value="${build.dir}/test_${test.seed.site.type}_site"/>
+ <property name="test.dir" value="${build.dir}/test_${test.site.type}_site"/>
<delete dir="${test.dir}"/>
<mkdir dir="${test.dir}"/>
<ant antfile="${forrest.core}/forrest.build.xml" target="seed">
<property name="forrest.home" value="${forrest.home}"/>
<property name="project.home" value="${test.dir}"/>
- </ant>
- <copy file="${test.dir}/forrest.properties.${test.seed.site.type}.properties" tofile="${test.dir}/forrest.properties" failonerror="false"/>
+ </ant>
+ <!-- reading the value of project.required.plugins property if defined in forrest.properties.${test.site.type}.properties -->
+ <property file="${test.dir}/forrest.properties.${test.site.type}.properties"/>
<delete file="${test.dir}/forrest.properties.*.properties" failonerror="false">
<fileset dir="${test.dir}" includes="forrest.properties.*.properties"/>
</delete>
- <ant antfile="${forrest.core}/forrest.build.xml" target="site">
- <property name="forrest.home" value="${forrest.home}"/>
- <property name="project.home" value="${test.dir}"/>
- </ant>
+ </target>
+
+ <target name="testReplacePluginsList"
+ if="project.required.plugins"
+ description="Called by test target - Replaces the list of required plugins if supplied for testing a new site">
+ <echo message="Replace the plugins list"/>
+ <replaceregexp file="${test.dir}/forrest.properties"
+ match="project.required.plugins=(.+)"
+ replace="project.required.plugins=${project.required.plugins}"
+ byline="true"/>
</target>
<!-- ==================================================
Modified: forrest/trunk/main/fresh-site/forrest.properties.dispatcher.properties
URL: http://svn.apache.org/viewvc/forrest/trunk/main/fresh-site/forrest.properties.dispatcher.properties?view=diff&rev=521170&r1=521169&r2=521170
==============================================================================
--- forrest/trunk/main/fresh-site/forrest.properties.dispatcher.properties (original)
+++ forrest/trunk/main/fresh-site/forrest.properties.dispatcher.properties Thu Mar 22 02:35:50 2007
@@ -16,145 +16,10 @@
##############
# Note: The reason for this "forrest.properties.dispatcher.properties"
# is to assist with automated testing (main/build.sh test).
-# Its content should be exactly the same as the default forrest.properties
-# except for the project.required.plugins property.
-# To test the Dispatcher in development, simply replace forrest.properties
-# with this file.
+# Its content redefine the project.required.plugins property which defines
+# the list of required plugins for the dispatcher.
+# To test the Dispatcher in development, simply replace the
+# project.required.plugins property in the forrest.properties file by the one
+# defined in this with this file.
#
-##############
-# These are the defaults, un-comment them only if you need to change them.
-#
-# You can even have a completely empty file, to assist with maintenance.
-# This file is required, even if empty.
-#
-# The file obtained from 'forrest seed-sample' shows the defaults.
-##############
-
-# Prints out a summary of Forrest settings for this project
-#forrest.echo=true
-
-# Project name (used to name .war file)
-#project.name=my-project
-
-# Specifies name of Forrest skin to use
-# See list at http://forrest.apache.org/docs/skins.html
-#project.skin=pelt
-
-# Descriptors for plugins and skins
-# comma separated list, file:// is supported
-#forrest.skins.descriptors=http://forrest.apache.org/skins/skins.xml,file:///c:/myskins/skins.xml
-#forrest.plugins.descriptors=http://forrest.apache.org/plugins/plugins.xml,http://forrest.apache.org/plugins/whiteboard-plugins.xml
-
-##############
-# behavioural properties
-#project.menu-scheme=tab_attributes
-#project.menu-scheme=directories
-
-##############
-# layout properties
-
-# Properties that can be set to override the default locations
-#
-# Parent properties must be set. This usually means uncommenting
-# project.content-dir if any other property using it is uncommented
-
-#project.status=status.xml
-#project.content-dir=src/documentation
-#project.raw-content-dir=${project.content-dir}/content
-#project.conf-dir=${project.content-dir}/conf
-#project.sitemap-dir=${project.content-dir}
-#project.xdocs-dir=${project.content-dir}/content/xdocs
-#project.resources-dir=${project.content-dir}/resources
-#project.stylesheets-dir=${project.resources-dir}/stylesheets
-#project.images-dir=${project.resources-dir}/images
-#project.schema-dir=${project.resources-dir}/schema
-#project.skins-dir=${project.content-dir}/skins
-#project.skinconf=${project.content-dir}/skinconf.xml
-#project.lib-dir=${project.content-dir}/lib
-#project.classes-dir=${project.content-dir}/classes
-#project.translations-dir=${project.content-dir}/translations
-
-#project.build-dir=${project.home}/build
-#project.site=site
-#project.site-dir=${project.build-dir}/${project.site}
-#project.temp-dir=${project.build-dir}/tmp
-
-##############
-# Cocoon catalog entity resolver properties
-# A local OASIS catalog file to supplement the default Forrest catalog
-#project.catalog=${project.schema-dir}/catalog.xcat
-
-##############
-# validation properties
-
-# This set of properties determine if validation is performed
-# Values are inherited unless overridden.
-# e.g. if forrest.validate=false then all others are false unless set to true.
-#forrest.validate=true
-#forrest.validate.xdocs=${forrest.validate}
-#forrest.validate.skinconf=${forrest.validate}
-#forrest.validate.sitemap=${forrest.validate}
-#forrest.validate.stylesheets=${forrest.validate}
-#forrest.validate.skins=${forrest.validate}
-#forrest.validate.skins.stylesheets=${forrest.validate.skins}
-
-# *.failonerror=(true|false) - stop when an XML file is invalid
-#forrest.validate.failonerror=true
-
-# *.excludes=(pattern) - comma-separated list of path patterns to not validate
-# Note: If you do add an "excludes" list then you need to specify site.xml too.
-# e.g.
-#forrest.validate.xdocs.excludes=site.xml, samples/subdir/**, samples/faq.xml
-#forrest.validate.xdocs.excludes=site.xml
-
-
-##############
-# General Forrest properties
-
-# The URL to start crawling from
-#project.start-uri=linkmap.html
-
-# Set logging level for messages printed to the console
-# (DEBUG, INFO, WARN, ERROR, FATAL_ERROR)
-#project.debuglevel=ERROR
-
-# Max memory to allocate to Java
-#forrest.maxmemory=64m
-
-# Any other arguments to pass to the JVM. For example, to run on an X-less
-# server, set to -Djava.awt.headless=true
-#forrest.jvmargs=
-
-# The bugtracking URL - the issue number will be appended
-# Projects would use their own issue tracker, of course.
-#project.bugtracking-url=http://issues.apache.org/bugzilla/show_bug.cgi?id=
-#project.bugtracking-url=http://issues.apache.org/jira/browse/
-
-# The issues list as rss
-#project.issues-rss-url=
-
-#I18n Property. Based on the locale request for the browser.
-#If you want to use it for static site then modify the JVM system.language
-# and run once per language
-project.i18n=true
-
-# The names of plugins that are required to build the project
-# comma separated list (no spaces)
-# You can request a specific version by appending "-VERSION" to the end of
-# the plugin name. If you exclude a version number, the latest released version
-# will be used. However, be aware that this may be a development version. In
-# a production environment it is recommended that you specify a known working
-# version.
-# Run "forrest available-plugins" for a list of plug-ins currently available.
-#project.required.plugins=org.apache.forrest.plugin.output.pdf
-
-# codename: Dispatcher
-# Add the following plugins to project.required.plugins:
project.required.plugins=org.apache.forrest.plugin.output.pdf,org.apache.forrest.plugin.internal.dispatcher,org.apache.forrest.themes.core,org.apache.forrest.plugin.output.inputModule
-
-# Proxy configuration
-# - proxy.user and proxy.password are only needed if the proxy is an authenticated one...
-# proxy.host=myproxy.myhost.com
-# proxy.port=<ProxyPort>
-# proxy.user=<login, if authenticated proxy>
-# proxy.password=<password, if authenticated proxy>