-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
63 lines (53 loc) · 2.46 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
<project name="subtle" default="create-jar" basedir=".">
<property name="src.dir" location="src"/>
<property name="build.dir" location="build"/>
<property name="lib.dir" location="bib" />
<property name="archive.filename" value="subtle" />
<property name="jar.filename" value="${archive.filename}.jar" />
<property name="log4j.filename" value="log4j.properties" />
<path id="project.classpath">
<fileset dir="${lib.dir}">
<include name="**/*.jar" />
</fileset>
</path>
<manifestclasspath property="lib.list" jarfile="${archive.filename}.jar">
<classpath refid="project.classpath" />
</manifestclasspath>
<manifestclasspath property="properties.list" jarfile="${log4j.filename}">
<classpath refid="project.classpath" />
</manifestclasspath>
<target name="prepare" description="Creates necessary directories for the building process">
<mkdir dir="${build.dir}"/>
</target>
<target name="clean" description="Removes any generated files">
<delete dir="${build.dir}"/>
<delete file="${jar.filename}"/>
</target>
<target name="compile" depends="prepare" description="Compiles the source code" >
<javac srcdir="${src.dir}" destdir="${build.dir}" classpathref="project.classpath"
source="1.7" target="1.7" debug="on" includeantruntime="false"/>
</target>
<target name="create-jar" depends="clean,compile" description="Generates the jar with the project classes">
<jar destfile="${jar.filename}" basedir="${build.dir}">
<!--fileset dir="." includes="resources/** results/** config/** lib/*"/-->
<manifest>
<attribute name="Main-Class" value="SubsParser"/>
<attribute name="Class-Path" value=". ${lib.list} ${properties.list}"/>
</manifest>
</jar>
</target>
<!-- <property name="run.args" value="package.and.class.name arg1 arg2 arg3"/> -->
<!-- <property name="target.classpath" value="target.jar"/> -->
<target name="run" depends="create-jar" description="Runs the target program with Traits" >
<!-- fail unless="run.args" message="arguments must be passed using ant option -Drun.args="/> -->
<!-- fail unless="target.classpath" message="classpath for target program must be passed using ant option -Dtarget.classpath="/> -->
<java classname="SubsParser" fork="true">
<classpath>
<path refid="project.classpath"/>
<pathelement location="${jar.filename}"/>
<pathelement path="${target.classpath}"/>
</classpath>
<!-- arg line="${run.args}" /> -->
</java>
</target>
</project>