-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathbuild.xml
84 lines (79 loc) · 3.39 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<!-- This is only a wrapper for producing JUnit XML output -->
<project name="NaturalLI" default="test" basedir=".">
<property name="source.path" value="${basedir}/src" />
<property name="tests.path" value="${basedir}/test/src" />
<property name="lib.path" value="${basedir}/lib" />
<property environment="env"/>
<!-- Set the CoreNLP classpath either from the environment, or to a default -->
<condition property="corenlp" value="${env.CORENLP_JAR}" else="stanford-corenlp-3.5.3.jar">
<isset property="env.CORENLP_JAR" />
</condition>
<condition property="corenlp_models" value="${env.CORENLP_MODELS_JAR}" else="stanford-corenlp-models-current.jar">
<isset property="env.CORENLP_MODELS_JAR" />
</condition>
<condition property="corenlp_caseless_models" value="${env.CORENLP_CASELESS_MODELS_JAR}" else="stanford-corenlp-caseless-models-current.jar">
<isset property="env.CORENLP_CASELESS_MODELS_JAR" />
</condition>
<target name="classpath" description="Sets the classpath">
<path id="classpath">
<!-- Program sources -->
<pathelement path="${basedir}/src/naturalli_preprocess.jar"/>
<pathelement path="${basedir}/test/src/naturalli_preprocess_test.jar" />
<!-- Program libs -->
<fileset dir="${basedir}/lib">
<include name="*.jar"/>
</fileset>
<fileset dir="${basedir}/lib/test">
<include name="*.jar"/>
</fileset>
<fileset dir="${basedir}/lib/corenlp">
<include name="*.jar"/>
</fileset>
<!-- CoreNLP components (via environment) -->
<pathelement path="${corenlp}"/>
<pathelement path="${corenlp_models}"/>
<pathelement path="${corenlp_caseless_models}"/>
</path>
</target>
<target name="test" depends="classpath"
description="Run core unit tests">
<echo message="CoreNLP: ${corenlp}"/>
<echo message="CoreNLP models: ${corenlp_models}"/>
<echo message="CoreNLP caseless models: ${corenlp_caseless_models}"/>
<junit fork="true" maxmemory="4g" printsummary="on" outputtoformatters="false" forkmode="perBatch" haltonfailure="true">
<classpath refid="classpath"/>
<sysproperty key="wordnet.database.dir"
value="etc/WordNet-3.1/dict"/>
<formatter type="xml"/>
<batchtest fork="yes" todir="${basedir}/test/">
<fileset dir="${tests.path}">
<include name="**/*Test.java"/>
</fileset>
</batchtest>
</junit>
</target>
<target name="war" depends="classpath"
description="Build a deployable WAR for the demo">
<war destfile="${source.path}/naturalli.war"
webxml="${source.path}/edu/stanford/nlp/naturalli/demo/WEB-INF/naturalli.xml">
<lib dir="${source.path}/">
<include name="naturalli_preprocess.jar"/>
</lib>
<lib dir="${lib.path}/demo">
<include name="*.jar"/>
</lib>
<lib dir="${lib.path}/">
<include name="jaws.jar"/>
<include name="postgresql.jar"/>
<include name="trove.jar"/>
<include name="protobuf.jar"/>
</lib>
<lib dir="/u/nlp/data/StanfordCoreNLPModels/corenlp">
<include name="stanford-corenlp-2014-07-02-models.jar"/>
</lib>
<lib dir="/u/nlp/data/StanfordCoreNLPModels/corenlp-caseless">
<include name="stanford-corenlp-caseless-2014-02-25-models.jar"/>
</lib>
</war>
</target>
</project>