-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
119 lines (89 loc) · 4.18 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
112
113
114
115
116
117
118
119
<!--======================================================================
Build file for OpenSextantToolbox.
=======================================================================-->
<project name="OpenSextantUtils" basedir="." default="build" xmlns:ivy="antlib:org.apache.ivy.ant">
<!-- include properties -->
<property file="build.properties" />
<!--set the time stamps -->
<tstamp />
<!-- Project level properties -->
<property name="project.name" value="OpenSextantUtils" />
<property name="version" value="1.0" />
<property name="releaseStatus" value="integration" />
<property name="java_level" value="1.7" />
<!-- Source directory - contains the Java source files for this project -->
<property name="src.dir" location="src" />
<!-- directory to contain the created jars -->
<property name="build.dir" location="build" />
<!-- lib directories -->
<property name="lib.dir" location="lib" />
<!-- location for the generated JAR files -->
<property name="core.jar.location" location="${build.dir}/opensextant-utils.jar" />
<!-- Classpath for compiling -->
<path id="compile.classpath">
<fileset dir="${lib.dir}" includes="**/*.jar" />
</path>
<!-- classpath for runtime -->
<path id="runtime.classpath">
<fileset dir="${build.dir}" includes="opensextant-utils.jar" />
<fileset dir="${lib.dir}" includes="**/*.jar" />
</path>
<!-- google grams location -->
<property name="googlegrams.dir" location="..\..\google ngrams\2009" />
<property name="results.dir" location= "..\..\google ngrams\results" />
<property name="totalcount.thresh" value="1" />
<property name="conf.thresh" value="0.0" />
<!--====================== Targets ============================-->
<target name="setup">
<mkdir dir="${build.dir}" />
</target>
<!-- delete created jars,retrieved dependencies,javadocs and previous releases-->
<!-- NOTE: this leaves the created Gazetteer (see clean.gaz target) -->
<target name="clean" depends="setup">
<delete dir="${build.dir}" />
<delete dir="${lib.dir}" />
<mkdir dir="${build.dir}" />
<mkdir dir="${lib.dir}" />
</target>
<!-- set the proxy if behind a firewall (needed for ivy) -->
<target name="setProxy">
<setproxy proxyhost="${proxy.host}" proxyport="${proxy.port}" />
</target>
<!-- get all the ivy defined dependencies -->
<target name="getDependencies" depends="setProxy,clean">
<ivy:retrieve pattern="${ivy.lib.dir}/[type]/[artifact].[revision].[ext]" />
<ivy:report todir="${build.dir}/ivy-report" graph="false"/>
</target>
<!-- compile the source -->
<target name="compile" depends="setup,getDependencies">
<javac classpathref="compile.classpath" srcdir="${src.dir}" destdir="${build.dir}" debug="true" debuglevel="lines,source" source="${java_level}" encoding="utf-8" />
</target>
<!-- create the JAR files -->
<target name="jar" depends="compile">
<jar destfile="${core.jar.location}" update="false" basedir="${build.dir}">
</jar>
</target>
<!-- Main target: Build the whole thing (except for loading the gazetteer -->
<target name="build" depends="jar" />
<!-- Publish the opensextant jars to the local Ivy repo-->
<target name="publish-local" depends="build">
<ivy:deliver deliverpattern="${build.dir}/ivy.xml" pubrevision="${version}" status="${releaseStatus}" />
<ivy:makepom ivyfile="${build.dir}/ivy.xml" pomfile="${build.dir}/pom.xml" />
<ivy:publish resolver="local" overwrite="true" pubrevision="${version}" publishivy="true">
<artifacts pattern="${build.dir}/[artifact].[ext]" />
</ivy:publish>
</target>
<target name="create.wordstats">
<echo>--------------------------------------------------</echo>
<echo>Running the wordstats creation </echo>
<echo>--------------------------------------------------</echo>
<!-- run the matcher example -->
<java classname="org.opensextant.ngrams.WordStatsGoogleGrams" classpathref="runtime.classpath" fork="yes" dir="${basedir}">
<jvmarg value="-Xmx3G" />
<arg value="${googlegrams.dir}" />
<arg value="${results.dir}" />
<arg value="${totalcount.thresh}" />
<arg value="${conf.thresh}" />
</java>
</target>
</project>