Apache ant build XML. This will use jikes in place of javac. Any compiler error output is formatted so that vim can parse it.
ant is a modern alternative to make. The build script is an XML file. It works particularly well with java. Download it for free from the
Apache ant site. Most people find ant a lot nicer to live with than make.
1
2 <?xml version="1.0"?>
3
4 <project name="Hello" default="compile" basedir=".">
5 <property name="name" value="Hello"/>
6 <property name="version" value="1.0"/>
7
8 <!-- Project directories.
9 -->
10
11 <property name="build" value="build"/>
12 <property name="dist" value="dist"/>
13 <property name="src" value="src"/>
14
15 <!-- Compiler directives.
16 -->
17
18 <property name="optimize" value="off"/>
19 <property name="deprecation" value="on"/>
20 <property name="debug" value="on"/>
21
22 <property name="build.compiler" value="jikes"/>
23 <property name="build.compiler.emacs" value="true"/>
24
25 <target name="init">
26 <tstamp/>
27 <mkdir dir="${build}"/>
28 </target>
29
30 <!-- Compile all the .java files from the source directory into
31 the build directory.
32 -->
33
34 <target name="compile" depends="init">
35 <javac srcdir="${src}" destdir="${build}" includes="**/*.java"
36 debug="${debug}" deprecation="${deprecation}" optimize="${optimize}">
37 </javac>
38 </target>
39
40 <target name="clean" depends="init">
41 <delete dir="${build}"/>
42 <delete dir="${dist}"/>
43 </target>
44
45 <target name="test" depends="compile">
46 <java classname="HelloWorld" fork="yes">
47 <classpath>
48 <pathelement location="${build}"/>
49 </classpath>
50 </java>
51 </target>
52 </project>