-
Notifications
You must be signed in to change notification settings - Fork 47
/
build.xml
74 lines (65 loc) · 2.7 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
<?xml version="1.0" encoding="UTF-8"?>
<project name="jModelTest" default="jar" basedir=".">
<property name="src.dir" location="src/main/java" />
<property name="build.base.dir" location="build" />
<property name="build.dir" location="${build.base.dir}/classes" />
<property name="lib.dir" location="lib" />
<property name="dist.dir" location="dist" />
<property name="exe.dir" location="${dist.dir}/exe/phyml" />
<property name="log.dir" location="${dist.dir}/log" />
<property name="manual.dir" location="manual" />
<property name="src.resources.dir" location="src/main/resources" />
<property name="html.template.dir" location="${src.resources.dir}/resources" />
<property name="jarfile" location="${dist.dir}/${ant.project.name}.jar" />
<property name="compile.debug" value="false" />
<fileset id="lib.jars" dir="${lib.dir}">
<include name="**/*.jar" />
</fileset>
<path id="lib.path">
<fileset refid="lib.jars" />
</path>
<!-- Stub install target. Install should depend on the 'jar' target,
and copy the built objects to the 'dist' directory. -->
<target name="install" description="Install jar" depends="jar">
</target>
<target name="compile" description="Compile code">
<mkdir dir="${build.dir}" />
<mkdir dir="${lib.dir}" />
<property environment="env" />
<property name="java6.boot.classpath" value="${env.JAVA6_BOOTCLASSES}" />
<javac srcdir="${src.dir}" destdir="${build.dir}" includeAntRuntime="no"
target="1.6" source="1.6" bootclasspath="${java5.boot.classpath}"
classpathref="lib.path" debug="${compile.debug}">
<compilerarg value="-Xlint:all"/>
</javac>
</target>
<target name="jar" depends="compile" description="Build jar">
<mkdir dir="${dist.dir}" />
<jar jarfile="${jarfile}" basedir="${build.dir}" manifest="Manifest">
<fileset dir="${src.dir}" includes="**/*.xml,**/*.properties,**/*.gif,**/*.ico" />
<!-- Merge library jars into final jar file
<zipgroupfileset refid="lib.jars"/>-->
</jar>
<mkdir dir="${dist.dir}/lib" />
<copy todir="${dist.dir}/lib">
<fileset id="lib.jars" dir="${lib.dir}">
<include name="**/*.jar" />
</fileset>
</copy>
<copy todir="${dist.dir}">
<fileset dir="${src.resources.dir}">
<include name="**/*" />
</fileset>
</copy>
<mkdir dir="${log.dir}" />
<chmod perm="755" dir="${dist.dir}" includes="*.sh *.bat" />
</target>
<target name="run" depends="jar" description="Run jar file">
<java jar="${jarfile}" fork="yes" failonerror="true" />
</target>
<target name="clean" description="Remove build and dist directories">
<delete dir="${build.base.dir}" />
<delete dir="${dist.dir}" />
<delete dir="${manual.dir}" includes="*.aux *.bbl *.out *.toc *.log *.blg *.dvi" />
</target>
</project>