blob: c751e71b89a81c617b3a8dcdf21108f99b377557 [file] [log] [blame]
<?xml version="1.0"?>
<!--
Copyright 1999-2004 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- $Id: export-build.xml,v 1.5 2004/03/21 18:35:15 gregor Exp $ -->
<project name="export">
<description>
Export Targets
</description>
<!-- ============================================================ -->
<!-- Produce the webapp -->
<!-- ============================================================ -->
<!--
This target exports a specified Forrest-based publication as static HTML.
-->
<target name="export-forrest" depends="webapp" description="Exports a forrest-based publication to static HTML.">
<property name="publication" value="docs-new"/>
<property name="publication.dir" value="${build.webapp}/lenya/pubs/${publication}"/>
<property name="export.dir" value="${build.dir}/export/${publication}"/>
<property environment="env" />
<property name="forrest.home" value="${env.FORREST_HOME}" />
<!-- Copy publication to new directory -->
<echo>INFO: Copy publication from ${publication.dir} to ${export.dir}</echo>
<copy todir="${export.dir}">
<fileset dir="${publication.dir}">
<exclude name="skins/cocooncenter/**"/>
<exclude name="*.xmap"/>
</fileset>
</copy>
<move file="${publication.dir}/forrest-sitemap.xmap" tofile="${export.dir}/sitemap.xmap"/>
<move file="${publication.dir}/raw.xmap" tofile="${export.dir}/raw.xmap"/>
<!--
<move file="${export.dir}/forrest-sitemap.xmap" tofile="${export.dir}/sitemap.xmap"/>
<move file="${export.dir}/sitemap.xmap" tofile="${export.dir}/sitemap.xmap.bak"/>
-->
<ant antfile="${forrest.home}/forrest.antproxy.xml" dir="${export.dir}"/>
</target>
<target name="export" depends="webapp" description="Exports a publication to static HTML.">
<property name="publication" value=""/>
<property name="publication.dir" value="${build.webapp}/lenya/pubs/${publication}"/>
<property name="build.export" value="${build.dir}/export"/>
<property name="build.work" value="${build.dir}/work"/>
<property name="project.debuglevel" value="DEBUG"/>
<echo>INFO: Copying source files from authoring to live</echo>
<copy todir="${publication.dir}/content/live">
<fileset dir="${publication.dir}/content/authoring"/>
</copy>
<java classname="org.apache.cocoon.Main"
fork="true"
maxmemory="128m"
dir="."
failonerror="true">
<classpath>
<pathelement location="${build.webapp}/WEB-INF/classes"/>
<fileset dir="${build.webapp}/WEB-INF/lib" includes="*.jar"/>
<fileset dir="${tomcat.home.dir}/${tomcat.webapps.dir}/../../common/lib" includes="servlet**.jar"/>
</classpath>
<jvmarg value="-Djava.endorsed.dirs=${build.webapp}/WEB-INF/lib/endorsed${path.separator}${java.endorsed.dirs}"/>
<jvmarg value="-ea"/>
<arg value="-c${build.webapp}"/> <!-- input to the process -->
<arg value="-d${build.export}"/> <!-- output to be put -->
<arg value="-w${build.work}"/> <!-- temp dir to use for e.g. cache -->
<arg value="-u${project.debuglevel}"/> <!-- threshold for log messages -->
<arg value="-C${build.webapp}/WEB-INF/cocoon.xconf"/> <!-- cocoon.xconf file to use -->
<arg value="-b${build.export}/brokenlinks.txt"/> <!-- output list of broken links -->
<arg value="-k${build.webapp}/WEB-INF/logkit.xconf"/> <!-- logkit configuration -->
<arg value="${publication}/live/index.html"/> <!-- starting page -->
<arg value="-efalse"/> <!-- don't confirm extensions -->
<arg value="-V" /> <!-- be verbose -->
</java>
</target>
</project>