office-gobmx/xmerge/source/writer2latex/build.xml
Oliver Bolte a9bd1838c4 INTEGRATION: CWS latex (1.1.2); FILE ADDED
2006/04/06 13:56:37 sus 1.1.2.1: #i24813# Adding LaTeX and BibTeX filter
2006-07-13 08:16:05 +00:00

176 lines
6.7 KiB
XML

<!--
############################################################################
# This is the Ant build file for writer2latex
############################################################################
-->
<project name="writer2latex" default="build" basedir=".">
<description>writer2latex - build file</description>
<!-- ================================================================= -->
<!-- settings -->
<!-- ================================================================= -->
<!-- project prefix, used for targets and build.lst -->
<property name="prj.prefix" value="xmrg"/>
<!-- name of this sub target used in recursive builds -->
<property name="target" value="writer2latex"/>
<!-- relative path to project directory -->
<property name="prj" value="../.."/>
<!-- path component for current java package -->
<property name="package" value="."/>
<!-- set wether we want to compile with or without deprecation -->
<property name="deprecation" value="on"/>
<!-- ================================================================= -->
<!-- solar build environment targets -->
<!-- ================================================================= -->
<!-- in case of stand-alone usage, hard-wired to Windows (wntmsci10)-->
<property name="platform" value="wntmsci10" />
<property name="proext" value=".pro" />
<property name="out" location="..\..\${platform}${proext}" />
<property name="solar.jar" location="${LOCAL_OFFICE_PATH}/program/classes" />
<!-- define how to handle CLASSPATH environment -->
<property name="build.sysclasspath" value="ignore"/>
<property name="build.dir" location="${out}/class"/>
<property name="src.dir" location="${basedir}/source"/>
<property name="target.dir" location="${build.dir}/${ant.project.name}"/>
<property name="target.jar" location="${build.dir}/${ant.project.name}.jar"/>
<property name="javadoc.dir" location="${target.dir}/doc/javadoc"/>
<path id="classpath">
<pathelement location="${build.dir}/xmerge.jar"/>
</path>
<target name="info">
<echo message="--------------------"/>
<echo message="${target}"/>
<echo message="--------------------"/>
</target>
<target name="all"
description="Build nearly everything"
depends="info, compile, copy-config, jar, javadoc, zipdoc, create-uno-package" />
<target name="build"
description="Build nearly everything"
depends="info, compile, copy-config, jar, create-uno-package" />
<target name="init" >
<mkdir dir="${target.dir}"/>
<mkdir dir="${javadoc.dir}"/>
</target>
<target name="help" description="Displays usage information">
<echo>Usage: ant &lt;target&gt;
The following targets are supported:
all
Build the project
compile
Compile all file except the tests.
jar
Create the jar file.
javadoc
Create the javadoc documentation in target/javadoc.
</echo>
</target>
<target name="compile" depends="init"
description="Compile the Java files (without tests)">
<!-- compile the application code -->
<javac srcdir="${src.dir}"
destdir="${target.dir}"
debug="${debug}"
deprecation="${deprecation}"
optimize="${optimize}">
<classpath refid="classpath"/>
</javac>
</target>
<target name="jar"
depends="init, compile, copy-config"
description="Create writer2latex jar file containing all compiled classes except test cases.">
<jar jarfile="${target.jar}">
<fileset dir="${target.dir}">
<patternset>
<exclude name="**/*Test.class"/>
<exclude name="**/AllTests.class"/>
<exclude name="doc/**/*"/>
<include name="**/*.xml"/>
<include name="**/*.class"/>
<include name="org/**/*"/>
</patternset>
</fileset>
<manifest>
<attribute name="Built-By" value="${user.name}"/>
<attribute name="Main-Class" value="writer2latex.Application"/>
<attribute name="Class-Path" value="xml-apis.jar xercesImpl.jar xmerge.jar"/>
</manifest>
</jar>
</target>
<target name="copy-config"
description="Copies the XML configuration to the output tree">
<copy todir="${target.dir}" verbose="true">
<fileset dir="${src.dir}">
<include name="**/*.xml"/>
<include name="**/*.txt"/>
</fileset>
</copy>
</target>
<!-- compile java sources in ${package} and sub packages -->
<target name="javadoc" depends="init">
<javadoc packagenames="writer2latex.*"
destdir="${javadoc.dir}"
verbose="false"
author="true"
version="true"
nodeprecated="true"
nodeprecatedlist="true"
use="true"
Doctitle="Writer2Latex API"
windowtitle="Writer2Latex API"
sourcepath="${src.dir}"
excludepackagenames="org.openoffice.xmerge.test,org.openoffice.xmerge.converter.xml.sxc.minicalc"
classpathref="classpath">
<link offline="true" href="http://java.sun.com/j2se/1.3/docs/api" packagelistLoc="${solar.doc}/jdk13"/>
</javadoc>
<copy todir="${javadoc.dir}">
<fileset dir="${src.dir}">
<include name="**/*.gif"/>
<include name="**/*.png"/>
</fileset>
</copy>
</target>
<!-- zip together all the javadocs -->
<target name="zipdoc" depends="javadoc">
<zip zipfile="${target.dir}/writer2latex_javadoc.zip"
basedir="${javadoc.dir}"
update="true"/>
</target>
<!-- zip together JAR and configuration -->
<target name="create-uno-package" depends="jar" description="deliver Office UNO package">
<zip zipfile="${build.dir}/writer2latex.uno.pkg" update="true">
<fileset dir="${basedir}/uno-config">
<include name="**/*.*"/>
</fileset>
<fileset dir="${build.dir}">
<include name="${ant.project.name}.jar"/>
</fileset>
</zip>
</target>
<!-- clean up -->
<target name="clean">
<delete dir="${target.dir}"/>
<delete file="${target.jar}"/>
<delete file="${build.dir}/writer2latex.uno.pkg"/>
</target>
</project>