cziegeler 01/10/05 02:41:15 Modified: . Tag: cocoon_20_branch build.xml webapp Tag: cocoon_20_branch sitemap.xmap Log: Installed new build system Revision Changes Path No revision No revision 1.8.2.43 +142 -162 xml-cocoon2/build.xml Index: build.xml =================================================================== RCS file: /home/cvs/xml-cocoon2/build.xml,v retrieving revision 1.8.2.42 retrieving revision 1.8.2.43 diff -u -r1.8.2.42 -r1.8.2.43 --- build.xml 2001/09/25 14:17:34 1.8.2.42 +++ build.xml 2001/10/05 09:41:15 1.8.2.43 @@ -180,20 +180,13 @@ <property name="src.dir" value="./src"/> <property name="lib.dir" value="./lib"/> <property name="bin.dir" value="./bin"/> - <property name="docs.dir" value="./xdocs"/> - <property name="dtd.dir" value="./xdocs/dtd"/> - <property name="skins.dir" value="./skins"/> - <property name="images.dir" value="./xdocs/images"/> + <property name="docs.dir" value="./documentation/xdocs"/> + <property name="images.dir" value="./documentation/images"/> <property name="webapp.dir" value="./webapp"/> <property name="resource.dir" value="./resources"/> <property name="packages" value="org.apache.*"/> + <property name="context.dir" value="./documentation"/> - <property name="browser.skin" value="${skins.dir}/xml.apache.org/"/> - <property name="printer.skin" value="${skins.dir}/printer/"/> - <property name="browser.projfile" value="docs-book.xml"/> - <property name="site.projfile" value="site-book.xml"/> - <property name="doc.generator" value="org.apache.stylebook.StyleBook"/> - <property name="build.root" value="./build"/> <property name="build.dir" value="${build.root}/${name}"/> <property name="build.src" value="${build.dir}/src"/> @@ -203,6 +196,7 @@ <property name="build.docs.printer" value="${build.dir}/printer-docs"/> <property name="build.war" value="${build.dir}/webapp"/> <property name="build.javadocs" value="${build.dir}/javadocs"/> + <property name="build.context" value="${build.dir}/documentation"/> <property name="dist.root" value="./dist"/> <property name="dist.dir" value="${dist.root}/${name}-${version}"/> @@ -426,9 +420,87 @@ </target> <!-- =================================================================== --> + <!-- Prepares the docs --> + <!-- =================================================================== --> + <target name="prepare-docs" depends="init"> + + <mkdir dir="${build.context}"/> + <mkdir dir="${build.context}/images"/> + <mkdir dir="${build.docs}"/> + <mkdir dir="${build.dir}/work"/> + + <!-- make filtered copy of XML docs --> + <copy todir="${build.context}" filtering="on"> + <fileset dir="${context.dir}"> + <exclude name="images/**"/> + </fileset> + </copy> + + <!-- Add changes and todo --> + <copy file="changes.xml" tofile="${build.context}/xdocs/changes.xml" filtering="on"/> + <copy file="todo.xml" tofile="${build.context}/xdocs/todo.xml" filtering="on"/> + <replace file="${build.context}/xdocs/changes.xml" token="./xdocs/dtd/" value="dtd/"/> + <replace file="${build.context}/xdocs/todo.xml" token="./xdocs/dtd/" value="dtd/"/> + + <!-- Copy images --> + <copy todir="${build.context}/images" filtering="off"> + <fileset dir="${context.dir}/images"/> + </copy> + + </target> + + + <!-- =================================================================== --> + <!-- Set a variable if the generated docs are already up-to-date. --> + <!-- =================================================================== --> + <target name="docs_check" depends="init"> + <uptodate property="docs.notrequired" targetfile="${build.docs}/index.html" > + <srcfiles dir="." includes="changes.xml,todo.xml"/> + <srcfiles dir="${context.dir}/xdocs" includes="*.xml" excludes="${site.projfile}"/> + </uptodate> + </target> + + <!-- =================================================================== --> + <!-- If generated docs is already up-to-date, print a message saying so. --> + <!-- =================================================================== --> + <target name="docs_done" 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=" todo.xml, changes.xml, ${context.dir}/xdocs/*.xml"/> + <echo message="-------------------------------------------------------------"/> + </target> + + <!-- =================================================================== --> + <!-- The documentation system (nearly beta...) --> + <!-- =================================================================== --> + <target name="docs" + depends="package, prepare-docs, docs_check, docs_done" + unless="docs.notrequired" + description="Generates the documentation"> + + <java classname="org.apache.cocoon.Main" fork="true" dir="${build.context}"> + <arg value="-c."/> + <arg value="-d../docs"/> + <arg value="-w../work"/> + <arg value="-l../work/cocoon.log"/> + <arg value="-uINFO"/> + <arg value="index.html"/> + <classpath> + <path refid="classpath"/> + <fileset dir="${build.dir}"> + <include name="*.jar"/> + </fileset> + <pathelement location="${tools.jar}"/> + </classpath> + </java> + + </target> + + <!-- =================================================================== --> <!-- Copies the webapp directories --> <!-- =================================================================== --> - <target name="copy-webapp" depends="prepare,compile"> + <target name="copy-webapp" depends="prepare-docs, prepare, compile"> <mkdir dir="${build.war}"/> <mkdir dir="${build.war}/WEB-INF/classes"/> @@ -453,47 +525,27 @@ <include name="**/*.png"/> </fileset> </copy> - - <copy todir="${build.war}/docs/xdocs" filtering="on"> - <fileset dir="${docs.dir}"> - <include name="*.xml"/> - <include name="**/*.dtd"/> - <include name="**/*.ent"/> - <exclude name="*-book.xml"/> - </fileset> - </copy> - - <copy file="changes.xml" tofile="${build.war}/docs/xdocs/changes.xml" filtering="on"/> - <copy file="todo.xml" tofile="${build.war}/docs/xdocs/todo.xml" filtering="on"/> - - <replace file="${build.war}/docs/xdocs/changes.xml" token="./xdocs/dtd/" value="dtd/"/> - <replace file="${build.war}/docs/xdocs/todo.xml" token="./xdocs/dtd/" value="dtd/"/> - - <copy todir="${build.war}/docs/xdocs/images" filtering="off"> - <fileset dir="${images.dir}"> - <include name="*.gif"/> - <include name="*.jpg"/> - <include name="*.png"/> - </fileset> - </copy> - - <copy todir="${build.war}/docs/xdocs/internal" filtering="on"> - <fileset dir="${docs.dir}"> - <include name="site-book.xml"/> - </fileset> - </copy> - <copy todir="${build.war}/stylesheets/documents" filtering="on"> - <fileset dir="${browser.skin}/stylesheets"> - <include name="*2document.xsl"/> - <include name="copyover.xsl"/> + <!-- copy the documentation, it's already prepared in the build context dir --> + <mkdir dir="${build.war}/documentation"/> + <copy todir="${build.war}/documentation" filtering="off"> + <fileset dir="${build.context}"> </fileset> </copy> + <!-- change the image src for xvg --> + <replace file="${build.war}/documentation/svg/label.xml" + token="file:images/label-background_b.gif" + value="file:documentation/images/label-background_b.gif"/> + <replace file="${build.war}/documentation/svg/separator.xml" + token="file:images/separator.gif" + value="file:documentation/images/images/separator.gif"/> + <!-- copy i18n sample webapp--> <copy todir="${build.war}/i18n" filtering="off"> <fileset dir="${webapp.dir}/i18n"> </fileset> </copy> + </target> <!-- =================================================================== --> @@ -581,7 +633,7 @@ <!-- Simply do nothing, just invoke all dependencies --> </target> - <!-- =================================================================== --> + <!-- =================================================================== --> <!-- Prepares the libraries for the war package --> <!-- =================================================================== --> <target name="prepare-xsp" depends="package" if="compile.xsp"> @@ -662,87 +714,12 @@ </target> <!-- =================================================================== --> - <!-- Prepares the docs --> - <!-- =================================================================== --> - <target name="prepare-docs" depends="init"> - <mkdir dir="${build.xdocs}"/> - - <!-- make filtered copy of XML docs --> - <copy todir="${build.xdocs}" filtering="on"> - <fileset dir="${docs.dir}"> - <exclude name="**/*.gif"/> - <exclude name="**/*.png"/> - <exclude name="**/*.jpg"/> - </fileset> - </copy> - - <copy todir="${build.xdocs}" filtering="off"> - <fileset dir="${docs.dir}"> - <include name="**/*.gif"/> - <include name="**/*.png"/> - <include name="**/*.jpg"/> - </fileset> - </copy> - - <copy todir="${build.docs}" filtering="off"> - <fileset dir="${docs.dir}"> - <include name="**/*.gif"/> - <include name="**/*.png"/> - <include name="**/*.jpg"/> - <include name="**/*.txt"/> - </fileset> - </copy> - - <copy file="changes.xml" tofile="${build.xdocs}/changes.xml" filtering="on"/> - <copy file="todo.xml" tofile="${build.xdocs}/todo.xml"/> - - <replace file="${build.xdocs}/changes.xml" token="./xdocs/dtd/" value="dtd/"/> - <replace file="${build.xdocs}/todo.xml" token="./xdocs/dtd/" value="dtd/"/> - </target> - - - <!-- =================================================================== --> - <!-- Set a variable if the generated docs are already up-to-date. --> - <!-- =================================================================== --> - <target name="docs_check" depends="init"> - <uptodate property="docs.notrequired" targetfile="${build.docs}/index.html" > - <srcfiles dir="." includes="changes.xml,todo.xml"/> - <srcfiles dir="${docs.dir}" includes="*.xml" excludes="${site.projfile}"/> - </uptodate> - </target> - - <!-- =================================================================== --> - <!-- If generated docs is already up-to-date, print a message saying so. --> - <!-- =================================================================== --> - <target name="docs_done" 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=" todo.xml, changes.xml, ${docs.dir}/*.xml"/> - <echo message="-------------------------------------------------------------"/> - </target> - - <!-- =================================================================== --> - <!-- Generate HTML docs --> - <!-- =================================================================== --> - <target name="docs" depends="prepare-docs, docs_check, docs_done" - unless="docs.notrequired" - description="Generates the documentation"> - <mkdir dir="${build.docs}"/> - <copy file="${build.xdocs}/docs-book.xml" tofile="${build.xdocs}/book.xml"/> - <java classname="${doc.generator}" fork="yes"> - <classpath refid="classpath"/> - <arg line="targetDirectory=${build.docs} ${build.xdocs}/book.xml ${browser.skin}"/> - </java> - </target> - - <!-- =================================================================== --> <!-- Set a variable if the generated printer docs are already up-to-date. --> <!-- =================================================================== --> <target name="printer-docs_check" depends="init"> <uptodate property="printer-docs.notrequired" targetfile="${build.docs.printer}/index.html" > <srcfiles dir="." includes="changes.xml,todo.xml"/> - <srcfiles dir="${docs.dir}" includes="*.xml" excludes="${site.projfile}"/> + <srcfiles dir="${docs.dir}" includes="*.xml"/> </uptodate> </target> @@ -770,58 +747,60 @@ </target> <!-- =================================================================== --> - <!-- Generate printer-friendly HTML docs --> + <!-- Prepares the printer-docs --> <!-- =================================================================== --> - <target name="printer-docs" depends="prepare-docs, printer-docs_check, printer-docs_done" - unless="printer-docs.notrequired" - description="Generates printer-friendly documentation"> - <mkdir dir="${build.docs.printer}"/> - <copy file="${build.xdocs}/${browser.projfile}" tofile="${build.xdocs}/book.xml"/> - <java classname="${doc.generator}" fork="yes"> - <classpath refid="classpath"/> - <arg line="targetDirectory=${build.docs.printer} ${build.xdocs}/book.xml ${printer.skin}"/> - </java> - </target> + <target name="prepare-printer-docs" depends="prepare-docs"> - <!-- =================================================================== --> - <!-- Set a variable if the generated site is already up-to-date. --> - <!-- =================================================================== --> - <target name="site_check" depends="init"> - <uptodate property="site.notrequired" targetfile="${site}/index.html" > - <srcfiles dir="." includes="changes.xml,todo.xml"/> - <srcfiles dir="${docs.dir}" includes="*.xml" excludes="${browser.projfile}"/> - </uptodate> + <mkdir dir="${build.dir}/printer_documentation"/> + + <!-- copy prepared docs --> + <copy todir="${build.dir}/printer_documentation" filtering="off"> + <fileset dir="${build.context}"> + </fileset> + </copy> + + <!-- copy printer skin --> + <copy todir="${build.dir}/printer_documentation/stylesheets" filtering="off" overwrite="yes"> + <fileset dir="${build.context}/stylesheets/printer_skin"> + </fileset> + </copy> + </target> + <!-- =================================================================== --> - <!-- If generated site is already up-to-date, print a message saying so. --> + <!-- Generate printer-friendly HTML docs --> <!-- =================================================================== --> - <target name="site_done" if="site.notrequired"> - <echo message="-------------------------------------------------------------"/> - <echo message="Not rebuilding site, as it is up-to-date:"/> - <echo message=" ${site}/index.html is more recent than"/> - <echo message=" todo.xml, changes.xml, ${docs.dir}/*.xml"/> - <echo message="-------------------------------------------------------------"/> + <target name="printer-docs" depends="package, prepare-printer-docs, printer-docs_check, printer-docs_done" + unless="printer-docs.notrequired" + description="Generates printer-friendly documentation"> + <mkdir dir="${build.docs.printer}"/> + + <java classname="org.apache.cocoon.Main" fork="true" dir="${build.dir}/printer_documentation"> + <arg value="-c."/> + <arg value="-d../printer-docs"/> + <arg value="-w../work-printer"/> + <arg value="-l../work-printer/cocoon.log"/> + <arg value="-uINFO"/> + <arg value="index.html"/> + <classpath> + <path refid="classpath"/> + <fileset dir="${build.dir}"> + <include name="*.jar"/> + </fileset> + <pathelement location="${tools.jar}"/> + </classpath> + </java> </target> <!-- =================================================================== --> <!-- Creates the web site --> <!-- =================================================================== --> - <target name="site" depends="prepare-docs, site_check, site_done" - unless="site.notrequired" + <target name="site" depends="docs" description="Generates the web site (for site maintainers only)"> <mkdir dir="${site}"/> - <copy file="${build.xdocs}/${site.projfile}" tofile="${build.xdocs}/book.xml"/> - <java classname="${doc.generator}" fork="yes"> - <classpath refid="classpath"/> - <arg line="targetDirectory=${site} ${build.xdocs}/book.xml ${browser.skin}"/> - </java> <copy todir="${site}" filtering="off"> - <fileset dir="${build.xdocs}"> - <include name="**/*.gif"/> - <include name="**/*.png"/> - <include name="**/*.jpg"/> - <include name="**/*.txt"/> + <fileset dir="${build.docs}"> </fileset> </copy> </target> @@ -876,6 +855,7 @@ <mkdir dir="${dist.dir}/bin"/> <mkdir dir="${dist.dir}/lib"/> <mkdir dir="${dist.dir}/src"/> + <mkdir dir="${dist.dir}/documentation"/> <mkdir dir="${dist.dir}/docs"/> <mkdir dir="${dist.dir}/docs/api"/> <mkdir dir="${dist.dir}/resources"/> @@ -906,6 +886,9 @@ <fileset dir="${lib.dir}"/> </copy> + <copy todir="${dist.dir}/documentation"> + <fileset dir="${build.context}"/> + </copy> <copy todir="${dist.dir}/docs"> <fileset dir="${build.docs}"/> </copy> @@ -921,9 +904,6 @@ <fileset dir="${docs.dir}"> <include name="changes.xml, todo.xml"/> </fileset> - </copy> - <copy todir="${dist.dir}/skins"> - <fileset dir="${skins.dir}"/> </copy> <copy todir="${dist.dir}/resources"> <fileset dir="${resource.dir}"/> No revision No revision 1.11.2.37 +5 -45 xml-cocoon2/webapp/sitemap.xmap Index: sitemap.xmap =================================================================== RCS file: /home/cvs/xml-cocoon2/webapp/sitemap.xmap,v retrieving revision 1.11.2.36 retrieving revision 1.11.2.37 diff -u -r1.11.2.36 -r1.11.2.37 --- sitemap.xmap 2001/09/24 05:56:59 1.11.2.36 +++ sitemap.xmap 2001/10/05 09:41:15 1.11.2.37 @@ -232,29 +232,12 @@ </map:pipeline> <!-- C2 documentation pipeline --> - <map:pipeline internal-only="true"> - <map:match pattern="shared/sidebar"> - <map:generate src="docs/xdocs/internal/site-book.xml"/> - <map:transform src="stylesheets/documents/book2sidebar.xsl"/> - <map:serialize/> - </map:match> - - <map:match pattern="document/*.html"> - <map:generate src="docs/xdocs/{1}.xml"/> - <map:act type="resource-exists"> - <map:parameter name="url" value="context://stylesheets/documents/{1}2document.xsl"/> - <map:transform src="stylesheets/documents/{../1}2document.xsl"/> - </map:act> - <map:serialize/> + <map:pipeline> + <map:match pattern="documents/index"> + <map:redirect-to uri="index.html"/> </map:match> - - <map:match pattern="document/*"> - <map:generate src="docs/xdocs/{1}.xml"/> - <map:act type="resource-exists"> - <map:parameter name="url" value="context://stylesheets/documents/{1}2document.xsl"/> - <map:transform src="stylesheets/documents/{../1}2document.xsl"/> - </map:act> - <map:serialize/> + <map:match pattern="documents/**"> + <map:mount uri-prefix="documents" src="documentation/" check-reload="yes"/> </map:match> </map:pipeline> @@ -412,29 +395,6 @@ <map:generate src="docs/samples/catalog/test.xml"/> <map:transform src="docs/samples/catalog/style.xsl"/> <map:serialize type="html"/> - </map:match> - - <!-- ======================== C2 Docs ============================== --> - - <map:match pattern="documents/*"> - <map:aggregate element="root"> - <map:part src="cocoon:/shared/sidebar"/> - <map:part src="cocoon:/document/{1}"/> - </map:aggregate> - <map:transform src="stylesheets/documents/root2html.xsl"/> - <map:serialize/> - </map:match> - - <map:match pattern="documents/images/**.gif"> - <map:read src="docs/xdocs/images/{1}.gif" mime-type="image/gif"/> - </map:match> - - <map:match pattern="documents/images/**.jpg"> - <map:read src="docs/xdocs/images/{1}.jpg" mime-type="image/jpg"/> - </map:match> - - <map:match pattern="documents/images/**.png"> - <map:read src="docs/xdocs/images/{1}.png" mime-type="image/png"/> </map:match> <!-- ================ Static =========================== -->
---------------------------------------------------------------------- In case of troubles, e-mail: [EMAIL PROTECTED] To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]