You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by mp...@apache.org on 2002/08/22 18:07:50 UTC
cvs commit: xml-forrest/src/resources/forrest-shbat/bin setpwdvar.bat forrest.bat forrest.sh
mpo 2002/08/22 09:07:50
Modified: . build.build.xml forrest.build.xml
src/resources/forrest-shbat/bin forrest.bat forrest.sh
Added: src/resources/forrest-shbat/bin setpwdvar.bat
Log:
[wip] refactoring build - status-update
Still not functional, but parsing already.
Changed my dirty tabs from initial checkin.
Started to fill in some body.
Revision Changes Path
1.2 +155 -90 xml-forrest/build.build.xml
Index: build.build.xml
===================================================================
RCS file: /home/cvs/xml-forrest/build.build.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- build.build.xml 21 Aug 2002 15:55:43 -0000 1.1
+++ build.build.xml 22 Aug 2002 16:07:49 -0000 1.2
@@ -68,7 +68,7 @@
<echo>
--------------------------------------------------------------
- ${xgump.module.project.name} ${xgump.module.project.version.major}.${xgump.module.project.version.minor} [${YEAR}]
+ ${xgump.module.project.name} ${xgump.module.project.version.major}.${xgump.module.project.version.minor} [${YEAR}]
--------------------------------------------------------------
Using ${ant.version}
@@ -80,21 +80,24 @@
forrest-typical targets:
- dist ------------- build all incarnation distributions:
- dist-shbat ------- build the forrest.sh/bat incarnation (requires ant to *run*)
- dist-cent ??? ??? future target making centipede-cent
- dist-maven ??? ??? future target making maven plugin
- dist-jar ??? ??? future target making jar that has both main as ant-task wrapper classes
+ dist ------------- build all incarnation distributions:
+ dist-shbat ------- build the forrest.sh/bat incarnation (requires ant to *run*)
+ futrure targets:
- forrest-test targets:
+ dist-cent ??? ??? future target making centipede-cent
+ dist-maven ??? ??? future target making maven plugin
+ dist-jar ??? ??? future target making jar that has both main as ant-task wrapper classes
+
+
+ forrest-test targets:
docs ------------- generates static Forrest website for itself as the project to run on.
webapp ----------- builds webapp (.war) deployable version of Forrest website
bot.run ---------- runs the forrestbot using the configuration specified in
forrestbot.conf.xml
-
+
default centipede targets:
compile ---------- compiles the source code
@@ -184,94 +187,156 @@
<!-- =================================================================== -->
<!-- Make all known distributions -->
<!-- =================================================================== -->
- <target name="dist"
- description="Makes all the known incarnations of forrest"
- depends="dist-shbat" />
+ <target name="dist"
+ description="Makes all the known incarnations of forrest"
+ depends="dist-shbat" />
-
+
<!-- =================================================================== -->
<!-- Make the zip that holds what a fresh site should look like -->
<!-- =================================================================== -->
- <target name="fresh-site-zip" depends="init">
- <property name="fresh-site.zip" value="./build/fresh-site.zip" />
- <echo>
- TODO... COMPLETE THIS
- ... I need to build a zip that holds the typical content of a basic (empty forrest project)
- (including the siteplan.xml, a hint fot build.xml, status.xml,...)
- (see what acorn provides, I really think this should just be managed in some
- ./src/resources/fresh-site directory if you ask me )
- </echo>
- </target>
+ <target name="fresh-site-zip" depends="init">
+ <!-- TODO: decide on a better place to read/set this prop from/to -->
+ <property name="fresh-site.zip" value="./build/fresh-site.zip" />
+ <zip destfile="${fresh-site.zip}" basedir="${resource.dir}/fresh-site" />
+ </target>
-
+
<!-- =================================================================== -->
<!-- Make the WEB-INF directory like cocoon (CLI or webapp) needs it -->
<!-- =================================================================== -->
- <target name="webapp-webinf" depends="init, compile" >
- <property name="webapp.webinf.dir" value="./build/webapp/WEB-INF" />
- <echo>
- TODO... COMPLETE THIS
- ... I need to build the WEB-INF directory for inclusion in the webapp and
- in the many distributions that will use me.
- Those distributions need me to extend their classpath when calling the
- cocoon CLI.
- </echo>
- </target>
+ <target name="webapp-webinf" depends="init, compile" >
+ <!-- TODO: decide on a better place to read/set this prop from/to -->
+ <property name="webapp.webinf.dir" value="./build/webapp/WEB-INF" />
+
+ <mkdir dir="${webapp.webinf.dir}" />
+ <copy todir="${webapp.webinf.dir}" >
+ <fileset dir="${resource.dir}/conf" >
+ <exclude name="sitemap.xmap" />
+ </fileset>
+ </copy>
+
+ <mkdir dir="${webapp.webinf.dir}/classes" />
+ <copy todir="${webapp.webinf.dir}/classes" >
+ <fileset dir="${resource.dir}/schema">
+ <include name="CatalogManager.properties"/>
+ </fileset>
+ <fileset dir="${build.dest}">
+ <include name="**/*.class"/>
+ </fileset>
+ <fileset dir="${build.scratchpad.dest}">
+ <include name="**/*.class"/>
+ </fileset>
+ </copy>
+
+ <mkdir dir="${webapp.webinf.dir}/lib"/>
+ <copy todir="${webapp.webinf.dir}/lib">
+ <fileset dir="./lib/endorsed" />
+ <fileset dir="./lib/core"/>
+ <fileset dir="./lib/optional"/>
+ <fileset dir="./src/scratchpad/lib"/>
+ </copy>
+ </target>
+
+
+ <!-- =================================================================== -->
+ <!-- Make the bare context directory like cocoon (CLI or webapp) needs it-->
+ <!-- =================================================================== -->
+ <target name="bare-context-dir" depends="init, compile" >
+ <!-- TODO: decide on a better place to read/set this prop from/to -->
+ <property name="bare-context.dir" value="./build/bare-context" />
+
+ <!-- Copy entity catalog, entities and class files -->
+ <copy todir="${bare-context.dir}/resources/schema" >
+ <fileset dir="${resource.dir}/schema"/>
+ </copy>
+
+ <!-- Copy Cocoon configuration and sitemap -->
+ <copy todir="${bare-context.dir}">
+ <fileset dir="${resource.dir}/conf">
+ <include name="sitemap.xmap"/>
+<!-- this is already in the WEB-INF, I think we don't need it any more?
+ <include name="cocoon.xconf"/>
+ <include name="logkit.xconf"/>
+-->
+ </fileset>
+ </copy>
+
+ <!-- Copy libraries -->
+ <copy todir="${bare-context.dir}/library/" >
+ <fileset dir="${resource.dir}/library" />
+ </copy>
+
+ <!-- Copy skins -->
+ <copy todir="${bare-context.dir}/skins/" >
+ <fileset dir="${resource.dir}/skins" />
+ </copy>
+
+ </target>
+
<!-- =================================================================== -->
<!-- Make the shell-bat distribution -->
<!-- =================================================================== -->
- <target name="dist-shbat" depends="compile, fresh-site-zip, webapp-webinf" >
- <!-- TODO: decide on a better place to read/set this prop from/to -->
- <property name="dist-shbat.dir" value="./build/dist/shbat" />
-
- <!-- fresh drop-off location for the distribution -->
- <delete dir="${dist-shbat.dir}" />
- <mkdir dir="${dist-shbat.dir}" />
-
- <!-- copy the ant script at the heart of the distribution -->
- <copy todir="${dist-shbat.dir}" file="forrest.build.xml" />
-
- <!-- copy the fresh-site.zip to clone from -->
- <copy todir="${dist-shbat.dir}" file="${fresh-site.zip}" />
-
- <!-- copy the prepared and wrapper stuff for the distribution -->
- <copy todir="${dist-shbat.dir}">
- <fileset dir="./src/resources/forrest-shbat" />
- </copy>
-
- <!-- copy the web-inf as needed by the cocoon CLI -->
- <mkdir dir="${dist-shbat.dir}/WEB-INF">
- <copy todir="${dist-shbat.dir}/WEB-INF">
- <fileset dir="${webapp.webinf.dir}" />
- </copy>
+ <target name="dist-shbat"
+ depends="fresh-site-zip, webapp-webinf, bare-context-dir" >
+ <!-- TODO: decide on a better place to read/set this prop from/to -->
+ <property name="dist-shbat.dir" value="./build/dist/shbat" />
+
+ <!-- fresh drop-off location for the distribution -->
+ <delete dir="${dist-shbat.dir}" />
+ <mkdir dir="${dist-shbat.dir}" />
+
+ <!-- copy the ant script at the heart of the distribution -->
+ <copy todir="${dist-shbat.dir}" file="forrest.build.xml" />
+
+ <!-- copy the prepared and wrapper stuff for the distribution -->
+ <copy todir="${dist-shbat.dir}">
+ <fileset dir="./src/resources/forrest-shbat" />
+ </copy>
+
+ <!-- copy the fresh-site.zip to clone from -->
+ <copy todir="${dist-shbat.dir}" file="${fresh-site.zip}" />
+
+ <!-- copy the web-inf as needed by the cocoon CLI -->
+ <mkdir dir="${dist-shbat.dir}/WEB-INF" />
+ <copy todir="${dist-shbat.dir}/WEB-INF">
+ <fileset dir="${webapp.webinf.dir}" />
+ </copy>
+
+ <!-- copy the bare-context dir as needed by the cocoon CLI -->
+ <mkdir dir="${dist-shbat.dir}/context" />
+ <copy todir="${dist-shbat.dir}/context">
+ <fileset dir="${bare-context.dir}" />
+ </copy>
- <echo>
+ <echo>
+ *-----------------------------------------------------------------
+ | installation notice
*-----------------------------------------------------------------
- | installation notice
- *-----------------------------------------------------------------
- | You have succesfully build the shell-bat version of forrest.
- | Please find it at: ${dist-shbat.dir}
- | Please copy the contents to the install directory of your choice
- | Please have the environment variable FORREST_HOME point to it.
- | It is recommended to add
- | unix: $FORREST_HOME/bin: to your $PATH
- | win: %FORREST_HOME%\bin; to your %PATH%
- | Calling
- | unix: $FORREST_HOME/bin/forrest.sh usage
- | win: %FORREST_HOME%\bin\forrest.bat usage
- | will explain how to use this distribution.
- | More help at http://xml.apache.org/forrest and forrest-dev@xml.apache.org
- *-----------------------------------------------------------------
- </echo>
- </target>
+ | You have succesfully build the shell-bat version of forrest.
+ | Please find it at: ${dist-shbat.dir}
+ | Please copy the contents to the install directory of your choice
+ | Please have the environment variable FORREST_HOME point to it.
+ | It is recommended to add
+ | unix: $FORREST_HOME/bin: to your $PATH
+ | win: %FORREST_HOME%\bin; to your %PATH%
+ | Calling
+ | unix: $FORREST_HOME/bin/forrest.sh usage
+ | win: %FORREST_HOME%\bin\forrest.bat usage
+ | will explain how to use this distribution.
+ | More help at http://xml.apache.org/forrest and forrest-dev@xml.apache.org
+ *-----------------------------------------------------------------
+ </echo>
+ </target>
<!-- =================================================================== -->
<!-- Validate xml -->
<!-- =================================================================== -->
- <target name="validate-docs" description="Checks that the xml files are valid and conform to the DTD.">
+ <target name="validate-docs"
+ description="Checks that the xml files are valid and conform to the DTD.">
<xmlvalidate failonerror="yes" lenient="yes" warn="yes"
className="org.apache.xerces.parsers.SAXParser">
<classpath>
@@ -289,13 +354,13 @@
<!-- Generate project-site -->
<!-- =================================================================== -->
<target name="site" >
- <echo>
- NOT DONE YET - probably depends on some compilation stuff (rather then on our distributions?)
- ... this should set forrest.home and project.home and get the docs out.
- via the forrest.build.xml instead.
- should have some comment inside explaining THIS IS NOT the way to do it
- for your own projects.
- </echo>
+ <echo>
+ NOT DONE YET - probably depends on some compilation stuff (rather then on our distributions?)
+ ... this should set forrest.home and project.home and get the docs out.
+ via the forrest.build.xml instead.
+ should have some comment inside explaining THIS IS NOT the way to do it
+ for your own projects.
+ </echo>
</target>
@@ -303,11 +368,11 @@
<!-- Generate cocoon-webapp for project-site -->
<!-- =================================================================== -->
<target name="webapp" >
- <echo>
- NOT DONE YET - probably depends on some compilation stuff
- ... this should set forrest.home and project.home and get the docs out.
- via the forrest.build.xml instead.
- </echo>
+ <echo>
+ NOT DONE YET - probably depends on some compilation stuff
+ ... this should set forrest.home and project.home and get the docs out.
+ via the forrest.build.xml instead.
+ </echo>
</target>
@@ -321,9 +386,9 @@
<fileset dir="src/resources/forrestbar" includes="content/**/*" />
</jar>
<copy file="src/resources/forrestbar/install.js"
- todir="${build.dir}/work/forrestbar" overwrite="true" />
+ todir="${build.dir}/work/forrestbar" overwrite="true" />
<zip zipfile="${build.dir}/forrestbar.xpi"
- basedir="${build.dir}/work/forrestbar" />
+ basedir="${build.dir}/work/forrestbar" />
</target>
1.2 +199 -157 xml-forrest/forrest.build.xml
Index: forrest.build.xml
===================================================================
RCS file: /home/cvs/xml-forrest/forrest.build.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- forrest.build.xml 21 Aug 2002 15:55:43 -0000 1.1
+++ forrest.build.xml 22 Aug 2002 16:07:49 -0000 1.2
@@ -12,17 +12,17 @@
<project default="site" basedir="." name="Forrest template targets">
- <description>
- *=======================================================*
- | Forrest ant based site building target-temaplates |
- *=======================================================*
- by
- Marc Portier (mpo@apache.org)
-
- Call this through the ./bin/forrest.sh or *.bat
- </description>
-
-
+ <description>
+ *=======================================================*
+ | Forrest ant based site building target-temaplates |
+ *=======================================================*
+ by
+ Marc Portier (mpo@apache.org)
+
+ Call this through the ./bin/forrest.sh or *.bat
+ </description>
+
+
<!-- ***************************************************************** -->
<!-- ***************************************************************** -->
@@ -40,38 +40,43 @@
Echo's the settings if requested.
=============================================================== -->
<target name="init">
-
- <!-- setting defaults for parameters -->
+
+ <!-- setting defaults for parameters -->
<!-- people should use -D switch, or <ant><property>s to override these -->
- <property name="forrest.home" value="." />
- <property name="project.home" value="." />
+ <property name="forrest.home" value="." />
+ <property name="project.home" value="." />
<!-- people should use forrest.properties to override following defaults -->
- <property file="${project.home}/forrest.properties" />
+ <echo message="Loading project specific properties from ${project.home}/forrest.properties" />
+ <property file="${project.home}/forrest.properties" />
- <property name="project.site-dir" value="${project.home}/build/site" />
- <property name="project.siteplan" value="${project.home}/siteplan.xml" />
+ <property name="project.site-dir" value="${project.home}/build/site" />
+ <property name="project.siteplan" value="${project.home}/siteplan.xml" />
- <property name="project.temp-dir" value="${project.home}/build/tmp" />
- <property name="project.work-dir" value="${project.tmp-dir}/work" />
- <property name="project.ctxt-dir" value="${project.tmp-dir}/context" />
+ <property name="project.temp-dir" value="${project.home}/build/tmp" />
+ <property name="project.work-dir" value="${project.temp-dir}/work" />
+ <property name="project.ctxt-dir" value="${project.temp-dir}/context" />
+ <!-- use of this property should be removed when the siteplan becomes active -->
+ <property name="project.skin" value="forrest-skin" />
- <!-- checks for presence of required classes and/or resources -->
+
+
+ <!-- checks for presence of required classes and/or resources -->
<property name="tools.jar" location="${java.home}/../lib/tools.jar"/>
<available file="${tools.jar}" property="tools.jar.present"/>
-
-
+
+
<!-- echo settings in -Dforrest.echo=true mode -->
- <antcall target="echo-settings">
+ <antcall target="echo-settings" />
</target>
<!-- ===============================================================
Echo's the settings if requested. [-Dforrest.echo=true]
=============================================================== -->
- <target name="echo-settings" depends="init" if="forrest.echo">
+ <target name="echo-settings" if="forrest.echo">
<echo>
------------------------------------------------
| Forrest template run.
@@ -90,19 +95,31 @@
<!-- ===============================================================
+ Set class-path.
+ =============================================================== -->
+ <target name="prepare-classpath" depends="init" >
+ <path id="forrest.cp">
+ <fileset dir="${forrest.home}/WEB-INF/lib" includes="*.jar" />
+ <pathelement location="${tools.jar}"/>
+ <pathelement location="${bot.build.dir}/WEB-INF/classes"/>
+ </path>
+ </target>
+
+
+ <!-- ===============================================================
Display the usage of this script.
=============================================================== -->
- <target name="usage" depends="init">
- <echo>
- TODO... COMPLETE THIS:
- should explain the usage.
- part of it being: refering to the shell or bat use
- part of it being: <ant antfile=...>
- setting FORREST_HOME and the like.
- description of the targets.
- starting with fresh-project and looking at the siteplan that comes out of it.
- </echo>
- </target>
+ <target name="usage" depends="init">
+ <echo>
+ TODO... COMPLETE THIS:
+ should explain the usage.
+ part of it being: refering to the shell or bat use
+ part of it being: <ant antfile=...>
+ setting FORREST_HOME and the like.
+ description of the targets.
+ starting with fresh-project and looking at the siteplan that comes out of it.
+ </echo>
+ </target>
<!-- ***************************************************************** -->
@@ -117,84 +134,123 @@
<!-- ===============================================================
+ Fills the Cocoon context dir to work in
+ with the forrest-predefines.
+ param: location to make context-dir?
+ (we could just make up a temp one, and clean when done)
+ =============================================================== -->
+ <target name="bare-context" depends="init" >
+ <!-- TODO get rid of this hackerism -->
+ <!-- The birth of the siteplan could help in getting rid of these -->
+ <filter token="skin" value="${project.skin}" />
+ <filter token="link1" value="apache"/>
+ <filter token="link1.href" value="http://www.apache.org/"/>
+ <filter token="link2" value="xml.apache"/>
+ <filter token="link2.href" value="http://xml.apache.org/"/>
+ <!-- the breadcrumb script already generates it,
+ so it needs to be kept blank -->
+ <filter token="link3" value=""/>
+ <filter token="link3.href" value=""/>
+ <filter token="group-logo.src" value="images/group-logo.gif"/>
+ <filter token="group-logo.href" value="http://xml.apache.org/"/>
+ <filter token="group-logo.alt" value="Apache XML logo"/>
+ <filter token="project-logo.src" value="images/project-logo.gif"/>
+ <filter token="project-logo.href" value="http://xml.apache.org/forrest/"/>
+ <filter token="project-logo.alt" value="Forrest logo"/>
+ <filter token="year" value="2002"/>
+ <filter token="vendor" value="Apache Sofware Foundation"/>
+
+ <!-- NOW: filter-copy the empty-forrest-context -->
+ <!-- WITH SitePlan: smaller empty-context, 1 unfiltered copy
+ + generate more stuff from siteplan -->
+
+ <copy toDir="${project.ctxt-dir}/" filtering="off">
+ <fileset dir="${forrest.home}/context" >
+ <exclude name="sitemap.xmap" />
+ <exclude name="skins/**" />
+ <include name="skins/**/images/**" />
+ </fileset>
+ </copy>
+
+ <copy toDir="${project.ctxt-dir}/" filtering="on">
+ <!-- everything in the skins, except the images , and the sitemap -->
+ <fileset dir="${forrest.home}/context" >
+ <include name="sitemap.xmap" />
+ <exclude name="skins/**/images/**" />
+ <include name="skins/**" />
+ </fileset>
+ </copy>
+ </target>
+
+ <!-- ===============================================================
Makes the Cocoon context dir to work in.
- Fills it with
- forrest predefines.
- site-content-parts
- derivatives from siteplan
- param: location of siteplan $project.siteplan
- param: location to make context-dir?
- (we could just make up a temp one, and clean when done)
- =============================================================== -->
- <target name="prepare-context" depends="init" >
- <echo>
- TODO... COMPLETE THIS:
- ... some style and copy tasks?
-
- </echo>
+ Fills it with
+ forrest predefines.
+ site-content-parts
+ derivatives from siteplan
+ param: location of siteplan $project.siteplan
+ param: location to make context-dir?
+ (we could just make up a temp one, and clean when done)
+ =============================================================== -->
+ <target name="prepare-context" depends="init, bare-context" >
- </target>
+ <echo>
+ TODO... COMPLETE THIS:
+ ... some style and copy tasks?
+ </echo>
+
+ </target>
<!-- ===============================================================
Makes the site
- param: location of siteplan ${forrest.siteplan}
- param: location to put generated site ${forrest.out.dir}
+ param: location of siteplan ${project.siteplan}
+ param: location to put generated site ${project.site-dir}
=============================================================== -->
- <target name="site" depends="init, prepare-context, clean-site ">
- <path id="forrest.cp">
- <fileset dir="${forrest.home}/WEB-INF/lib" includes="**/*.jar" />
- </path>
+ <target name="site" depends="init, prepare-context, clean-site, prepare-classpath">
- <echo>
- TODO... COMPLETE THIS:
- ... should call cocoon CLI on set forrest.cococontxt.dir
- </echo>
+ <echo>
+ TODO... COMPLETE THIS:
+ ... should call cocoon CLI on set forrest.cococontxt.dir
+ </echo>
</target>
- <!-- ===============================================================
- Cleans the site. (typically before generating the new version)
- param: location to clean ${forrest.out.dir}
+ <!-- ===============================================================
+ Cleans the site. (typically before generating the new version)
+ param: location to clean ${project.site-dir}
=============================================================== -->
<target name="clean-site">
- <echo>
- TODO... COMPLETE THIS:
- ... should delete the site before building it
- </echo>
-
- <!--
- <delete dir="${forrest.out.dir}"/>
- -->
+ <delete dir="${project.site-dir}"/>
</target>
- <!-- ===============================================================
+ <!-- ===============================================================
Builds a cocoon webapp for your project based on the siteplan.
- param: location of siteplan ${forrest.siteplan}
- param: location to put generated war ${forrest.out.war}
+ param: location of siteplan ${forrest.siteplan}
+ param: location to put generated war ${forrest.out.war}
=============================================================== -->
- <target name="webapp" depends="init, prepare-context">
- <echo>
- TODO... COMPLETE THIS:
- ... this should just war up the prepared context dir.
- </echo>
- </target>
+ <target name="webapp" depends="init, prepare-context">
+ <echo>
+ TODO... COMPLETE THIS:
+ ... this should just war up the prepared context dir.
+ </echo>
+ </target>
- <!-- ===============================================================
+ <!-- ===============================================================
Validates all XML documents in the projects-
- param: location of siteplan ${forrest.siteplan}
- param: location to put generated war ${forrest.out.war}
+ param: location of siteplan ${forrest.siteplan}
+ param: location to put generated war ${forrest.out.war}
=============================================================== -->
- <target name="validate-docs" depends="init, prepare-context">
- <echo>
- TODO... COMPLETE THIS:
- ... this should just war up the prepared context dir.
- </echo>
- </target>
+ <target name="validate-docs" depends="init, prepare-context">
+ <echo>
+ TODO... COMPLETE THIS:
+ ... this should just war up the prepared context dir.
+ </echo>
+ </target>
@@ -210,23 +266,31 @@
- <!-- ===============================================================
- Copies a template structure over to your project dir.
+ <!-- ===============================================================
+ Copies a template structure over to your project dir.
- flag: with or without room for own skin
- ... flags for others... thers
+ flag: with or without room for own skin
+ ... flags for others... thers
Mind this is typically called before any forrest.properties
or siteplan.xml exists (we should consider generating those as well
maybe even a template ant build?
- dependend task for doing that alone.
- >>> filling this with stuff from smart acorn.xml idea.
+ dependend task for doing that alone.
+ >>> filling this with stuff from smart acorn.xml idea.
=============================================================== -->
- <target name="fresh-project"
- depends="fresh-xdocs, fresh-skin, fresh-descriptors, fresh-build" />
+ <target name="fresh-project">
+ <!--
+ depends="fresh-xdocs, fresh-skin, fresh-descriptors, fresh-build" />
+ -->
+ <echo>
+ TODO: COMPLETE THIS....
+ with the various dependencies....
+ should be using some mechanism in the ant unzip task so we NEVER overwrite content already present in the PROJECT.HOME! (probably exists on unzip task)
+ </echo>
+ </target>
@@ -245,71 +309,49 @@
<!-- TODO... COMPLETE THIS: -->
- <target name="bot.init" depends="init">
- <!-- initializes environment to start on bot targets -->
- <property name="bot.build.dir" value="${xlayout.build.bot.dir}"/>
- <property name="bot.work.build.xml" value="${bot.build.dir}/work.build.xml"/>
- <property name="bot.default.parameters.xml" value="${bot.build.dir}/default.parameters.xml"/>
- <property name="bot.forrestbot.xconf" value="forrestbot.conf.xml" />
- <property file="ant-mail.properties" />
- <property name="bot.templates.build.xml" value="${xlayout.source.resources.forrestbot.ant.di
- r}/templates.build.xml" />
- <property name="bot.work.builder.xslt" value="${xlayout.source.resources.forrestbot.xslt.d
- ir}/config2work.xsl" />
- <property name="bot.default.builder.xslt" value="${xlayout.source.resources.forrestbot.xslt.d
- ir}/config2defaults.xsl" />
- <mkdir dir="${bot.build.dir}" />
- <echo message="Using config file: ${bot.forrestbot.xconf}" />
- </target>
-
- <target name="bot.conf2build" depends="bot.init" >
- <!-- remove previous versions to force generation again -->
- <delete file="${bot.work.build.xml}" />
- <delete file="${bot.default.parameters.xml}" />
-
- <!-- builds the different xml files this process needs. -->
- <style in="${bot.forrestbot.xconf}"
- out="${bot.work.build.xml}"
- style="${bot.work.builder.xslt}"/>
- <style in="${bot.forrestbot.xconf}"
- out="${bot.default.parameters.xml}"
- style="${bot.default.builder.xslt}"/>
- <copy todir="${bot.build.dir}" file="${bot.templates.build.xml}"/>
- </target>
-
- <target name="bot.prepare-cp" depends="bot.init, compile" >
- <!-- todo: question if it is good practice to share WEB-INF classes -->
- <mkdir dir="${bot.build.dir}/WEB-INF/classes"/>
- <copy todir="${bot.build.dir}/WEB-INF/classes">
- <fileset dir="${resource.dir}/schema">
- <include name="CatalogManager.properties"/>
- </fileset>
- <fileset dir="${build.dest}">
- <include name="**/*.class"/>
- </fileset>
- <fileset dir="${build.scratchpad.dest}">
- <include name="**/*.class"/>
- </fileset>
- </copy>
+ <!-- TODO: nuke this target after handling what it did elsewhere -->
+ <target name="bot.init" depends="init">
+ <!-- TODO: moce this to main init, should cone from project.home/forrest.properties -->
+ <property name="bot.build.dir" value="${xlayout.build.bot.dir}"/>
+ <property name="bot.forrestbot.xconf" value="forrestbot.conf.xml" />
+
+ <!-- TODO: needs to be in the distribution -->
+ <property name="bot.templates.build.xml"
+ value="${xlayout.source.resources.forrestbot.ant.dir}/templates.build.xml" />
+ <property name="bot.work.builder.xslt"
+ value="${xlayout.source.resources.forrestbot.xslt.dir}/config2work.xsl" />
+ <property name="bot.default.builder.xslt"
+ value="${xlayout.source.resources.forrestbot.xslt.dir}/config2defaults.xsl" />
+ </target>
- <path id="forrest.cp">
- <path refid="classpath"/>
- <fileset dir="${build.dir}">
- <include name="*.jar"/>
- </fileset>
- <fileset dir="${tools.dir}">
- <include name="*/lib/*.jar"/>
- </fileset>
- <pathelement location="${tools.jar}"/>
- <pathelement location="${bot.build.dir}/WEB-INF/classes"/>
- </path>
+
+ <target name="bot.conf2build" depends="bot.init" >
+ <mkdir dir="${bot.build.dir}" />
+ <echo message="Using config file: ${bot.forrestbot.xconf}" />
+
+ <property name="bot.work.build.xml" value="${bot.build.dir}/work.build.xml"/>
+ <property name="bot.default.parameters.xml" value="${bot.build.dir}/default.parameters.xml"/>
+
+ <!-- remove previous versions to force generation again -->
+ <delete file="${bot.work.build.xml}" />
+ <delete file="${bot.default.parameters.xml}" />
+
+ <!-- builds the different xml files this process needs. -->
+ <style in="${bot.forrestbot.xconf}"
+ out="${bot.work.build.xml}"
+ style="${bot.work.builder.xslt}"/>
+ <style in="${bot.forrestbot.xconf}"
+ out="${bot.default.parameters.xml}"
+ style="${bot.default.builder.xslt}"/>
+ <copy todir="${bot.build.dir}" file="${bot.templates.build.xml}"/>
</target>
+
+ <target name="bot" depends="bot.conf2build, prepare-classpath" >
<!-- delegates to the generated XML file -->
<ant antfile="${bot.work.build.xml}" target="work" inheritRefs="true"/>
</target>
- <target name="bot" depends="bot.run" />
</project>
1.2 +3 -2 xml-forrest/src/resources/forrest-shbat/bin/forrest.bat
Index: forrest.bat
===================================================================
RCS file: /home/cvs/xml-forrest/src/resources/forrest-shbat/bin/forrest.bat,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- forrest.bat 21 Aug 2002 15:55:43 -0000 1.1
+++ forrest.bat 22 Aug 2002 16:07:50 -0000 1.2
@@ -5,13 +5,14 @@
if %ANT_HOME%a==a goto noant
Rem ----- set the current working dir as the PROJECT_HOME variable ----
-set PROJECT_HOME=.
+call %FORREST_HOME%\bin\setpwdvar.bat
+set PROJECT_HOME=%PWD%
Rem ----- set the ant file to use --------------------------------------
set ANTFILE=%FORREST_HOME%\forrest.build.xml
Rem ----- call ant.. ---------------------------------------------------
-call %ANT_HOME%\bin\ant -buildfile %ANTFILE% -Dproject.home=%PROJECT_HOME% -emacs -logger org.apache.tools.ant.NoBannerLogger %1 %2 %3 %4 %5 %6 %7 %8 %9
+call %ANT_HOME%\bin\ant -buildfile %ANTFILE% -Dproject.home=%PROJECT_HOME% -Dforrest.home=%FORREST_HOME% -emacs -logger org.apache.tools.ant.NoBannerLogger %1 %2 %3 %4 %5 %6 %7 %8 %9
goto end
1.2 +4 -4 xml-forrest/src/resources/forrest-shbat/bin/forrest.sh
Index: forrest.sh
===================================================================
RCS file: /home/cvs/xml-forrest/src/resources/forrest-shbat/bin/forrest.sh,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- forrest.sh 21 Aug 2002 15:55:43 -0000 1.1
+++ forrest.sh 22 Aug 2002 16:07:50 -0000 1.2
@@ -5,8 +5,8 @@
# and bail out if it does not with a message that it is required
if [ "$ANT_HOME" = "" ] ; then
- echo You must install Ant (http://jakarta.apache.org/ant)
- echo and set ANT_HOME to point at your Ant Installation directory
+ echo "You must install Ant (http://jakarta.apache.org/ant)"
+ echo "and set ANT_HOME to point at your Ant Installation directory."
exit 1
fi
@@ -15,7 +15,7 @@
PROJECT_HOME=$PWD
# set the ant file to use
-ANTFILE=$FORREST_HOME\forrest.build.xml
+ANTFILE=$FORREST_HOME/forrest.build.xml
# call ant.
-$ANT_HOME/bin/ant -buildfile $ANTFILE -Dproject.home=$PROJECT_HOME -emacs -logger org.apache.tools.ant.NoBannerLogger $@
+$ANT_HOME/bin/ant -buildfile $ANTFILE -Dproject.home=$PROJECT_HOME -Dforrest.home=$FORREST_HOME -emacs -logger org.apache.tools.ant.NoBannerLogger $@
1.1 xml-forrest/src/resources/forrest-shbat/bin/setpwdvar.bat
Index: setpwdvar.bat
===================================================================
@echo off
if %1*==* goto recurse
set PWD=%~f1
goto end
:recurse
%~dpn0 .
:end