-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.xml
27 lines (20 loc) · 896 Bytes
/
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
<?xml version="1.0" encoding="UTF-8"?>
<project name="ant-java-project" basedir="." default="complete">
<target name="complete" depends="clean,create,compile,package" description="This will print my project status">
<echo>The Ant java project executed successfully</echo>
</target>
<target name="clean" description="It will clean up my class directory">
<delete dir="build/class"></delete>
<delete dir="dist"></delete>
</target>
<target name="create" description="It will create build/class directory">
<mkdir dir="build/class"/>
<mkdir dir="dist"/>
</target>
<target name="compile" description="It will compile my java code">
<javac srcdir="src" destdir="build/class"></javac>
</target>
<target name="package" description="It will create jar file">
<jar destfile="dist/ant-java.jar" basedir="build/class"></jar>
</target>
</project>