You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by jo...@apache.org on 2003/11/18 18:20:24 UTC
cvs commit: cocoon-2.1/src/resources/dev/emacs prj.el.in
joerg 2003/11/18 09:20:24
Modified: . build.xml
Added: tools/targets samples-build.xml validate-build.xml
admin-build.xml forrest-build.xml ide-build.xml
standalone-demo-build.xml dist-build.xml
docs-build.xml compile-build.xml test-build.xml
instrumentation-build.xml init-build.xml
webapp-build.xml
tools/ide/eclipse classpath-tmpl.xml project
make-classpath.xsl
tools/ide/emacs prj.el.in
Removed: src/targets compile-build.xml admin-build.xml
forrest-build.xml dist-build.xml
standalone-demo-build.xml ide-build.xml
instrumentation-build.xml init-build.xml
webapp-build.xml samples-build.xml test-build.xml
validate-build.xml docs-build.xml
src/resources/dev/eclipse make-classpath.xsl project
classpath-tmpl.xml
src/resources/dev/emacs prj.el.in
Log:
committing the simple solution: separating edit/build/run tools sources from Cocoon sources
Revision Changes Path
1.1 cocoon-2.1/tools/targets/samples-build.xml
Index: samples-build.xml
===================================================================
<!-- === Samples Targets ======================================================= -->
<target name="samples" depends="prepare" unless="unless.exclude.webapp.samples">
<mkdir dir="${build.samples}"/>
<javac srcdir="${samples}"
destdir="${build.samples}"
debug="${compiler.debug}"
optimize="${compiler.optimize}"
deprecation="${compiler.deprecation}"
target="${target.vm}"
compiler="${compiler}"
classpathref="classpath"/>
<!-- copy sample files -->
<copy todir="${build.webapp.samples}" filtering="on">
<fileset dir="${webapp.samples}">
<exclude name="samples.xwelcome"/>
<exclude name="old_sitemap.xmap"/>
<exclude name="**/*.jpg"/>
<exclude name="**/*.gif"/>
<exclude name="**/*.png"/>
<exclude name="i18n/**"/> <!-- filtering breaks UTF-8 files -->
<exclude name="hello-world/style/xsl/**"/> <!-- filtering breaks UTF-8 files -->
</fileset>
</copy>
<copy todir="${build.webapp.samples}" filtering="off">
<fileset dir="${webapp.samples}">
<include name="**/*.jpg"/>
<include name="**/*.gif"/>
<include name="**/*.png"/>
<include name="i18n/**"/>
<include name="hello-world/style/xsl/**"/>
</fileset>
</copy>
<!-- copy sample classes -->
<copy todir="${build.webapp.classes}" filtering="off">
<fileset dir="${build.samples}"/>
</copy>
<!-- patch the welcome page to tell we have samples to show -->
<xpatch file="${build.webapp}/welcome.xml"
srcdir="${webapp.samples}"
includes="**/*.xwelcome"/>
</target>
<target name="block-samples" depends="prepare" unless="unless.exclude.webapp.samples">
<ant antfile="${build.temp}/blocks-build.xml"
inheritAll="true"
inheritRefs="false"
target="samples"/>
</target>
1.1 cocoon-2.1/tools/targets/validate-build.xml
Index: validate-build.xml
===================================================================
<!-- === Validation targets ==================================================== -->
<!-- Check if all the JAR files are properly declared in lib/jars.xml -->
<target name="validate-jars" depends="prepare" unless="exclude.validate.jars">
<path id="all.jars">
<fileset dir="${lib}">
<include name="**/*.jar"/>
</fileset>
<fileset dir="${blocks}">
<include name="*/lib/*.jar"/>
</fileset>
</path>
<property name="all.jars" refid="all.jars"/>
<copy file="${tools.src}/jars.xml.tmpl"
tofile="${build.temp}/current-jars.xml"
filtering="yes" overwrite="yes">
<filterset>
<filter token="JARS" value="${all.jars}"/>
</filterset>
</copy>
<!-- split the path in 'jar' XML elements -->
<replace file="${build.temp}/current-jars.xml"
token="${path.separator}"
value="</jar>
 <jar>"/>
<!-- relativize file names by removing the current directory -->
<replace file="${build.temp}/current-jars.xml"
token="${user}${file.separator}lib${file.separator}"
value=""/>
<replace file="${build.temp}/current-jars.xml"
token="${user}${file.separator}${blocks}${file.separator}"
value=""/>
<!-- and incase that fails, remove the base directory -->
<replace file="${build.temp}/current-jars.xml"
token="${basedir}${file.separator}lib${file.separator}"
value=""/>
<replace file="${build.temp}/current-jars.xml"
token="${basedir}${file.separator}${blocks}${file.separator}"
value=""/>
<!-- replace platform-dependent path separator by '/' -->
<replace file="${build.temp}/current-jars.xml"
token="${file.separator}"
value="/"/>
<xslt in="${lib}/jars.xml" out="${build.temp}/jars.xml"
processor="trax"
style="${tools}/src/check-jars.xsl">
<param name="stylesheet-path" expression="${tools}/src"/>
<param name="current-jars-path" expression="${build.temp}"/>
<param name="current-jars-file" expression="current-jars.xml"/>
</xslt>
</target>
<!-- Validate configuration files. -->
<target name="validate-config" depends="prepare" unless="exclude.validate.config">
<echo message="Validating configuration files"/>
<echo message="Validating cocoon.xconf using a very basic RELAX NG grammar ..."/>
<jing rngfile="${build.webapp}/WEB-INF/entities/any.rng">
<fileset dir="${build.webapp}/WEB-INF" includes="cocoon.xconf"/>
</jing>
</target>
<!-- Validation of xdocs -->
<target name="validate-xdocs" depends="prepare-docs" unless="exclude.validate.xdocs">
<!--
<echo message="Conducting validation of core XML documentation."/>
-->
<echo message="Not conducting validation of core XML documentation."/>
<echo message="Use 'forrest validate-xdocs' instead."/>
<!-- FIXME:
<echo message="Validating all **/book.xml instances using RELAX NG ..."/>
<jing rngfile="${webapp}/WEB-INF/entities/book-v01.rng">
<fileset dir="${build.context}" includes="**/book.xml"/>
</jing>
-->
<!--
<echo message="Validating all xdocs/**/*.xml instances using DTDs ..."/>
<xmlvalidate failonerror="true" lenient="no" warn="yes">
-->
<!-- FIXME: we can use xmlcatalog/catalogpath with Ant-1.6 -->
<!--
<xmlcatalog>
<catalogpath>
<pathelement location="${webapp}/WEB-INF/entities/catalog.xcat"/>
</catalogpath>
</xmlcatalog>
-->
<!--
<fileset dir="${build.context}/xdocs" includes="**/*.xml"
excludes="status.xml,drafts/*.xml,dictionary.xml,catalog-test.xml,ctwig/sample/**/*.xml,tabs.xml,dtd/**"/>
</xmlvalidate>
-->
<echo message="Validating the documentation sitemap.xmap using RELAX NG ..."/>
<jing rngfile="${webapp}/WEB-INF/entities/sitemap-v06.rng">
<fileset dir="${build.context}" includes="sitemap.xmap"/>
</jing>
<!-- <echo message="Validating all documentation stylesheets using RELAX NG ..."/>
<jing rngfile="${webapp}/WEB-INF/entities/xslt-20020523.rng">
<fileset dir="${build.context}/stylesheets" includes="**/*.xsl"/>
</jing>-->
</target>
1.1 cocoon-2.1/tools/targets/admin-build.xml
Index: admin-build.xml
===================================================================
<!-- === Admin targets ===================================================== -->
<!-- Creates the web site -->
<target name="site" depends="forrest, javadocs" description="[admin] Builds the site">
<mkdir dir="${site}"/>
<copy todir="${site}" filtering="off">
<fileset dir="${build.site}"/>
</copy>
<copy todir="${site}/apidocs" filtering="off">
<fileset dir="${build.javadocs}"/>
</copy>
</target>
<!-- Create the announcements -->
<target name="announcement" depends="prepare-docs">
<copy file="announcement.xml" tofile="${build.context}\xdocs\announcement.xml" filtering="on"/>
<xslt basedir="${build.context}\xdocs"
destdir="${build}"
style="${build.context}\stylesheets\announcement2txt.xsl"
includes="announcement.xml"
extension=".txt"
force="true"/>
</target>
<!-- === Gump Targets ====================================================== -->
<!-- compiles and packages the core classes and the deprecated classes -->
<target name="gump-core" depends="package-core, package-deprecated, javadocs, validate-jars, junit-tests"/>
<!-- compiles and packages a single block identified by ${block-name} -->
<target name="gump-block" depends="compile-core, compile-deprecated, prepare-blocks, compile-tests">
<ant antfile="${build.temp}/blocks-build.xml"
inheritAll="true"
inheritRefs="false"
target="cocoon-block-${block-name}-tests"/>
</target>
1.1 cocoon-2.1/tools/targets/forrest-build.xml
Index: forrest-build.xml
===================================================================
<!-- === Forrest Targets ================================================= -->
<target name="forrest" depends="prepare, prepare-docs, forrest.init, validate-jars, javadocs" description="Generates static HTML documentation">
<!-- Add some other documents -->
<copy file="${build.temp}/jars.xml"
tofile="${build.context}/xdocs/installing/jars.xml" filtering="off"
overwrite="yes"/>
<ant antfile="${forrest.home}/forrest.antproxy.xml" target="site"/>
</target>
<!-- Generates an unpackaged webapp of the website -->
<target name="forrest.webapp" depends="forrest.init">
<ant antfile="${forrest.home}/forrest.antproxy.xml" target="webapp"/>
</target>
<!-- Generates a .war file containing the website -->
<target name="forrest.war" depends="forrest.init">
<ant antfile="${forrest.home}/forrest.antproxy.xml" target="war"/>
</target>
<!-- Validates XML documentation files -->
<target name="forrest.validate" depends="forrest.init">
<ant antfile="${forrest.home}/forrest.antproxy.xml" target="validate"/>
</target>
<target name="forrest.init" depends="forrest.sethome, forrest.home.defined"/>
<target name="forrest.sethome" depends="forrest.loadenv,
forrest.checkenv, forrest.checkhome, forrest.check-build.properties,
forrest.check-project.properties, forrest.check-ant.properties,
forrest.check-.ant.properties"/>
<target name="forrest.loadenv" unless="forrest.home.present">
<property environment="env"/>
<echo level="verbose">Forrest: Got ${env.FORREST_HOME}</echo>
</target>
<target name="forrest.checkenv" if="env.FORREST_HOME">
<echo level="verbose">Found $FORREST_HOME..</echo>
<property name="forrest.home" location="${env.FORREST_HOME}"/>
<echo level="verbose">forrest.home set to ${forrest.home}</echo>
<available file="${forrest.home}" type="dir" property="forrest.home.present"/>
</target>
<target name="forrest.checkhome">
<available file="${forrest.home}" type="dir" property="forrest.home.present"/>
<available file="build.properties" type="file" property="build.properties.present"/>
<available file="project.properties" type="file" property="project.properties.present"/>
<available file="ant.properties" type="file" property="ant.properties.present"/>
<available file=".ant.properties" type="file" property=".ant.properties.present"/>
<echo message="forrest.home.present=${forrest.home.present}"/>
<echo message="build.properties.present=${build.properties.present}"/>
</target>
<!-- No we can't extract the commonalities below into an antcall'ed target,
because it wouldn't be able to set forrest.home -->
<target name="forrest.check-build.properties" unless="forrest.home.present"
if="build.properties.present">
<echo level="verbose">Forrest: Checking build.properties..</echo>
<loadproperties srcfile="build.properties">
<filterchain>
<linecontains>
<contains value="forrest.home"/>
</linecontains>
</filterchain>
</loadproperties>
<available file="${forrest.home}" type="dir" property="forrest.home.present"/>
</target>
<target name="forrest.check-project.properties" unless="forrest.home.present"
if="project.properties.present">
<echo level="verbose">Forrest: Checking project.properties..</echo>
<loadproperties srcfile="project.properties">
<filterchain>
<linecontains>
<contains value="forrest.home"/>
</linecontains>
</filterchain>
</loadproperties>
<available file="${forrest.home}" type="dir" property="forrest.home.present"/>
</target>
<target name="forrest.check-ant.properties" unless="forrest.home.present"
if="ant.properties.present">
<echo level="verbose">Forrest: Checking ant.properties..</echo>
<loadproperties srcfile="ant.properties">
<filterchain>
<linecontains>
<contains value="forrest.home"/>
</linecontains>
</filterchain>
</loadproperties>
<available file="${forrest.home}" type="dir" property="forrest.home.present"/>
</target>
<target name="forrest.check-.ant.properties" unless="forrest.home.present"
if=".ant.properties.present">
<echo level="verbose">Forrest: Checking .ant.properties..</echo>
<loadproperties srcfile=".ant.properties">
<filterchain>
<linecontains>
<contains value="forrest.home"/>
</linecontains>
</filterchain>
</loadproperties>
<available file="${forrest.home}" type="dir" property="forrest.home.present"/>
</target>
<target name="forrest.home.defined" depends="forrest.sethome" unless="forrest.home.present">
<property name="path" value="${user.home}/xml-forrest/build/dist/shbat"/>
<pathconvert targetos="windows" property="winpath">
<path>
<pathelement location="${path}"/>
</path>
</pathconvert>
<pathconvert targetos="unix" property="unixpath">
<path>
<pathelement
location="${path}"/>
</path>
</pathconvert>
<echo>
----------------------------------------------
To run this target, you need Forrest installed.
Please do the following:
export CVSROOT=:pserver:anoncvs@cvs.apache.org:/home/cvspublic
cvs checkout xml-forrest
cd xml-forrest
build (Windows)
./build.sh (Unix)
Then either:
- Set FORREST_HOME as the Forrest build instructions describe
- Create a build.properties, with the forrest.home property pointing to
the forrest shbat directory, eg:
forrest.home=${winpath} (Windows)
forrest.home=${unixpath} (Unix)
(adjusting the path according to where your xml-forrest is)
----------------------------------------------
</echo>
<fail message="Need to define $${forrest.home}"/>
</target>
1.1 cocoon-2.1/tools/targets/ide-build.xml
Index: ide-build.xml
===================================================================
<!-- === IDE targets =========================================================== -->
<!-- Generate the Emacs JDE project file -->
<target name="emacs-project" depends="prepare" description="Generate the Emacs project files">
<path id="jar.files">
<fileset dir="${build.webapp}/WEB-INF/lib">
<include name="*.jar"/>
</fileset>
<pathelement path="${build.context}/WEB-INF/classes"/>
</path>
<property name="jar.files" refid="jar.files"/>
<copy file="${tools}/ide/emacs/prj.el.in" tofile="prj.el" filtering="yes">
<filterset>
<filter token="jar.files" value="${jar.files}"/>
<filter token="src" value="${java}"/>
<filter token="build.webapp" value="${build.webapp}"/>
</filterset>
</copy>
</target>
<!-- Build the Eclipse projects files -->
<target name="eclipse-project" depends="prepare" description="Generate the Eclipse project files">
<echo message="Building Eclipse Project Files"/>
<!-- prepare the various paths that will form the project -->
<path id="srcs">
<!-- main source dir -->
<pathelement path="${src}/java"/>
<!-- deprecated source dir -->
<pathelement path="${src}/deprecated/java"/>
<!-- test source dir -->
<pathelement path="${src}/test"/>
<!-- blocks source dirs -->
<dirset dir="${blocks}">
<include name="*/java"/>
<include name="*/java${target.vm}"/>
</dirset>
</path>
<path id="mockss">
<dirset dir="${src}">
<include name="**/mocks"/>
</dirset>
</path>
<path id="libs">
<!-- main libs -->
<fileset dir="${lib}">
<include name="core/*.jar"/>
<!-- Currently, we have no JVM dependent libraries
<include name="core/jvm${target.vm}/*.jar"/>
-->
<include name="optional/*.jar"/>
<include name="local/*.jar"/>
<include name="endorsed/*.jar"/>
</fileset>
<!-- blocks lib -->
<fileset dir="${blocks}">
<include name="**/*.jar"/>
</fileset>
<!-- tools libs -->
<fileset dir="${tools}/lib">
<include name="*.jar"/>
<exclude name="xalan*.jar"/>
<exclude name="xml-api*.jar"/>
<exclude name="xerces*.jar"/>
</fileset>
</path>
<!-- convert paths to properties -->
<property name="srcs" refid="srcs"/>
<property name="mockss" refid="mockss"/>
<property name="libs" refid="libs"/>
<!-- expand properties in the template file -->
<copy file="${tools}/ide/eclipse/classpath-tmpl.xml"
tofile="${build.temp}/classpath-temp.xml"
filtering="yes"
overwrite="yes">
<filterset>
<filter token="SRC_DIRS" value="${srcs}"/>
<filter token="LIBS" value="${libs}"/>
<filter token="MOCKS_DIRS" value="${mockss}"/>
<filter token="OUTPUT_DIR" value="${ide.eclipse.outputdir}"/>
</filterset>
</copy>
<!-- split the path in 'item' XML elements -->
<replace file="${build.temp}/classpath-temp.xml"
token="${path.separator}" value="</item>
 <item>"/>
<!-- relativize file names by removing the current directory -->
<replace file="${build.temp}/classpath-temp.xml"
token="${user}${file.separator}" value=""/>
<!-- and in case that fails, remove the base directory -->
<replace file="${build.temp}/classpath-temp.xml"
token="${basedir}${file.separator}" value=""/>
<!-- replace platform-dependent path separator by '/' -->
<replace file="${build.temp}/classpath-temp.xml"
token="${file.separator}" value="/"/>
<!-- now build the .classpath file -->
<xslt in="${build.temp}/classpath-temp.xml" out="${basedir}/.classpath"
processor="trax"
style="${tools}/ide/eclipse/make-classpath.xsl"/>
<!-- copy the project file (expand version) -->
<copy file="${tools}/ide/eclipse/project"
tofile="${basedir}/.project"
overwrite="yes">
<filterset>
<filter token="VERSION" value="${version}"/>
</filterset>
</copy>
</target>
<!-- Prepares the webapp to make it directly usable with the eclipse project -->
<target name="eclipse-webapp-prepare" depends="eclipse-webapp-delete-jars, eclipse-webapp-restore-roles"
description="Prepares the webapp directory to make it usable within Eclipse"/>
<target name="eclipse-webapp-restore-roles" depends="prepare">
<copy file="${build.dest}/org/apache/cocoon/cocoon.roles"
tofile="${build.webapp}/WEB-INF/classes/org/apache/cocoon/cocoon.roles"
overwrite="yes"/>
</target>
<target name="eclipse-webapp-delete-jars" depends="prepare">
<!-- delete all jars, they are already included in the project -->
<delete>
<fileset dir="${build.webapp}/WEB-INF/lib" includes="*.jar"/>
</delete>
</target>
1.1 cocoon-2.1/tools/targets/standalone-demo-build.xml
Index: standalone-demo-build.xml
===================================================================
<!--
ant include file for "standalone-demo" build
@author bdelacretaz@codeconsult.ch
$Id: standalone-demo-build.xml,v 1.1 2003/11/18 17:20:23 joerg Exp $
-->
<target name="standalone-demo" depends="init, webapp" description="build webapp and copy files for standalone demo">
<!-- setup -->
<mkdir dir="${build.standalone.demo}"/>
<property name="readme.txt" value="${build.standalone.demo}/readme-standalone.txt"/>
<!-- copy files that cocoon.sh needs to run so that they can be moved out of the build tree easily -->
<copy todir="${build.standalone.demo}">
<fileset dir=".">
<include name="${lib.endorsed}/**"/>
<include name="${tools.loader.dest}/**"/>
<include name="${tools.jetty}/**"/>
<include name="cocoon.sh"/>
<include name="cocoon.bat"/>
</fileset>
</copy>
<!-- fix permissions and line endings -->
<chmod perm="+x" file="${build.standalone.demo}/cocoon.sh"/>
<fixcrlf srcdir="${build.standalone.demo}" includes="**.sh" eol="lf"/>
<fixcrlf srcdir="${build.standalone.demo}" includes="**.bat" eol="crlf"/>
<!-- create readme.txt for users -->
<echo file="${readme.txt}">
Cocoon standalone-demo
----------------------
After building this version with "build standalone-demo" from the main Cocoon distribution
directory, copying the ${build.standalone.demo} and ${build.webapp} directories
somewhere else provides you with a simple standalone Cocoon installation, meant for
test and demo purposes.
To start this standalone demo use either "./cocoon.sh servlet" or "cocoon.bat servlet" in the
standalone-demo directory.
The webapp directory must be found as "../webapp" for this to work:
common-parent-directory
|
+----------- standalone-demo
+----------- webapp
Note that the version of the jetty servlet engine that is included with this demo
is not the full version. For production uses, we recommend that you get a complete
servlet engine and install it according to your needs.
Have fun!
Your friendly neighbourhood Cocoon team.
</echo>
<!-- all done -->
<echo>--- standalone-demo build ready! -----------------------------------------</echo>
<echo>See ${readme.txt} for more info.</echo>
<echo>--------------------------------------------------------------------------</echo>
</target>
1.1 cocoon-2.1/tools/targets/dist-build.xml
Index: dist-build.xml
===================================================================
<!-- === Distribution targets ============================================== -->
<target name="dist" depends="init" description="[admin] Builds the distribution">
<mkdir dir="${dist.root}"/>
<mkdir dir="${dist}"/>
<copy todir="${dist}/tools">
<fileset dir="${tools}">
<exclude name="anttasks/**"/>
<exclude name="loader/**"/>
<exclude name="lib/xalan*"/>
<exclude name="lib/xerces*"/>
<exclude name="lib/jtidy*"/>
<exclude name="lib/xml-apis.jar"/>
</fileset>
</copy>
<copy todir="${dist}/lib">
<fileset dir="${lib}"/>
</copy>
<copy todir="${dist}/src">
<fileset dir="${src}"/>
</copy>
<copy todir="${dist}/legal">
<fileset dir="${legal}"/>
</copy>
<copy todir="${dist}" filtering="on">
<fileset dir=".">
<include name="README.txt"/>
<include name="INSTALL.txt"/>
<include name="CREDITS.txt"/>
<include name="DESKTOP.INI"/>
<include name="*.bat"/>
<include name="*.sh"/>
<include name="KEYS"/>
<include name="*.xml"/>
<include name="*.properties"/>
<include name="*.xconf"/>
<exclude name="local.*"/>
<exclude name="announcement.xml"/>
</fileset>
</copy>
<chmod perm="+x" file="${dist}/cocoon.sh"/>
<chmod perm="+x" file="${dist}/build.sh"/>
<chmod perm="+x" file="${dist}/tools/bin/antRun"/>
<fixcrlf srcdir="${dist}" includes="**.sh" eol="lf"/>
<fixcrlf srcdir="${dist}" includes="antRun" eol="lf"/>
<fixcrlf srcdir="${dist}" includes="**.bat" eol="crlf"/>
<zip zipfile="${dist.target}/${dist.name}-src.zip"
basedir="${dist.root}"
includes="${dist.name}/**">
</zip>
<tar tarfile="${dist.target}/${dist.name}-src.tar"
longfile="gnu">
<tarfileset dir="${dist.root}">
<include name="${dist.name}/**"/>
<exclude name="${dist.name}/cocoon.sh"/>
<exclude name="${dist.name}/build.sh"/>
<exclude name="${dist.name}/tools/bin/antRun"/>
</tarfileset>
<tarfileset dir="${dist.root}" mode="755">
<include name="${dist.name}/cocoon.sh"/>
<include name="${dist.name}/build.sh"/>
<include name="${dist.name}/tools/bin/antRun"/>
</tarfileset>
</tar>
<gzip zipfile="${dist.target}/${dist.name}-src.tar.gz" src="${dist.target}/${dist.name}-src.tar"/>
<delete file="${dist.target}/${dist.name}-src.tar"/>
</target>
<target name="clean-dist" depends="clean" description="Cleans everything and brings back to original 'CVS checkout' state">
<delete dir="${build.root}"/>
<delete dir="${tools.tasks.dest}"/>
<delete dir="${tools.loader.dest}"/>
<delete file="${dist.target}/${dist.name}-src.tar.gz"/>
<delete file="${dist.target}/${dist.name}-src.zip"/>
<delete dir="${dist.root}"/>
</target>
1.1 cocoon-2.1/tools/targets/docs-build.xml
Index: docs-build.xml
===================================================================
<!-- === Documentation Targets ================================================= -->
<target name="prepare-docs" depends="blocks">
<!-- Set classpath for documentation -->
<path id="documentation.classpath">
<path refid="classpath"/>
<fileset dir="${build.blocks}">
<include name="*.jar"/>
</fileset>
<fileset dir="${blocks}">
<include name="*/lib/*.jar"/>
</fileset>
<path location="${tools.jar}"/>
<path location="${build.context}/WEB-INF/classes"/>
</path>
<mkdir dir="${build.context}"/>
<mkdir dir="${build.context}/images"/>
<!-- make filtered copy of XML docs -->
<copy todir="${build.context}" filtering="on">
<fileset dir="${documentation}">
<exclude name="images/**"/>
</fileset>
</copy>
<!-- Add some other documents -->
<copy file="status.xml"
tofile="${build.context}/xdocs/status.xml" filtering="on"/>
<!-- Forrest needs its own file at src/documentation/sitemap.xmap, so we
overwrite it with the old Cocoon-specific sitemap here -->
<move file="${build.context}/sitemap-localdocs.xmap"
tofile="${build.context}/sitemap.xmap"/>
<!-- Copy images -->
<copy todir="${build.context}/images" filtering="off">
<fileset dir="${documentation}/images"/>
</copy>
<!-- Copy entity catalog and entities -->
<copy todir="${build.context}/WEB-INF/entities" filtering="on">
<fileset dir="${webapp}/WEB-INF/entities"/>
</copy>
<copy todir="${build.context}/WEB-INF/classes" filtering="on">
<fileset dir="${webapp}/WEB-INF/classes"/>
</copy>
<!-- Copy the logkit configuration -->
<copy todir="${build.context}" filtering="on" file="${webapp}/WEB-INF/logkit.xconf"/>
</target>
<!-- Set a variable if the generated docs are already up-to-date. -->
<target name="docs_check" depends="prepare-docs">
<uptodate property="docs.notrequired" targetfile="${build.docs}/index.html" >
<srcfiles dir="." includes="status.xml"/>
<srcfiles dir="${build}" includes="jars.xml"/>
<srcfiles dir="${documentation}/xdocs" includes="**/*.xml"/>
</uptodate>
</target>
<!-- If generated docs are already up-to-date, print a message saying so. -->
<target name="docs_done" depends="docs_check" if="docs.notrequired">
<echo message="-------------------------------------------------------------"/>
<echo message="Not rebuilding docs, as they are up-to-date:"/>
<echo message=" ${build.docs}/index.html is more recent than"/>
<echo message=" status.xml, ${documentation}/xdocs/*.xml"/>
<echo message="-------------------------------------------------------------"/>
</target>
<!-- Create docs -->
<target name="docs" depends="validate-jars, prepare-docs, validate-xdocs, docs_done, javadocs, forrest" unless="docs.notrequired" description="Builds the documentation">
<!-- The docs are created using forrest, so we simply copy them for now -->
<mkdir dir="${build.docs}"/>
<copy todir="${build.docs}" filtering="off">
<fileset dir="${build.site}"/>
</copy>
<copy todir="${build.docs}/apidocs" filtering="off">
<fileset dir="${build.javadocs}"/>
</copy>
</target>
<!-- Prepares the printer-docs -->
<!--
<target name="prepare-printer-docs" depends="prepare-docs">
<mkdir dir="${build.context.printer}"/>
-->
<!-- copy prepared docs -->
<!--
<copy todir="${build.context.printer}" filtering="off">
<fileset dir="${build.context}"/>
</copy>
-->
<!-- copy printer skin -->
<!--
<copy todir="${build.context.printer}/stylesheets" filtering="off" overwrite="yes">
<fileset dir="${build.context}/stylesheets/printer_skin"/>
</copy>
</target>
-->
<!-- Set a variable if the generated printer docs are already up-to-date. -->
<!--
<target name="printer-docs_check" depends="prepare">
<uptodate property="printer-docs.notrequired" targetfile="${build.docs.printer}/index.html" >
<srcfiles dir="." includes="status.xml"/>
<srcfiles dir="${docs}" includes="**/*.xml"/>
</uptodate>
</target>
-->
<!-- If generated printer docs are already up-to-date, print a message saying so. -->
<!--
<target name="printer-docs_done" depends="printer-docs_check" if="printer-docs.notrequired">
<echo message="Not rebuilding printer docs, as they are up-to-date:"/>
<echo message=" ${build.docs.printer}/index.html is more recent than"/>
<echo message=" status.xml, ${docs}/*.xml"/>
</target>
-->
<!-- Create printer friendly docs -->
<!--
<target name="printer-docs" depends="prepare-printer-docs, validate-xdocs, printer-docs_done" description="Builds printer-friendly documentation">
<mkdir dir="${build.docs.printer}"/>
<java classname="org.apache.cocoon.Main" fork="true" dir="${build.context.printer}" failonerror="true" maxmemory="128m">
<arg value="-c."/>
<arg value="-d../printer-docs"/>
<arg value="-w../temp/printer"/>
<arg value="-b../brokenlinks.txt"/>
<arg value="-k./logkit.xconf"/>
<arg value="-u${build.docs.printer.loglevel}"/>
<arg value="-V"/>
<arg value="index.html"/>
<classpath>
<path refid="documentation.classpath"/>
</classpath>
</java>
</target>
-->
<!-- === Javadoc/IDLDoc Targets ================================================ -->
<!-- Create IDL API documentation -->
<target name="idldocs" depends="prepare" unless="unless.exclude.idldocs" description="Builds the IDL API documentation for non-java language bindings">
<mkdir dir="${build.idldocs}"/>
<java classname="org.openorb.compiler.doc.IdlDoc">
<arg value="-I${idl}"/>
<arg value="-outdir:${build.idldocs}"/>
<arg value="-all"/>
<arg value="-html"/>
<arg value="${idl}/main.idl"/>
</java>
</target>
<!-- Check if javadocs have to be generated -->
<!-- Obsolete:
<target name="javadocs-check">
<mkdir dir="${build.javadocs}"/>
<condition property="javadocs.notrequired" value="true">
<or>
<uptodate targetfile="${build.javadocs}/packages.html" >
<srcfiles dir= "${java}" includes="**/*.java,**/package.html"/>
<srcfiles dir= "${deprecated.src}" includes="**/*.java,**/package.html"/>
</uptodate>
<istrue value="${unless.exclude.javadocs}"/>
</or>
</condition>
</target>
-->
<!-- Creates Javadocs -->
<!-- Obsolete:
<target name="javadocs" depends="prepare, javadocs-check" unless="javadocs.notrequired" description="Builds the API documentation (javadocs)">
<condition property="javadoc.additionalparam" value="-breakiterator -tag todo:all:Todo:">
<equals arg1="1.4" arg2="${ant.java.version}"/>
</condition>
<condition property="javadoc.additionalparam" value="">
<not><equals arg1="1.4" arg2="${ant.java.version}"/></not>
</condition>
<javadoc destdir="${build.javadocs}"
author="true"
version="true"
use="true"
noindex="false"
splitindex="true"
windowtitle="${Name} API ${version} [${TODAY}]"
doctitle="${Name} API ${version}"
bottom="Copyright © ${year} Apache Software Foundation. All Rights Reserved."
stylesheetfile="${resources.javadoc}/javadoc.css"
useexternalfile="yes"
additionalparam="${javadoc.additionalparam}">
<link offline="true" href="http://avalon.apache.org/api" packagelistloc="${resources.javadoc}/avalon"/>
<link offline="true" href="http://xml.apache.org/xerces2-j/javadocs/api" packagelistloc="${resources.javadoc}/xerces"/>
<link offline="true" href="http://xml.apache.org/xalan-j/apidocs" packagelistloc="${resources.javadoc}/xalan"/>
<link offline="true" href="http://java.sun.com/j2se/1.4.1/docs/api" packagelistloc="${resources.javadoc}/j2se"/>
<link offline="true" href="http://java.sun.com/j2ee/sdk_1.3/techdocs/api" packagelistloc="${resources.javadoc}/j2ee"/>
<packageset dir="${java}">
<include name="**"/>
</packageset>
<packageset dir="${deprecated.src}">
<include name="**"/>
</packageset>
<classpath refid="classpath"/>
</javadoc>
</target>
-->
<!-- Creates Javadocs -->
<target name="javadocs"
depends="prepare-blocks"
description="Builds the API documentation (javadocs)">
<ant antfile="${build.temp}/blocks-build.xml"
inheritAll="true"
inheritRefs="false"
target="javadocs"/>
</target>
1.1 cocoon-2.1/tools/targets/compile-build.xml
Index: compile-build.xml
===================================================================
<!-- === Compilation Targets =================================================== -->
<!-- compiles everything -->
<target name="compile" depends="compile-core, compile-deprecated, compile-tests"/>
<!-- compiles the core -->
<target name="compile-core" depends="prepare">
<!-- copy those files that need to be in the classpath -->
<copy todir="${build.dest}">
<fileset dir="${java}">
<exclude name="**/*.java"/>
<exclude name="**/*.xroles"/>
<exclude name="**/*.xconf"/>
</fileset>
</copy>
<!-- compile mock classes -->
<mkdir dir="${build.mocks}"/>
<javac srcdir="${mocks}"
destdir="${build.mocks}"
debug="${compiler.debug}"
optimize="${compiler.optimize}"
deprecation="${compiler.deprecation}"
target="${target.vm}"
nowarn="${compiler.nowarn}"
compiler="${compiler}"
classpathref="classpath"/>
<!-- compile core source files -->
<javac srcdir="${java}"
destdir="${build.dest}"
debug="${compiler.debug}"
optimize="${compiler.optimize}"
deprecation="${compiler.deprecation}"
target="${target.vm}"
nowarn="${compiler.nowarn}"
compiler="${compiler}"
classpathref="classpath"/>
</target>
<!-- compiles deprecated code -->
<target name="compile-deprecated" depends="prepare" unless="unless.exclude.deprecated">
<mkdir dir="${build.deprecated}"/>
<xpatch file="${build.dest}/org/apache/cocoon/cocoon.roles"
srcdir="${deprecated.conf}"
includes="**/*.xroles"/>
<javac srcdir="${deprecated.src}"
destdir="${build.deprecated}"
debug="${compiler.debug}"
optimize="${compiler.optimize}"
deprecation="${compiler.deprecation}"
target="${target.vm}"
compiler="${compiler}"
classpathref="classpath"/>
</target>
<target name="compile-tests" depends="compile-core, compile-deprecated">
<mkdir dir="${build.test}"/>
<!-- Copy test files to build test dir -->
<copy todir="${build.test}" filtering="on">
<fileset dir="${test}" excludes="**/*.java"/>
</copy>
<path id="test.classpath">
<path refid="classpath"/>
<pathelement location="${build.dest}" />
<!-- FIXME Resolver tests depend on deprecated stuff -->
<pathelement location="${build.deprecated}" />
<pathelement location="${build.test}" />
<fileset dir="${tools.lib}">
<include name="*.jar"/>
</fileset>
</path>
<!-- Compile tests -->
<javac srcdir="${test}"
destdir="${build.test}"
debug="${compiler.debug}"
optimize="${compiler.optimize}"
deprecation="${compiler.deprecation}"
target="${target.vm}"
compiler="${compiler}"
classpathref="test.classpath"/>
</target>
<!-- === Package Targets ======================================================= -->
<!-- packages everything -->
<target name="package" depends="package-core, package-deprecated, package-testcase"/>
<!-- package the core -->
<target name="package-core" depends="compile-core, block-roles">
<jar jarfile="${build}/${name}.jar" manifest="${java}/Manifest.mf">
<fileset dir="${build.dest}">
<exclude name="**/Manifest.mf"/>
</fileset>
</jar>
</target>
<!-- package deprecated code -->
<target name="package-deprecated" depends="compile-deprecated" unless="unless.exclude.deprecated">
<jar jarfile="${build}/${name}-deprecated.jar">
<fileset dir="${build.deprecated}"/>
</jar>
</target>
<!-- package testcase code -->
<target name="package-testcase" depends="compile-tests">
<jar jarfile="${build}/${name}-testcase.jar">
<fileset dir="${build.test}">
<include name="org/apache/cocoon/environment/mock/*"/>
<include name="org/apache/cocoon/components/source/SourceResolverAdapter*"/>
<include name="org/apache/cocoon/AbstractCompositeTestCase*"/>
<include name="org/apache/cocoon/acting/AbstractActionTestCase*"/>
<include name="org/apache/cocoon/generation/AbstractGeneratorTestCase*"/>
<include name="org/apache/cocoon/transformation/AbstractTransformerTestCase*"/>
<include name="org/apache/cocoon/serialization/AbstractSerializerTestCase*"/>
<include name="org/apache/cocoon/xml/WhitespaceFilter*"/>
</fileset>
</jar>
</target>
<!-- === Block Targets ========================================================= -->
<!-- prepares the blocks build -->
<target name="prepare-blocks" depends="prepare">
<mkdir dir="${build.blocks}"/>
<xslt in="${gump.descriptor}"
out="${build.temp}/blocks-build.xml"
processor="trax"
style="${tools}/src/blocks-build.xsl"/>
</target>
<!-- patch the cocoon role file -->
<target name="block-roles" depends="prepare-blocks">
<ant antfile="${build.temp}/blocks-build.xml"
inheritAll="true"
inheritRefs="false"
target="patch-roles"/>
</target>
<!-- compiles and packages all blocks -->
<target name="blocks" depends="compile,prepare-blocks">
<ant antfile="${build.temp}/blocks-build.xml"
inheritAll="true"
inheritRefs="false"
target="compile"/>
</target>
1.1 cocoon-2.1/tools/targets/test-build.xml
Index: test-build.xml
===================================================================
<!-- === Test targets =========================================================== -->
<!-- Runs all tests -->
<target name="test" depends="junit-tests, block-tests" description="Runs all tests"/>
<!-- Runs JUnit tests -->
<target name="junit-tests" depends="compile-tests">
<junit printsummary="yes" haltonfailure="yes" fork="yes">
<classpath refid="test.classpath"/>
<formatter type="plain" usefile="no" />
<batchtest>
<fileset dir="${build.test}">
<include name="**/*TestCase.class"/>
<include name="**/*Test.class" />
<exclude name="**/AllTest.class" />
<exclude name="**/*$$*Test.class" />
<exclude name="**/Abstract*.class" />
</fileset>
</batchtest>
</junit>
</target>
<!-- Anteater tests -->
<target name="anteater-tests" depends="compile-tests,block-anteater-tests">
<property name="host" value="localhost"/>
<property name="port" value="8888"/>
<property name="base" value="/"/>
<property name="anteater.home" value="D:\downloads\anteater-0.9.16"/>
<available file="${anteater.home}" property="anteater.present"/>
<fail unless="anteater.present"
message="Please make sure Anteater is installed in ${anteater.home} or adjust the anteater.home property"/>
<java classname="org.apache.tools.ant.Main" fork="true">
<classpath>
<fileset dir="${anteater.home}">
<include name="lib/**/*.jar"/>
<include name="tomcat/**/*.jar"/>
</fileset>
<pathelement location="${anteater.home}/resources"/>
</classpath>
<jvmarg value="-Dant.home=${anteater.home}"/>
<jvmarg value="-Danteater.home=${anteater.home}"/>
<jvmarg value="-Danteater.resources=${anteater.home}/resources"/>
<jvmarg value="-Danteater.report=${anteater.home}/resources/scripts/report.xml"/>
<jvmarg value="-Djava.endorsed.dirs=${anteater.home}/lib"/>
<arg line="-f ${build.test}/anteater/all-tests.xml -Dhost=${host} -Dport=${port} -Dbase=${base}"/>
</java>
</target>
<!-- Block tests -->
<target name="block-tests" depends="compile-tests, prepare-blocks">
<ant antfile="${build.temp}/blocks-build.xml"
inheritAll="true"
inheritRefs="false"
target="tests"/>
</target>
<target name="block-anteater-tests" depends="prepare-blocks">
<ant antfile="${build.temp}/blocks-build.xml"
inheritAll="true"
inheritRefs="false"
target="prepare-anteater-tests"/>
</target>
1.1 cocoon-2.1/tools/targets/instrumentation-build.xml
Index: instrumentation-build.xml
===================================================================
<target name="start-instrumentation-client" depends="init">
<property name="lib.instrumentation" value="tools/instrumentation/lib"/>
<echo message="The version of the altrmi server libraries in ${lib.optional} must correspond"/>
<echo message="to the version of the altrmi client libraries in ${lib.instrumentation}."/>
<java classname="org.apache.excalibur.instrument.client.Main" fork="true">
<classpath>
<fileset dir="${lib.core}">
<include name="avalon-framework-*.jar"/>
<include name="excalibur-instrument-manager-interfaces-*.jar"/>
</fileset>
<fileset dir="${lib.optional}">
<include name="altrmi-common-*.jar"/>
</fileset>
<fileset dir="${lib.instrumentation}">
<include name="excalibur-instrument-client-*.jar"/>
<include name="altrmi-*.jar"/>
</fileset>
</classpath>
</java>
</target>
1.1 cocoon-2.1/tools/targets/init-build.xml
Index: init-build.xml
===================================================================
<!-- === Initialization Targets ================================================ -->
<target name="init">
<!-- Set the timestamps -->
<tstamp/>
<!-- Get the (constant) cocoon properties -->
<property file="src/java/org/apache/cocoon/cocoon.properties"/>
<!-- Detecting the current jvm -->
<condition property="target.vm" value="1.4">
<equals arg1="1.4" arg2="${ant.java.version}"/>
</condition>
<condition property="target.vm" value="1.3">
<not>
<equals arg1="1.4" arg2="${ant.java.version}"/>
</not>
</condition>
<!-- The location of tools.jar, relative to the JAVA_HOME home. -->
<property name="tools.jar" value="${java.home}/../lib/tools.jar"/>
<available file="${tools.jar}" property="tools.jar.present"/>
<!-- Allow users a chance to override without editing the main file -->
<property file="${user.home}/cocoon.build.properties"/>
<property file="local.build.properties"/>
<!-- Get the build properties from an external file -->
<property file="build.properties"/>
<!-- Allow users a chance to override without editing the main file -->
<property file="${user.home}/cocoon.blocks.properties"/>
<property file="local.blocks.properties"/>
<!-- Get the block properties from an external file -->
<property file="blocks.properties"/>
<!-- Use unless.exclude.XXX shadow props used in the
unless target attributes -->
<condition property="unless.exclude.webapp.documentation">
<istrue value="${exclude.webapp.documentation}"/>
</condition>
<condition property="unless.exclude.webapp.javadocs">
<or>
<istrue value="${exclude.javadocs}"/>
<istrue value="${exclude.webapp.javadocs}"/>
</or>
</condition>
<condition property="unless.exclude.webapp.idldocs">
<or>
<istrue value="${exclude.idldocs}"/>
<istrue value="${exclude.webapp.idldocs}"/>
</or>
</condition>
<condition property="unless.exclude.webapp.samples">
<istrue value="${exclude.webapp.samples}"/>
</condition>
<condition property="unless.exclude.deprecated">
<istrue value="${exclude.deprecated}"/>
</condition>
<condition property="unless.exclude.javadocs">
<istrue value="${exclude.javadocs}"/>
</condition>
<condition property="unless.exclude.idldocs">
<istrue value="${exclude.idldocs}"/>
</condition>
<condition property="exclude.validate.jars">
<isfalse value="${validate.jars}"/>
</condition>
<condition property="exclude.validate.config">
<isfalse value="${validate.config}"/>
</condition>
<condition property="exclude.validate.xdocs">
<isfalse value="${validate.xdocs}"/>
</condition>
<filter token="Name" value="${fullname}"/>
<filter token="name" value="${fullname}"/>
<filter token="year" value="${year}"/>
<filter token="version" value="${version}"/>
<filter token="date" value="${TODAY}"/>
<filter token="released.version" value="${released.version}"/>
<filter token="loglevel" value="${build.webapp.loglevel}"/>
<!-- Set classpath -->
<path id="classpath">
<fileset dir="${lib.local}">
<include name="*.jar"/>
</fileset>
<fileset dir="${lib}">
<include name="*.jar"/>
</fileset>
<fileset dir="${lib.endorsed}">
<include name="*.jar"/>
</fileset>
<fileset dir="${lib.core}">
<include name="*.jar"/>
</fileset>
<!-- Currently, we have no JVM dependent libraries
<fileset dir="${lib.core}/jvm${target.vm}">
<include name="*.jar"/>
</fileset>
-->
<fileset dir="${lib.optional}">
<include name="*.jar"/>
</fileset>
<path location="${build.mocks}"/>
<path location="${build.dest}"/>
</path>
</target>
<target name="init-tasks" depends="init">
<!-- Set classpath for building ant tasks -->
<path id="tasks.classpath">
<path refid="classpath"/>
<fileset dir="${tools.lib}">
<include name="*.jar"/>
</fileset>
<path location="${tools.tasks.dest}"/>
</path>
<!-- compile the ant tasks -->
<mkdir dir="${tools.tasks.dest}"/>
<javac srcdir="${tools.tasks.src}"
destdir="${tools.tasks.dest}"
debug="off"
optimize="on"
deprecation="on"
target="1.3"
nowarn="on"
compiler="${compiler}"
classpathref="tasks.classpath"/>
<!-- A task to patch xml files -->
<taskdef name="xpatch" classname="XConfToolTask" classpath="${tools.tasks.dest}"/>
<!-- Jing is used in various targets for XML validation with RELAX NG -->
<taskdef name="jing" classname="com.thaiopensource.relaxng.util.JingTask" classpathref="tasks.classpath"/>
<!-- compile the loader, used to change classpath especially for the CLI and Jetty -->
<mkdir dir="${tools.loader.dest}"/>
<javac srcdir="${tools.loader.src}"
destdir="${tools.loader.dest}"
debug="off"
optimize="on"
deprecation="on"
target="1.3"
nowarn="on"
compiler="${compiler}"/>
</target>
<!-- === Preparation Targets =================================================== -->
<!-- Prepare the build directory -->
<target name="prepare" depends="init-tasks">
<echo>+-----------------------------------------------------------+</echo>
<echo> ${fullname} ${version} [${year}]</echo>
<echo>+-----------------------------------------------------------+</echo>
<echo> Building with ${ant.version}</echo>
<echo> using build file ${ant.file}</echo>
<echo> Compiling with debug ${compiler.debug}, optimize ${compiler.optimize}, deprecation ${compiler.deprecation}</echo>
<echo>+--------------------| W A R N I N G |----------------------+</echo>
<echo> This build is targeted for use with JVM ${target.vm}</echo>
<echo> Using this build on a virtual machine other than the one</echo>
<echo> it is targeted for may result in runtime errors.</echo>
<echo>+-----------------------------------------------------------+</echo>
<mkdir dir="${build}"/>
</target>
<!-- === Clean Targets ========================================================= -->
<!-- Clean -->
<target name="clean" depends="clean-cocoon,clean-webapp,clean-standalone-demo" description="Cleans the cocoon build, webapp and standalone-demo"/>
<!-- Clean the cocoon build directory -->
<target name="clean-cocoon" depends="init" description="Cleans the cocoon build">
<delete dir="${build}"/>
</target>
<!-- Clean the webapp -->
<target name="clean-webapp" depends="init" description="Cleans the webapp">
<delete dir="${build.webapp}"/>
</target>
<!-- Clean the standalone demo -->
<target name="clean-standalone-demo" depends="init" description="Cleans the standalone-demo">
<delete dir="${build.standalone.demo}"/>
</target>
1.1 cocoon-2.1/tools/targets/webapp-build.xml
Index: webapp-build.xml
===================================================================
<!-- === Webapp targets ==================================================== -->
<target name="prepare-webapp" depends="blocks, package">
<mkdir dir="${build.webapp}"/>
<copy file="${webapp}/welcome.xml" tofile="${build.webapp}/welcome.xml" filtering="on"/>
<copy file="${webapp}/not-found.xml" tofile="${build.webapp}/not-found.xml" filtering="on"/>
<copy file="${webapp}/welcome.xslt" tofile="${build.webapp}/welcome.xslt" filtering="on"/>
<copy file="${webapp}/sitemap.xmap" tofile="${build.webapp}/sitemap.xmap"/>
<copy todir="${build.webapp}/stylesheets" filtering="on">
<fileset dir="${webapp}/stylesheets">
<include name="**/*.xslt"/>
</fileset>
</copy>
<copy todir="${build.webapp}/resources" filtering="off">
<fileset dir="${webapp}/resources"/>
</copy>
<copy todir="${build.webapp}/WEB-INF" filtering="on">
<fileset dir="${webapp}/WEB-INF">
<include name="entities/**"/>
<include name="classes/**"/>
<include name="*.x*"/>
</fileset>
</copy>
<copy file="${build}/${name}.jar" tofile="${build.webapp.lib}/${name}-${version}.jar"/>
<copy todir="${build.webapp.lib}">
<fileset dir="${lib}/endorsed">
<include name="*.jar"/>
<exclude name="servlet*.jar"/>
</fileset>
<fileset dir="${lib.core}">
<include name="*.jar"/>
<exclude name="servlet*.jar"/>
</fileset>
<!-- Currently, we have no JVM dependent libraries
<fileset dir="${lib.core}/jvm${target.vm}">
<include name="*.jar"/>
</fileset>
-->
<fileset dir="${lib.optional}">
<include name="*.jar"/>
<exclude name="servlet*.jar"/>
</fileset>
<fileset dir="${lib.local}">
<include name="*.jar"/>
<exclude name="servlet*.jar"/>
</fileset>
</copy>
<copy todir="${build.webapp.lib}">
<fileset dir="${build.blocks}">
<include name="*-block.jar"/>
</fileset>
<mapper type="glob" from="*-block.jar" to="cocoon-*-block.jar"/>
</copy>
<ant antfile="${build.temp}/blocks-build.xml"
inheritAll="true"
inheritRefs="false"
target="lib"/>
<ant antfile="${build.temp}/blocks-build.xml"
inheritAll="true"
inheritRefs="false"
target="patch-conf"/>
</target>
<target name="prepare-webapp-samples" depends="prepare-webapp, samples, block-samples" unless="unless.exclude.webapp.samples"/>
<target name="prepare-webapp-deprecated" depends="prepare-webapp" unless="unless.exclude.deprecated">
<copy file="${build}/${name}-deprecated.jar" tofile="${build.webapp.lib}/${name}-${version}-deprecated.jar"/>
<xpatch file="${build.webapp}/WEB-INF/cocoon.xconf"
srcdir="${deprecated.conf}"
includes="**/*.xconf"
addComments="true"/>
</target>
<target name="prepare-webapp-idldocs" depends="idldocs" unless="unless.exclude.webapp.idldocs">
<mkdir dir="${build.webapp.idldocs}"/>
<copy todir="${build.webapp.idldocs}" filtering="off">
<fileset dir="${build.idldocs}"/>
</copy>
<!-- patch the welcome page to tell we have idldocs to show -->
<xpatch file="${build.webapp}/welcome.xml"
srcdir="${idl}"
includes="**/*.xwelcome"/>
</target>
<target name="prepare-webapp-javadocs" depends="javadocs" unless="unless.exclude.webapp.javadocs">
<mkdir dir="${build.webapp.javadocs}"/>
<copy todir="${build.webapp.javadocs}" filtering="off">
<fileset dir="${build.javadocs}"/>
</copy>
<!-- patch the welcome page to tell we have javadocs to show -->
<xpatch file="${build.webapp}/welcome.xml"
srcdir="${resources.javadoc}"
includes="**/*.xwelcome"/>
</target>
<target name="prepare-webapp-docs" depends="validate-xdocs" unless="unless.exclude.webapp.documentation">
<mkdir dir="${build.webapp.docs}"/>
<copy todir="${build.webapp.docs}" filtering="on">
<fileset dir="${documentation}">
<exclude name="**/*.jpg"/>
<exclude name="**/*.gif"/>
<exclude name="**/*.png"/>
<exclude name="*.xwelcome"/>
</fileset>
</copy>
<!-- Add some other documents -->
<copy file="status.xml"
tofile="${build.webapp.docs}/xdocs/status.xml" filtering="on"/>
<!-- Forrest needs its own file at src/documentation/sitemap.xmap, so we
overwrite it with the old Cocoon-specific sitemap here -->
<copy file="${documentation}/sitemap-localdocs.xmap"
tofile="${build.webapp.docs}/sitemap.xmap" overwrite="true"/>
<copy todir="${build.webapp.docs}" filtering="off">
<fileset dir="${documentation}">
<include name="**/*.jpg"/>
<include name="**/*.gif"/>
<include name="**/*.png"/>
</fileset>
</copy>
<!-- patch the welcome page to tell we have documentation to show -->
<xpatch file="${build.webapp}/welcome.xml"
srcdir="${documentation}"
includes="**/*.xwelcome"/>
</target>
<target name="webapp" depends="prepare-webapp,prepare-webapp-samples,prepare-webapp-docs,prepare-webapp-javadocs,prepare-webapp-idldocs,prepare-webapp-deprecated,validate-jars,validate-config,custom-conf" description="Builds web application folder">
<!-- Add some other documents -->
<copy file="${build.temp}/jars.xml"
tofile="${build.webapp.docs}/xdocs/installing/jars.xml"
filtering="off" failonerror="false"/>
</target>
<target name="war" depends="webapp" description="Builds web application archive">
<!-- A task to create manifest for webapp. -->
<taskdef name="manifest" classname="ManifestToolTask" classpath="${tools.tasks.dest}"/>
<!-- Create WAR manifest -->
<manifest directory="${build.webapp.lib}" manifest="${build.webapp}/WEB-INF/Manifest.mf"/>
<!-- Package WAR file -->
<jar jarfile="${build.war}" manifest="${build.webapp}/WEB-INF/Manifest.mf">
<fileset dir="${build.webapp}"/>
</jar>
</target>
<target name="custom-conf" depends="init-tasks" description="Uses Cocoon's xpatch task to customize runtime configuration">
<xpatch file="${build.webapp}/sitemap.xmap" srcdir="">
<include name="${customconf}/*.xmap" />
<include name="${customconf}/*.xpipe" />
</xpatch>
<xpatch file="${build.webapp}/WEB-INF/cocoon.xconf" srcdir="" addComments="true">
<include name="${customconf}/*.xconf" />
</xpatch>
<xpatch file="${build.webapp}/WEB-INF/logkit.xconf" srcdir="">
<include name="${customconf}/*.xlog" />
</xpatch>
<xpatch file="${build.webapp}/WEB-INF/web.xml" srcdir="">
<include name="${customconf}/*.xweb" />
</xpatch>
</target>
1.1 cocoon-2.1/tools/ide/eclipse/classpath-tmpl.xml
Index: classpath-tmpl.xml
===================================================================
<?xml version="1.0"?>
<data>
<src-dirs><item>@SRC_DIRS@</item></src-dirs>
<mock-dirs><item>@MOCKS_DIRS@</item></mock-dirs>
<libs><item>@LIBS@</item></libs>
<output>@OUTPUT_DIR@</output>
</data>
1.1 cocoon-2.1/tools/ide/eclipse/project
Index: project
===================================================================
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>Cocoon @VERSION@</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
1.1 cocoon-2.1/tools/ide/eclipse/make-classpath.xsl
Index: make-classpath.xsl
===================================================================
<?xml version="1.0" encoding="UTF-8"?>
<!--
Build the Eclipse .classpath file from a list of path items
(see "eclipse-project" target in build.xml)
@author Sylvain Wallez
@version CVS $Id: make-classpath.xsl,v 1.1 2003/11/18 17:20:24 joerg Exp $
-->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output indent="yes" method="xml"/>
<xsl:strip-space elements="*"/>
<xsl:template match="/data">
<classpath>
<!-- 1. source dirs + mock classes -->
<xsl:for-each select="src-dirs/item | mock-dirs/item">
<!-- alphabetical sorting, complete path -->
<xsl:sort select="."/>
<classpathentry kind="src" path="{.}"/>
</xsl:for-each>
<!-- 2. libraries -->
<xsl:for-each select="libs/item">
<!-- alphabetical sorting, only file name -->
<!-- heavy calculation, but here's the logic:
1. returns the string after 4 slashes (4 is the max (blocks)),
returns empty string if string does not contain 4 slashes
2. ... 3 slashes ...
3. ... 2 slashes ... (the minimum) -->
<xsl:sort select="concat(substring-after(substring-after(substring-after(substring-after(., '/'), '/'), '/'), '/'),
substring-after(substring-after(substring-after(., '/'), '/'), '/'),
substring-after(substring-after(., '/'), '/'))"/>
<classpathentry kind="lib" path="{.}"/>
</xsl:for-each>
<!-- 3. JRE runtime -->
<classpathentry kind="var" path="JRE_LIB" rootpath="JRE_SRCROOT" sourcepath="JRE_SRC"/>
<!-- 4. output directory
Build in a separate dir since Eclipse is confused
by classes compiled externally by Sun's Javac -->
<classpathentry kind="output" path="{output}"/>
</classpath>
</xsl:template>
</xsl:stylesheet>
1.33 +14 -14 cocoon-2.1/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/cocoon-2.1/build.xml,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- build.xml 7 Aug 2003 16:40:22 -0000 1.32
+++ build.xml 18 Nov 2003 17:20:24 -0000 1.33
@@ -11,22 +11,22 @@
============================================================================ -->
<!-- ================== Apache Cocoon targets ======================== -->
- <!ENTITY init-targets SYSTEM "./src/targets/init-build.xml">
- <!ENTITY compile-targets SYSTEM "./src/targets/compile-build.xml">
- <!ENTITY validate-targets SYSTEM "./src/targets/validate-build.xml">
- <!ENTITY samples-targets SYSTEM "./src/targets/samples-build.xml">
- <!ENTITY webapp-targets SYSTEM "./src/targets/webapp-build.xml">
- <!ENTITY ide-targets SYSTEM "./src/targets/ide-build.xml">
- <!ENTITY test-targets SYSTEM "./src/targets/test-build.xml">
- <!ENTITY docs-targets SYSTEM "./src/targets/docs-build.xml">
- <!ENTITY dist-targets SYSTEM "./src/targets/dist-build.xml">
- <!ENTITY admin-targets SYSTEM "./src/targets/admin-build.xml">
- <!ENTITY standalone-demo-targets SYSTEM "./src/targets/standalone-demo-build.xml">
- <!ENTITY instrumentation-targets SYSTEM "./src/targets/instrumentation-build.xml">
+ <!ENTITY init-targets SYSTEM "tools/targets/init-build.xml">
+ <!ENTITY compile-targets SYSTEM "tools/targets/compile-build.xml">
+ <!ENTITY validate-targets SYSTEM "tools/targets/validate-build.xml">
+ <!ENTITY samples-targets SYSTEM "tools/targets/samples-build.xml">
+ <!ENTITY webapp-targets SYSTEM "tools/targets/webapp-build.xml">
+ <!ENTITY ide-targets SYSTEM "tools/targets/ide-build.xml">
+ <!ENTITY test-targets SYSTEM "tools/targets/test-build.xml">
+ <!ENTITY docs-targets SYSTEM "tools/targets/docs-build.xml">
+ <!ENTITY dist-targets SYSTEM "tools/targets/dist-build.xml">
+ <!ENTITY admin-targets SYSTEM "tools/targets/admin-build.xml">
+ <!ENTITY standalone-demo-targets SYSTEM "tools/targets/standalone-demo-build.xml">
+ <!ENTITY instrumentation-targets SYSTEM "tools/targets/instrumentation-build.xml">
<!-- =================================================================== -->
<!-- ================== Apache Forrest targets ======================= -->
- <!ENTITY forrest-targets SYSTEM "./src/targets/forrest-build.xml">
+ <!ENTITY forrest-targets SYSTEM "tools/targets/forrest-build.xml">
<!-- =================================================================== -->
]>
1.1 cocoon-2.1/tools/ide/emacs/prj.el.in
Index: prj.el.in
===================================================================
;; -*-emacs-lisp-*-
;;
;; Emacs JDE customization file for Cocoon. It is automatically used
;; if you have a decently recent version of GNU Emacs or Xemacs with JDE.
;;
;; Author: Ovidiu Predescu <ov...@apache.org>
;; Date: April 2002
;; JDE customization
(jde-project-file-version "1.0")
(jde-set-variables
'(jde-project-name "Cocoon")
'(jde-compile-option-classpath (split-path "@jar.files@"))
'(jde-compile-option-command-line-args "-g")
'(jde-compile-option-sourcepath (quote ("@src.dir@")))
'(jde-compile-option-directory "@build.war@/WEB-INF/classes")
'(jde-global-classpath (split-path "@jar.files@"))
'(jde-compile-option-debug (quote ("all" (t nil nil))))
'(jde-compiler "javac"))
;; Editor customization
(defun jde-cocoon-custom ()
;; Indentation level
(setq c-basic-offset 4)
;; Set TAB width to 8 characters
(setq tab-width 8)
;; Make sure no tabs are used
(setq indent-tabs-mode nil)
(setq c-toggle-auto-hungry-state 1))
(add-hook 'jde-mode-hook 'jde-cocoon-custom t)