Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: 1ad0d1dc10
Fetching contributors…

Cannot retrieve contributors at this time

208 lines (173 sloc) 8.144 kb
<!-- $Id: build.xml,v 1.10 2001/11/21 10:15:55 jasonbaldridge Exp $ -->
<project default="package" basedir=".">
<!-- =================================================================== -->
<!-- Initialization target -->
<!-- =================================================================== -->
<target name="init">
<tstamp/>
<property name="Name" value="Maxent"/>
<property name="name" value="maxent"/>
<property name="version" value="1.2.4"/>
<property name="year" value="2001"/>
<echo message="----------- ${Name} ${version} [${year}] ------------"/>
<property name="build.compiler" value="classic"/>
<property name="debug" value="on"/>
<property name="optimize" value="on"/>
<property name="deprecation" value="on"/>
<property name="src.dir" value="./src/java"/>
<property name="lib.dir" value="./lib"/>
<property name="packages" value="opennlp.maxent.*"/>
<property name="build.dir" value="./build"/>
<property name="build.src" value="./build/src"/>
<property name="build.dest" value="./build/classes"/>
<property name="build.javadocs" value="./docs/api"/>
<property name="dist.root" value="./dist"/>
<property name="dist.dir" value="${dist.root}/${name}-${version}"/>
<property name="package.dir" value="./package"/>
<filter token="year" value="${year}"/>
<filter token="version" value="${version}"/>
<filter token="date" value="${TODAY}"/>
<filter token="log" value="true"/>
<filter token="verbose" value="true"/>
<path id="build.classpath">
<pathelement location="${lib.dir}/java-getopt.jar"/>
<pathelement location="${lib.dir}/colt.jar"/>
<pathelement location="${lib.dir}/trove.jar"/>
</path>
</target>
<!-- =================================================================== -->
<!-- Help on usage -->
<!-- =================================================================== -->
<target name="usage">
<echo message=""/>
<echo message=""/>
<echo message="Opennlp Maxent build file"/>
<echo message="-------------------------------------------------------------"/>
<echo message=""/>
<echo message=" available targets are:"/>
<echo message=""/>
<echo message=" package --> generates the maxent.jar file (default)"/>
<echo message=" compile --> compiles the source code"/>
<echo message=" javadoc --> generates the API documentation"/>
<echo message=" clean --> cleans up the directory"/>
<echo message=""/>
<echo message=" See the comments inside the build.xml file for more details."/>
<echo message="-------------------------------------------------------------"/>
<echo message=""/>
<echo message=""/>
</target>
<!-- =================================================================== -->
<!-- Prepares the build directory -->
<!-- =================================================================== -->
<target name="prepare" depends="init">
<mkdir dir="${build.dir}"/>
</target>
<!-- =================================================================== -->
<!-- Prepares the source code -->
<!-- =================================================================== -->
<target name="prepare-src" depends="prepare">
<!-- create directories -->
<mkdir dir="${build.src}"/>
<mkdir dir="${build.dest}"/>
<!-- copy src files -->
<copy todir="${build.src}" >
<fileset dir="${src.dir}"/>
</copy>
</target>
<!-- =================================================================== -->
<!-- Compiles the source directory -->
<!-- =================================================================== -->
<target name="compile" depends="prepare-src">
<javac srcdir="${build.src}"
destdir="${build.dest}"
debug="${debug}"
classpathref="build.classpath"
optimize="${optimize}"/>
</target>
<!-- =================================================================== -->
<!-- Creates the class package -->
<!-- =================================================================== -->
<target name="package" depends="compile">
<jar jarfile="${build.dir}/${name}-${version}.jar"
basedir="${build.dest}" />
</target>
<!-- =================================================================== -->
<!-- Creates Jar file with all other needed jars built in. -->
<!-- =================================================================== -->
<target name="exe" depends="compile">
<jar jarfile="${build.dir}/${name}-${DSTAMP}.jar"
basedir="${build.dest}" />
<jlink outfile="${build.dir}/${name}-exe-${version}.jar">
<mergefiles>
<pathelement path="${build.dir}/${name}-${DSTAMP}.jar"/>
<pathelement location="${lib.dir}/java-getopt.jar"/>
<pathelement location="${lib.dir}/colt.jar"/>
<pathelement location="${lib.dir}/trove.jar"/>
</mergefiles>
<addfiles>
<pathelement path="META-INF"/>
</addfiles>
</jlink>
<delete file="${build.dir}/${name}-${DSTAMP}.jar" />
</target>
<!-- =================================================================== -->
<!-- Creates the release file -->
<!-- =================================================================== -->
<target name="release" depends="clean">
<tar tarfile="${name}-${version}-src.tar"
basedir="../"
includes="${name}/**" >
<exclude name="${name}/docs/api/**"/>
<exclude name="**/CVS"/>
</tar>
<gzip src="${name}-${version}-src.tar"
zipfile="../${name}-${version}-src.tgz" />
<delete file="${name}-${version}-src.tar" />
</target>
<!-- =================================================================== -->
<!-- Creates the homepage -->
<!-- =================================================================== -->
<target name="homepage" depends="init,javadoc">
<tar tarfile="${name}-homepage.tar"
basedir="./docs/"
includes="**"
excludes="**/CVS" />
<gzip src="${name}-homepage.tar"
zipfile="${build.dir}/${name}-homepage.tgz" />
<delete file="${name}-homepage.tar" />
</target>
<!-- =================================================================== -->
<!-- Creates the API documentation -->
<!-- =================================================================== -->
<target name="javadoc" depends="prepare-src">
<mkdir dir="${build.javadocs}"/>
<javadoc packagenames="${packages}"
sourcepath="${build.src}"
destdir="${build.javadocs}"
author="true"
version="true"
use="true"
splitindex="true"
noindex="false"
windowtitle="opennlp.${name}"
doctitle="The &lt;a href=&quot;http://opennlp.sf.net&quot;&gt;OpenNLP&lt;/a&gt; ${Name} API v${version}"
bottom="Copyright &#169; ${year} Jason Baldridge and Gann Bierner. All Rights Reserved."
/>
</target>
<!-- =================================================================== -->
<!-- Clean targets -->
<!-- =================================================================== -->
<target name="clean" depends="init">
<delete dir="${build.dir}"/>
<delete file="${docs.dir}/changes.xml"/>
<delete file="${docs.dir}/todo.xml"/>
<delete file="${docs.dir}/book.xml"/>
</target>
<target name="distclean" depends="clean">
<deltree dir="${dist.root}"/>
<delete file="${Name}-${version}.tar.gz"/>
<delete file="${Name}-${version}.tar"/>
<delete file="${Name}-${version}.zip"/>
</target>
</project>
<!-- End of file -->
Jump to Line
Something went wrong with that request. Please try again.