CofeehousePy/services/corenlp/build.xml

655 lines
27 KiB
XML

<!-- JavaNLP core build file -->
<project name="core" default="compile" basedir=".">
<property name="build.path" value="${basedir}/classes" />
<property name="source.path" value="${basedir}/src" />
<property name="doc.path" value="${basedir}/doc" />
<property name="data.path" value="${basedir}/data" />
<property name="tests.path" value="${basedir}/test/src" />
<property name="itests.path" value="${basedir}/itest/src" />
<!-- included tasks may use project.core as a property name -->
<property name="project.core" value="${basedir}" />
<property name="compile.debug" value="true"/>
<property name="compile.deprecation" value="false"/>
<property name="compile.optimize" value="true"/>
<property name="compile.source" value="1.8" />
<property name="compile.target" value="1.8" />
<property name="compile.encoding" value="utf-8" />
<target name="classpath" description="Sets the classpath">
<echo message="${ant.project.name}" />
<path id="classpath">
<fileset dir="${basedir}/lib">
<include name="*.jar"/>
<exclude name="javanlp*"/>
</fileset>
<fileset dir="${basedir}/liblocal">
<include name="*.jar"/>
<exclude name="javanlp*"/>
</fileset>
</path>
</target>
<target name="models.classpath" description="Sets the models classpath, for itests and such">
<path id="models.classpath">
<fileset dir="${env.CORENLP_MODELS_HOME}">
<include name="*.jar"/>
</fileset>
</path>
</target>
<target name="clean" description="Delete old classes">
<echo message="${ant.project.name}" />
<delete dir="${build.path}"/>
</target>
<target name="javacceverything" depends="classpath"
description="javacc everything that can be javacced">
<taskdef resource="net/sf/antcontrib/antlib.xml">
<classpath>
<pathelement location="${project.core}/lib/ant-contrib-1.0b3.jar"/>
</classpath>
</taskdef>
<echo message="${ant.project.name}" />
<for param="javacc.target">
<path>
<fileset dir="${source.path}">
<include name="**/*.jj"/>
</fileset>
</path>
<sequential>
<javacc target="@{javacc.target}" javacchome="${basedir}/lib" />
</sequential>
</for>
</target>
<target name="flexeverything" depends="classpath"
description="JFlex everything that can be JFlexed">
<taskdef resource="net/sf/antcontrib/antlib.xml">
<classpath>
<pathelement location="${project.core}/lib/ant-contrib-1.0b3.jar"/>
</classpath>
</taskdef>
<taskdef classname="jflex.anttask.JFlexTask" name="jflex">
<classpath>
<pathelement location="${project.core}/lib/jflex-full-1.8.2.jar"/>
</classpath>
</taskdef>
<echo message="${ant.project.name}" />
<for param="flex.target">
<path>
<fileset dir="${source.path}">
<include name="**/*.flex"/>
</fileset>
</path>
<sequential>
<jflex file="@{flex.target}" />
</sequential>
</for>
</target>
<target name="compile" depends="classpath"
description="Compile core sources">
<echo message="${ant.project.name}" />
<mkdir dir="${build.path}" />
<javac srcdir="${source.path}:${tests.path}:${itests.path}"
destdir="${build.path}"
debug="${compile.debug}"
encoding="${compile.encoding}"
deprecation="${compile.deprecation}"
optimize="${compile.optimize}"
source="${compile.source}"
target="${compile.target}"
fork="true"
memorymaximumsize="2g"
includeantruntime="false">
<classpath refid="classpath" />
<!-- <compilerarg value="-Xmaxerrs"/>
<compilerarg value="20"/> -->
<compilerarg value="-Xlint:cast"/>
<compilerarg value="-Xlint:classfile"/>
<compilerarg value="-Xlint:divzero"/>
<compilerarg value="-Xlint:empty"/>
<compilerarg value="-Xlint:finally"/>
<compilerarg value="-Xlint:path"/>
<compilerarg value="-Xlint:try"/>
<!--
<compilerarg value="-Xlint:deprecation"/>
<compilerarg value="-Xlint:dep-ann"/>
<compilerarg value="-Xlint:fallthrough"/>
<compilerarg value="-Xlint:options"/>
<compilerarg value="-Xlint:overrides"/>
<compilerarg value="-Xlint:processing"/>
<compilerarg value="-Xlint:rawtypes"/>
<compilerarg value="-Xlint:serial"/>
<compilerarg value="-Xlint:static"/>
<compilerarg value="-Xlint:unchecked"/>
<compilerarg value="-Xlint:varargs"/>
-->
<!-- <compilerarg value="-Xlint:all"/>
<compilerarg value="-Xmaxwarns"/>
<compilerarg value="10000"/> -->
</javac>
<copy todir="${build.path}/edu/stanford/nlp/pipeline/demo">
<fileset dir="${source.path}/edu/stanford/nlp/pipeline/demo">
<exclude name="**/*.java"/>
</fileset>
</copy>
<copy todir="${build.path}/edu/stanford/nlp/pipeline">
<fileset dir="${source.path}/edu/stanford/nlp/pipeline">
<exclude name="**/*.java"/>
</fileset>
</copy>
</target>
<target name="test" depends="classpath,compile"
description="Run core unit tests">
<echo message="${ant.project.name}" />
<junit fork="true" maxmemory="1g" printsummary="off" outputtoformatters="false" forkmode="perBatch" haltonfailure="no"
haltonerror="no" failureproperty="test.failed" errorproperty="test.failed">
<classpath refid="classpath"/>
<classpath path="${build.path}"/>
<classpath path="${data.path}"/>
<classpath path="${source.path}"/>
<formatter type="brief" usefile="false"/>
<batchtest fork="yes">
<fileset dir="${tests.path}">
<include name="**/*Test.java"/>
</fileset>
</batchtest>
</junit>
<fail message="Test error or failure detected, check test results." if="test.failed" />
</target>
<target name="itest" depends="classpath,compile,models.classpath"
description="Run core integration tests">
<echo message="${ant.project.name}" />
<junit fork="yes" maxmemory="12g" printsummary="off" outputtoformatters="false" forkmode="perTest" haltonfailure="no"
haltonerror="no" failureproperty="test.failed" errorproperty="test.failed">
<classpath refid="classpath"/>
<classpath refid="models.classpath"/>
<classpath path="${build.path}"/>
<classpath path="${data.path}"/>
<classpath path="${source.path}"/>
<formatter type="brief" usefile="false"/>
<batchtest fork="yes">
<fileset dir="${itests.path}">
<include name="**/*ITest*.java"/>
<exclude name="**/*SlowITest*.java"/>
</fileset>
</batchtest>
</junit>
<fail message="Test error or failure detected, check test results." if="test.failed" />
</target>
<target name="itest-many-docs" depends="classpath,compile,models.classpath"
description="Run StanfordCoreNLP on a large volume of documents.">
<echo message="${ant.project.name}" />
<junit fork="yes" maxmemory="14g" printsummary="off" outputtoformatters="false" forkmode="perTest" haltonfailure="no"
haltonerror="no" failureproperty="test.failed" errorproperty="test.failed">
<classpath refid="classpath"/>
<classpath refid="models.classpath"/>
<classpath path="${build.path}"/>
<classpath path="${data.path}"/>
<classpath path="${source.path}"/>
<formatter type="brief" usefile="false"/>
<batchtest fork="yes">
<fileset dir="${itests.path}">
<include name="**/*StanfordCoreNLPSlowITest.java"/>
</fileset>
</batchtest>
</junit>
<fail message="Test error or failure detected, check test results." if="test.failed" />
</target>
<target name="itest-coreference" depends="classpath,compile,models.classpath"
description="Coreference related slow itests.">
<echo message="${ant.project.name}" />
<junit fork="yes" maxmemory="7g" printsummary="off" outputtoformatters="false" forkmode="perTest" haltonfailure="no"
haltonerror="no" failureproperty="test.failed" errorproperty="test.failed">
<classpath refid="classpath"/>
<classpath refid="models.classpath"/>
<classpath path="${build.path}"/>
<classpath path="${data.path}"/>
<classpath path="${source.path}"/>
<formatter type="brief" usefile="false"/>
<batchtest fork="yes">
<fileset dir="${itests.path}">
<include name="**/*Coref*SlowITest.java"/>
<include name="**/DcorefBenchmarkSlowITest.java"/>
<include name="**/DcorefSlowITest.java"/>
<include name="**/ChineseCorefBenchmarkSlowITest.java"/>
</fileset>
</batchtest>
</junit>
<fail message="Test error or failure detected, check test results." if="test.failed" />
</target>
<target name="itest-protobuf" depends="classpath,compile,models.classpath"
description="Protocol buffer related slow itests.">
<echo message="${ant.project.name}" />
<junit fork="yes" maxmemory="14g" printsummary="off" outputtoformatters="false" forkmode="perTest" haltonfailure="no"
haltonerror="no" failureproperty="test.failed" errorproperty="test.failed">
<classpath refid="classpath"/>
<classpath refid="models.classpath"/>
<classpath path="${build.path}"/>
<classpath path="${data.path}"/>
<classpath path="${source.path}"/>
<formatter type="brief" usefile="false"/>
<batchtest fork="yes">
<fileset dir="${itests.path}">
<include name="**/*Protobuf*SlowITest.java"/>
</fileset>
</batchtest>
</junit>
<fail message="Test error or failure detected, check test results." if="test.failed" />
</target>
<target name="itest-kbp" depends="classpath,compile,models.classpath"
description="KBP related slow itests.">
<echo message="${ant.project.name}" />
<junit fork="yes" maxmemory="14g" printsummary="off" outputtoformatters="false" forkmode="perTest" haltonfailure="no"
haltonerror="no" failureproperty="test.failed" errorproperty="test.failed">
<classpath refid="classpath"/>
<classpath refid="models.classpath"/>
<classpath path="${build.path}"/>
<classpath path="${data.path}"/>
<classpath path="${source.path}"/>
<formatter type="brief" usefile="false"/>
<batchtest fork="yes">
<fileset dir="${itests.path}">
<include name="**/*KBP*SlowITest.java"/>
</fileset>
</batchtest>
</junit>
<fail message="Test error or failure detected, check test results." if="test.failed" />
</target>
<target name="itest-ner" depends="classpath,compile,models.classpath"
description="NER related slow itests">
<echo message="${ant.project.name}" />
<junit fork="yes" maxmemory="8g" printsummary="off" outputtoformatters="false" forkmode="perTest" haltonfailure="no"
haltonerror="no" failureproperty="test.failed" errorproperty="test.failed">
<classpath refid="classpath"/>
<classpath refid="models.classpath"/>
<classpath path="${build.path}"/>
<classpath path="${data.path}"/>
<classpath path="${source.path}"/>
<formatter type="brief" usefile="false"/>
<batchtest fork="yes">
<fileset dir="${itests.path}">
<include name="**/NERBenchmark*SlowITest.java"/>
<include name="**/NERPipelineEndToEndSlowITest.java"/>
<include name="**/NERTokenizationSlowITest.java"/>
<include name="**/TrainCRFClassifierSlowITest.java"/>
</fileset>
</batchtest>
</junit>
<fail message="Test error or failure detected, check test results." if="test.failed" />
</target>
<target name="itest-misc" depends="classpath,compile,models.classpath"
description="Other assorted slow itests">
<echo message="${ant.project.name}" />
<junit fork="yes" maxmemory="14g" printsummary="off" outputtoformatters="false" forkmode="perTest" haltonfailure="no"
haltonerror="no" failureproperty="test.failed" errorproperty="test.failed">
<classpath refid="classpath"/>
<classpath refid="models.classpath"/>
<classpath path="${build.path}"/>
<classpath path="${data.path}"/>
<classpath path="${source.path}"/>
<formatter type="brief" usefile="false"/>
<batchtest fork="yes">
<fileset dir="${itests.path}">
<include name="**/RequirementsCorrectSlowITest.java"/>
<include name="**/ThreadedParserSlowITest.java"/>
</fileset>
</batchtest>
</junit>
<fail message="Test error or failure detected, check test results." if="test.failed" />
</target>
<target name="itest-debug" depends="classpath,compile,models.classpath"
description="target for debug purposes">
<echo message="${ant.project.name}" />
<junit fork="yes" maxmemory="14g" printsummary="off" outputtoformatters="false" forkmode="perTest" haltonfailure="no"
haltonerror="no" failureproperty="test.failed" errorproperty="test.failed">
<classpath refid="classpath"/>
<classpath path="${build.path}"/>
<classpath path="${data.path}"/>
<classpath path="${source.path}"/>
<formatter type="brief" usefile="false"/>
<batchtest fork="yes">
<fileset dir="${itests.path}">
<include name="**/HeidelTimeKBPAnnotatorITest.java"/>
</fileset>
</batchtest>
</junit>
</target>
<target name="slowitest" depends="classpath,compile"
description="Run really slow integration tests">
<echo message="${ant.project.name}" />
<junit fork="yes" maxmemory="12g" printsummary="off" outputtoformatters="false" forkmode="perTest" haltonfailure="true">
<classpath refid="classpath"/>
<classpath path="${build.path}"/>
<classpath path="${data.path}"/>
<classpath path="${source.path}"/>
<formatter type="brief" usefile="false"/>
<batchtest fork="yes">
<fileset dir="${itests.path}">
<include name="**/*SlowITest.java"/>
</fileset>
</batchtest>
</junit>
</target>
<target name="compile-all" depends="compile,jsp"
description="Compile everything" />
<target name="all" depends="clean,compile-all"
description="Clean and re-compile." />
<!-- This file contains the .jsp build target -->
<import file="commonbuildjsp.xml" />
<!-- This runs the specified class, using a separate Java VM -->
<!-- Specify class to run via "run.class," arg, i.e., -->
<!-- ant run -Drun.class=edu.stanford.nlp.tagger.maxent.MaxentTaggerGUI -->
<!-- Use "jvmarg" to pass arguments to the VM, use "arg" to pass cmdline args to the class -->
<target name="run" depends="classpath">
<java classname="${run.class}" fork="true" jvm="java">
<jvmarg value="-Xmx2g"/>
<jvmarg value="-server"/>
<classpath>
<path refid="classpath"/>
<pathelement path="${build.path}"/>
</classpath>
</java>
</target>
<!-- Same as "run," except causes the VM to wait until debugger is attached -->
<!-- See http://nlp.stanford.edu/javanlp/did_you_know/eclipse_debug.html for example -->
<target name="run-debug" depends="classpath">
<java classname="${run.class}" fork="true" jvm="java">
<jvmarg value="-Xmx2g"/>
<!-- Following args should cause this to freeze and wait for debug attach -->
<jvmarg value="-Xdebug"/>
<jvmarg value="-Xnoagent"/>
<jvmarg value="-Djava.compiler=None"/>
<jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=9099"/>
<classpath>
<path refid="classpath"/>
<pathelement path="${build.path}"/>
</classpath>
</java>
</target>
<target name="jar" depends="compile">
<jar destfile="javanlp-core.jar">
<fileset dir="${project.core}/classes" />
</jar>
</target>
<!-- I wrote this for a side project, so if you one day see it in a
build file of mine, you can't sue me for taking it from
Stanford. -jab -->
<!-- This macro builds a .war for a jsp, configured by several
attributes which say which .jar file to use as a base library,
which other libraries are needed, which data files to grab,
etc. In order to verify that the .jsp will work, it
precompiles it before building the .war. -->
<macrodef name="buildjsp">
<attribute name="webapp.path"/> <!-- where to find the .jsp files -->
<attribute name="webapp.war"/> <!-- name of the .war to produce -->
<attribute name="webapp.jar"/> <!-- probably javanlp-core.jar -->
<element name="webapp.lib"/> <!-- libs to include -->
<element name="webapp.data"/> <!-- data files to include -->
<sequential>
<!-- This tool turns .jsp into .java -->
<taskdef classname="org.apache.jasper.JspC" name="jasper2" >
<classpath refid="webapp.classpath"/>
</taskdef>
<echo message="Building .jsp @{webapp.path}" />
<echo message="Building from ${source.path}/@{webapp.path}"/>
<!-- First, compile the .jsp into .java -->
<jasper2
validateXml="false"
uriroot="${source.path}/@{webapp.path}"
webXmlFragment="${source.path}/@{webapp.path}/WEB-INF/generated.xml"
addWebXmlMappings="true"
outputDir="${build.path}/@{webapp.path}/WEB-INF/src" />
<mkdir dir="${build.path}/@{webapp.path}/WEB-INF/classes"/>
<!-- Then compile the .java into .class -->
<javac destdir="${build.path}/@{webapp.path}/WEB-INF/classes"
optimize="${compile.optimize}"
encoding="${compile.encoding}"
debug="${compile.debug}"
srcdir="${build.path}/@{webapp.path}/WEB-INF/src"
includeantruntime="false"
excludes="**/*.smap">
<classpath refid="webapp.classpath"/>
<classpath refid="classpath"/>
<classpath path="${build.path}"/>
<include name="**" />
<exclude name="tags/**" />
</javac>
<!-- Now, build a .war out of the compiled java and all of the
specified libraries. -->
<war destfile="@{webapp.war}"
webxml="${source.path}/@{webapp.path}/WEB-INF/web.xml">
<classes dir="${build.path}/@{webapp.path}/WEB-INF/classes"/>
<webapp.lib/>
<lib dir=".">
<include name="@{webapp.jar}"/>
</lib>
<webapp.data/>
</war>
</sequential>
</macrodef>
<target name="sutime.war" depends="compile,jar"
description="build the sutime webapp">
<war destfile="sutime.war"
webxml="${source.path}/edu/stanford/nlp/time/suservlet/WEB-INF/web.xml">
<lib dir=".">
<include name="javanlp-core.jar"/>
</lib>
<lib dir="${basedir}/lib">
<include name="commons-lang3-3.1.jar"/>
<include name="xom-1.2.10.jar"/>
<include name="joda-time.jar"/>
<include name="jollyday-0.4.9.jar"/>
</lib>
<zipfileset prefix="WEB-INF/data"
file="/u/nlp/data/pos-tagger/distrib/english-left3words-distsim.tagger"/>
<zipfileset prefix="WEB-INF/data/rules"
file="${source.path}/edu/stanford/nlp/time/rules/*"/>
<zipfileset prefix="WEB-INF/data/holidays"
file="${source.path}/edu/stanford/nlp/time/holidays/*"/>
<zipfileset file="${data.path}/webapps/favicon.ico"/>
<zipfileset file="${source.path}/edu/stanford/nlp/time/suservlet/header.jsp"/>
<zipfileset file="${source.path}/edu/stanford/nlp/time/suservlet/footer.jsp"/>
<zipfileset file="${source.path}/edu/stanford/nlp/time/suservlet/sutime.css"/>
<zipfileset file="${source.path}/edu/stanford/nlp/time/suservlet/calendarview.css"/>
<zipfileset file="${source.path}/edu/stanford/nlp/time/suservlet/calendarview.js"/>
<zipfileset file="${source.path}/edu/stanford/nlp/time/suservlet/prototype.js"/>
</war>
</target>
<target name="openie.war" depends="compile,jar"
description="build the openie webapp">
<war destfile="openie.war"
webxml="${source.path}/edu/stanford/nlp/naturalli/demo/web.xml">
<lib dir=".">
<include name="javanlp-core.jar"/>
</lib>
<zipfileset prefix="WEB-INF/data"
file="/u/nlp/data/pos-tagger/distrib/english-left3words-distsim.tagger"/>
<zipfileset prefix="WEB-INF/data"
file="${source.path}/edu/stanford/nlp/time/rules/*"/>
<zipfileset prefix="WEB-INF/data"
file="${source.path}/edu/stanford/nlp/time/holidays/*"/>
<zipfileset prefix="WEB-INF/data"
file="/u/nlp/data/ner/goodClassifiers/english.all.3class.distsim.crf.ser.gz"/>
<zipfileset prefix="WEB-INF/data"
file="/u/nlp/data/ner/goodClassifiers/english.conll.4class.distsim.crf.ser.gz"/>
<zipfileset prefix="WEB-INF/data"
file="/u/nlp/data/ner/goodClassifiers/english.muc.7class.distsim.crf.ser.gz"/>
<zipfileset prefix="WEB-INF/data"
file="/u/nlp/data/depparser/nn/distrib/english_SD.gz"/>
<zipfileset prefix="WEB-INF/data"
file="/u/nlp/data/lexparser/englishPCFG.ser.gz"/>
<zipfileset prefix="WEB-INF/data"
file="/home/gabor/workspace/naturalli/etc/clauseSplitterModel.ser.gz"/>
<zipfileset prefix="WEB-INF/data"
file="/home/gabor/workspace/naturalli/etc/pp.tab.gz"/>
<zipfileset prefix="WEB-INF/data"
file="/home/gabor/workspace/naturalli/etc/obj.tab.gz"/>
<zipfileset prefix="WEB-INF/data"
file="/home/gabor/workspace/naturalli/etc/privative.tab.gz"/>
<zipfileset prefix="WEB-INF/data"
file="/home/gabor/workspace/naturalli/etc/subj_obj_pp.tab.gz"/>
<zipfileset prefix="WEB-INF/data"
file="/home/gabor/workspace/naturalli/etc/subj_pp_obj.tab.gz"/>
<zipfileset prefix="WEB-INF/data"
file="/home/gabor/workspace/naturalli/etc/subj_pp_pp.tab.gz"/>
<zipfileset prefix="WEB-INF/data"
file="/home/gabor/workspace/naturalli/etc/subj_pp.tab.gz"/>
</war>
</target>
<target name="parser.war" depends="compile,jar"
description="build the parser webapp">
<buildjsp webapp.path="edu/stanford/nlp/parser/webapp"
webapp.war="parser.war"
webapp.jar="javanlp-core.jar">
<webapp.lib>
<lib dir="/u/nlp/data/StanfordCoreNLPModels">
<include name="stanford-spanish-corenlp-models-current.jar"/>
</lib>
</webapp.lib>
<webapp.data>
<zipfileset prefix="WEB-INF/data"
file="/u/nlp/data/lexparser/englishPCFG.ser.gz"/>
<zipfileset prefix="WEB-INF/data"
file="/u/nlp/data/lexparser/arabicFactored.ser.gz"/>
<zipfileset prefix="WEB-INF/data"
file="/u/nlp/data/lexparser/frenchFactored.ser.gz"/>
<zipfileset prefix="WEB-INF/data"
file="/u/nlp/data/lexparser/chineseFactored.ser.gz"/>
<zipfileset prefix="WEB-INF/data/chinesesegmenter"
file="/u/nlp/data/gale/segtool/stanford-seg/classifiers-2010/05202008-ctb6.processed-chris6.lex.gz"/>
<zipfileset prefix="WEB-INF/data/chinesesegmenter"
dir="/u/nlp/data/gale/segtool/stanford-seg/releasedata"/>
<zipfileset prefix="WEB-INF/data"
file="/u/nlp/data/lexparser/spanishPCFG.ser.gz"/>
<zipfileset file="${data.path}/webapps/favicon.ico"/>
</webapp.data>
</buildjsp>
</target>
<target name="ner.war" depends="compile,jar"
description="build the ner webapp">
<!-- This is built from a java servlet, not a jsp. -->
<!-- The class needed for the results page will already be in
javanlp-core.jar -->
<war destfile="ner.war"
webxml="${source.path}/edu/stanford/nlp/ie/ner/webapp/WEB-INF/web.xml">
<lib dir=".">
<include name="javanlp-core.jar"/>
</lib>
<lib dir="${basedir}/lib">
<include name="commons-lang3-3.1.jar"/>
</lib>
<zipfileset file="${source.path}/edu/stanford/nlp/ie/ner/webapp/ner.jsp"/>
<zipfileset file="${source.path}/edu/stanford/nlp/ie/ner/webapp/header.jsp"/>
<zipfileset file="${source.path}/edu/stanford/nlp/ie/ner/webapp/footer.jsp"/>
<zipfileset prefix="WEB-INF/data/models"
file="/u/nlp/data/ner/goodClassifiers/english.all.3class.distsim.crf.ser.gz"/>
<zipfileset prefix="WEB-INF/data/models"
file="/u/nlp/data/ner/goodClassifiers/english.conll.4class.distsim.crf.ser.gz"/>
<zipfileset prefix="WEB-INF/data/models"
file="/u/nlp/data/ner/goodClassifiers/english.muc.7class.distsim.crf.ser.gz"/>
<zipfileset prefix="WEB-INF/data/models"
file="/u/nlp/data/ner/goodClassifiers/german.distsim.crf.ser.gz"/>
<zipfileset prefix="WEB-INF/data/models"
file="/u/nlp/data/ner/goodClassifiers/chinese.misc.distsim.crf.ser.gz"/>
<zipfileset file="${data.path}/webapps/favicon.ico"/>
</war>
</target>
<target name="corenlp.war" depends="compile,jar"
description="build the corenlp webapp">
<!-- This is built from a java servlet, not a jsp. -->
<!-- The class needed for the results page will already be in
javanlp-core.jar -->
<war destfile="corenlp.war"
webxml="${source.path}/edu/stanford/nlp/pipeline/webapp/WEB-INF/web.xml">
<lib dir=".">
<include name="javanlp-core.jar"/>
</lib>
<lib dir="${basedir}/lib">
<include name="commons-lang3-3.1.jar"/>
<include name="xom-1.2.10.jar"/>
<include name="xml-apis.jar"/>
<include name="joda-time.jar"/>
<include name="jollyday-0.4.9.jar"/>
</lib>
<!-- note for John: c:/Users/John Bauer/nlp/stanford-releases -->
<lib dir="/u/nlp/data/StanfordCoreNLPModels">
<include name="stanford-corenlp-models-current.jar"/>
<include name="stanford-chinese-corenlp-models-current.jar"/>
</lib>
<classes dir="${source.path}/edu/stanford/nlp/pipeline">
<include name="StanfordCoreNLP.properties"/>
</classes>
<zipfileset file="${source.path}/edu/stanford/nlp/pipeline/webapp/header.jsp"/>
<zipfileset file="${source.path}/edu/stanford/nlp/pipeline/webapp/footer.jsp"/>
<zipfileset file="${source.path}/edu/stanford/nlp/pipeline/webapp/brat.js"/>
<zipfileset file="${data.path}/webapps/favicon.ico"/>
<zipfileset prefix="WEB-INF/data"
file="${doc.path}/corenlp/CoreNLP-to-HTML.xsl"/>
</war>
</target>
<property environment="env" />
<condition property="version1.7">
<equals arg1="${ant.java.version}" arg2="1.7" />
</condition>
<target name="tregex-osx" if="version1.7" depends="jar"
description="Build an OS X app for TregexGUI">
<fail unless="env.JAVA_HOME"
message="Environment variable JAVA_HOME not set." />
<taskdef name="bundleapp"
classname="com.oracle.appbundler.AppBundlerTask"
classpath="lib/appbundler-1.0.jar" />
<bundleapp outputdirectory="."
name="Stanford Tregex"
displayname="Stanford Tregex"
icon="doc/tregex/nlp-logo-6x6.icns"
identifier="edu.stanford.nlp.trees.tregex.gui.TregexGUI"
mainclassname="edu.stanford.nlp.trees.tregex.gui.TregexGUI">
<runtime dir="${env.JAVA_HOME}" />
<classpath file="javanlp-core.jar" />
</bundleapp>
</target>
</project>