-
Notifications
You must be signed in to change notification settings - Fork 16
/
build.align.xml
186 lines (166 loc) · 8.27 KB
/
build.align.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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
<?xml version="1.0" encoding="UTF-8"?>
<project name="jacana" default="one-jar" basedir=".">
<description>jacana-align build script</description>
<!-- targets -->
<target name="build" depends="package" description="Build whole project"/>
<target name="clean" depends="init" description="Remove previous build files">
<delete dir="${build.dir}" includeemptydirs="true" quiet="true"/>
</target>
<target name="init">
<property environment="env"/>
<!-- check for required tools -->
<fail message="Missing SCALA_HOME variable in OS environment">
<condition><isset property="${env.SCALA_HOME}"/></condition>
</fail>
<fail message="Missing JAVA_HOME variable in OS environment">
<condition><isset property="${env.JAVA_HOME}"/></condition>
</fail>
<!-- variables for paths and files -->
<property name="src.dir" location="${basedir}/src"/>
<property name="lib.dir" location="${basedir}/lib"/>
<property name="build.dir" location="${basedir}/build"/>
<property name="build-classes.dir" location="${build.dir}/classes"/>
<property name="build-lib.dir" location="${build.dir}/lib"/>
<property name="build-doc-java.dir" location="${build.dir}/doc-java"/>
<property name="build-doc-scala.dir" location="${build.dir}/doc-scala"/>
<property name="java.dir" location="${env.JAVA_HOME}"/>
<property name="scala.dir" location="${env.SCALA_HOME}"/>
<property name="scala-library.jar" location="${scala.dir}/lib/scala-library.jar"/>
<property name="scala-compiler.jar" location="${scala.dir}/lib/scala-compiler.jar"/>
<property name="scala-reflect.jar" location="${scala.dir}/lib/scala-reflect.jar"/>
<path id="project.classpath">
<pathelement location="${scala-library.jar}"/>
<pathelement location="${build-classes.dir}"/> <!-- used during recompilation -->
<fileset dir="lib">
<include name="*.jar"/>
</fileset>
</path>
<path id="scala.classpath">
<pathelement location="${scala-compiler.jar}"/>
<pathelement location="${scala-reflect.jar}"/>
<pathelement location="${scala-library.jar}"/>
</path>
<!-- load scala's ant tasks -->
<taskdef resource="scala/tools/ant/antlib.xml" classpathref="scala.classpath"/>
<!-- print where this project will get scala and java from -->
<echo message="Init project"/>
<echo message=" with scala.dir = ${scala.dir}"/>
<echo message=" with java.dir = ${java.dir}"/>
<!-- check if any files has been modified since last build -->
<uptodate property="build.uptodate" targetfile="${build.dir}/build.done">
<srcfiles dir= "${src.dir}" includes="**"/>
<srcfiles dir= "${lib.dir}" includes="**"/>
</uptodate>
</target>
<target name="compile" depends="init" unless="build.uptodate">
<mkdir dir="${build-classes.dir}"/>
<javac destdir="${build-classes.dir}" encoding="UTF-8">
<src path="src/java"/>
<classpath refid="project.classpath"/>
<include name="**/*.java"/>
<src><pathelement location="${src.dir}"/></src>
</javac>
<scalac
destdir="${build-classes.dir}"
classpathref="project.classpath">
<include name="**/*.scala"/>
<src><pathelement location="${src.dir}"/></src>
</scalac>
</target>
<target name="doc-java" depends="compile" unless="build.uptodate">
<mkdir dir="${build-doc-java.dir}"/>
<javadoc
sourcepath="${src.dir}"
destdir="${build-doc-java.dir}"
doctitle="${ant.project.name} API documentation"
classpathref="project.classpath">
<fileset dir="${src.dir}" defaultexcludes="yes">
<include name="java/edu/**/*.java"/>
</fileset>
</javadoc>
</target>
<target name="doc-scala" depends="compile" unless="build.uptodate">
<mkdir dir="${build-doc-scala.dir}"/>
<scaladoc
srcdir="${src.dir}"
destdir="${build-doc-scala.dir}"
doctitle="${ant.project.name} API documentation"
classpathref="project.classpath">
<include name="**/*.scala"/>
</scaladoc>
</target>
<target name="doc" depends="doc-java,doc-scala" unless="build.uptodate"/>
<target name="binary" depends="compile" unless="build.uptodate">
<mkdir dir="${build-lib.dir}"/>
<jar destfile="${build-lib.dir}/${ant.project.name}.jar">
<fileset dir="${build-classes.dir}"/>
</jar>
<touch file="${build.dir}/build.done"/> <!-- mark build as up-to-date -->
</target>
<target name="package" depends="doc" unless="build.uptodate">
<mkdir dir="${build-lib.dir}"/>
<jar destfile="${build-lib.dir}/${ant.project.name}.jar">
<fileset dir="${build-classes.dir}"/>
</jar>
<jar destfile="${build-lib.dir}/${ant.project.name}-src.jar">
<fileset dir="${src.dir}" includes="**/*.scala **/*.java"/>
</jar>
<jar destfile="${build-lib.dir}/${ant.project.name}-doc.jar">
<fileset dir="${build-doc-scala.dir}"/>
<fileset dir="${build-doc-java.dir}"/>
</jar>
<touch file="${build.dir}/build.done"/> <!-- mark build as up-to-date -->
</target>
<target name="one-jar" depends="compile">
<jar destfile="${build-lib.dir}/${ant.project.name}-align.jar">
<manifest>
<attribute name="Main-Class" value="org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader"/>
<attribute name="Rsrc-Main-Class" value="edu.jhu.jacana.align.aligner.FlatAligner"/>
<attribute name="Class-Path" value="./ src/web"/>
<attribute name="Rsrc-Class-Path" value="./ src/web snowball.jar commons-logging.jar commons-cli-1.2.jar opennlp-maxent-2.4.0.jar opennlp-tools-1.3.jar trove-3.0.3.jar xom.jar commons-lang3-3.1.jar ant-1.8.1.jar LBFGS.jar trove.jar stringmetric-core.jar colt.1.2.0.jar mahout-collections-1.0.jar tiscaf_2.10-0.9-SNAPSHOT.jar lift-json_2.10-2.5-RC4.jar transducer.jar guava-16.0.1.jar paranamer-2.1.jar json-simple-1.1.1.jar"/>
</manifest>
<zipfileset src="jar-in-jar-loader.zip"/>
<fileset dir="${build-classes.dir}"/>
<fileset dir="src/web"/>
<!--<zipgroupfileset dir="lib" includes="*.jar"/>-->
<zipfileset src="lib/snowball.jar"/>
<zipfileset src="lib/commons-logging.jar"/>
<zipfileset src="lib/commons-cli-1.2.jar"/>
<zipfileset src="lib/opennlp-maxent-2.4.0.jar"/>
<zipfileset src="lib/opennlp-tools-1.3.jar"/>
<zipfileset src="lib/trove-3.0.3.jar"/>
<zipfileset src="lib/trove.jar"/>
<zipfileset src="lib/concurrentlinkedhashmap-lru-1.3.2.jar"/>
<zipfileset src="lib/extjwnl-1.8.0.jar"/>
<zipfileset src="lib/extjwnl-data-wn31-1.2.jar"/>
<zipfileset src="lib/extjwnl-utilities-1.8.0.jar"/>
<zipfileset src="lib/slf4j-api-1.7.7.jar"/>
<zipfileset src="lib/slf4j-log4j12-1.7.7.jar"/>
<zipfileset src="lib/log4j-1.2.17.jar"/>
<!--<zipfileset src="lib/stanford-corenlp-3.3.0.jar"/>-->
<!--<zipfileset src="lib/xom.jar"/>-->
<!--<zipfileset src="lib/lingpipe-4.1.0.jar"/>-->
<!--<zipfileset src="lib/jgrapht-jdk1.6.jar"/>-->
<!--<zipfileset src="lib/commons-lang3-3.1.jar"/>-->
<!--<zipfileset src="lib/cleartk-ml-crfsuite-0.2.0.jar"/>-->
<!--<zipfileset src="lib/commons-io-2.4.jar"/>
<zipfileset src="lib/de.tudarmstadt.ukp.dkpro.core.api.resources-asl-1.3.0.jar"/>-->
<!--<zipfileset src="lib/spring-core-3.1.0.RELEASE.jar"/>-->
<!--<zipfileset src="lib/uimaj-core-2.4.0.jar"/>-->
<!--<zipfileset src="lib/ant-1.8.1.jar"/>-->
<!--<zipfileset src="lib/stax-utils.jar"/>-->
<zipfileset src="lib/LBFGS.jar"/>
<zipfileset src="lib/stringmetric-core.jar"/>
<zipfileset src="lib/colt.1.2.0.jar"/>
<zipfileset src="lib/mahout-collections-1.0.jar"/>
<zipfileset src="lib/tiscaf_2.10-0.9-SNAPSHOT.jar"/>
<zipfileset src="lib/lift-json_2.10-2.5-RC4.jar"/>
<zipfileset src="lib/transducer.jar"/>
<zipfileset src="lib/guava-16.0.1.jar"/>
<zipfileset src="lib/paranamer-2.1.jar"/>
<zipfileset src="lib/json-simple-1.1.1.jar"/>
<!--<zipfileset src="${scala-reflect.jar}"/>-->
<zipfileset src="${scala-library.jar}"/>
</jar>
</target>
</project>