-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
73 lines (71 loc) · 2.77 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
<?xml version="1.0"?>
<project name="JHexEdit" default="release" basedir=".">
<description>A Hex Editor Written in Java</description>
<!-- set global properties for this build -->
<property name="src" location="src"/>
<property name="build" location="build"/>
<property name="dist" location="dist"/>
<property name="doc" location="html"/>
<property name="lib" location="lib"/>
<path id="classpath">
<fileset dir="${lib}" includes="**/*.jar"/>
</path>
<!-- Initialize the compile process -->
<target name="init">
<!-- Create the time stamp -->
<tstamp/>
<!-- Create the build number -->
<buildnumber/>
<!-- Create the build directory structure used by compile -->
<mkdir dir="${build}"/>
</target>
<!-- Compile the source code -->
<target name="compile" depends="init" description="compile the source">
<!-- Compile the java code from ${src} into ${build} -->
<javac srcdir="${src}" destdir="${build}" classpathref="classpath"/>
</target>
<!-- Make a release, which is just a jar file, with no date stamp. -->
<target name="release" depends="compile" description="generate the release">
<!-- Create the distribution directory -->
<mkdir dir="${dist}"/>
<jar jarfile="${dist}/jhexedit.jar" manifest="./manifest.txt">
<!-- Add the build.number file to the jar -->
<fileset dir="." includes="build.number"/>
<!-- Add the Source Code -->
<fileset dir="${src}" includes="**"/>
<!-- Add the class files -->
<fileset dir="${build}" includes="**"/>
</jar>
</target>
<!-- Create the documentation. -->
<target name="doc" depends="release" description="Creates the javadoc, documentation.">
<!-- Create the documentation directory -->
<mkdir dir="${doc}"/>
<!-- Compile the documentation -->
<javadoc destdir="${doc}" author="true" version="true" use="true"
windowtitle="JHexEdit" additionalparam="-notimestamp">
<fileset dir="${src}" includes="**" excludes="**/test/Test*.java"/>
<link href="http://java.sun.com/j2se/1.5.0/docs/api/"/>
</javadoc>
</target>
<!-- Clean up the directories -->
<target name="clean" description="clean up">
<!-- Delete the ${build} and ${dist} directory trees -->
<delete dir="${build}"/>
<delete dir="${dist}"/>
<delete dir="${doc}"/>
</target>
<!-- Run unit tests -->
<target name="test" depends="compile">
<junit printsummary="yes">
<classpath>
<path refid="classpath"/>
<pathelement path="${build}"/>
</classpath>
<formatter type="brief" usefile="false" />
<batchtest fork="yes">
<fileset dir="${src}" includes="**/test/Test*.java"/>
</batchtest>
</junit>
</target>
</project>