forked from mimno/Mallet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
111 lines (98 loc) · 2.83 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
<project name="mallet" default="compile" basedir=".">
<description>A Machine Learning for Language Toolkit</description>
<!--
Properties
-->
<property name="src" location="src"/>
<property name="class" location="class"/>
<property name="lib" location="lib"/>
<property name="dist" location="dist"/>
<property name="doc" location="doc/api"/>
<property name="test" location="test"/>
<property name="java_version" value="1.6"/>
<path id="project.classpath">
<pathelement path="${class}"/>
<fileset dir="lib" includes="*.jar"/>
</path>
<path id="project.base.source.files">
<fileset dir="${src}" includes="cc/mallet/**/*.java"/>
</path>
<fileset id="project.resources"
dir="${src}">
<include name="**/resources/*.*"/>
<include name="**/*.properties"/>
</fileset>
<!--
Initialization
-->
<target name="init">
<!-- Create a time stamp -->
<tstamp/>
<!-- Create an output directory for class files -->
<mkdir dir="${class}"/>
<copy todir="${class}" overwrite="true" includeemptydirs="true">
<fileset refid="project.resources"/>
</copy>
<!-- Create an output directory for the final jar -->
<mkdir dir="${dist}"/>
<copy file="${lib}/mallet-deps.jar" todir="${dist}"/>
<mkdir dir="${test}"/>
</target>
<!--
Target: compile
-->
<target
name="compile"
depends="init"
description="Compile all the source files">
<javac
source="${java_version}"
destdir="${class}"
classpathref="project.classpath"
debug="true"
deprecation="off"
listfiles="no"
>
<src path="${src}"/>
<include name="cc/**/*.java"/>
<!-- compilerarg value="-Xlint:unchecked"/ -->
</javac>
</target>
<!--
Target: doc {build javadoc API documentation}
-->
<target
name="doc"
depends="init"
description="Build Javadoc API webpages for all the source files">
<javadoc
destdir="${doc}"
classpathref="project.classpath"
author="true" version="true" use="true"
windowtitle="Mallet 2 API"
>
<packageset dir="${src}" defaultexcludes="yes">
<include name="cc/mallet/**"/>
</packageset>
</javadoc>
</target>
<!-- Create a jar file -->
<target name="jar" depends="compile">
<jar destfile="${dist}/mallet.jar" basedir="${class}"/>
</target>
<target name="test" depends="compile">
<junit printsummary="yes" >
<classpath>
<pathelement path="${class}"/>
<fileset dir="lib" includes="*.jar"/>
</classpath>
<formatter type="plain"/>
<!-- test name="cc.mallet.types.tests.TestInstanceListWeights" todir="${test}" /-->
<batchtest fork="yes" todir="${test}">
<fileset dir="${src}">
<include name="**/*Test*.java"/>
</fileset>
</batchtest>
</junit>
</target>
</project>