Reputation: 1147
I am trying to write a task that will combine all the tasks in by build.xml
<project name="HW4_Build">
<target name="mkedir">
<mkdir dir="bld/class/cscie55/hw4"/>
</target>
<target name="clean">
<delete dir="bld"/>
</target>
<target name="compile" depends="clean, mkedir">
<javac destdir="bld/class" srcdir="src/cscie55/hw4"/>
</target>
<target name="jar" depends="compile">
<jar destfile="HW4.jar" basedir="bld/class"/>
</target>
</project>
Is following method right way to go about this?
<ant antfile="build"/>
Upvotes: 0
Views: 353
Reputation: 2012
<antcall target="target"/>
Use this to define a target that combines all your other targets.
Although this won't exactly work in your case since you are using depends
... So you only need to call your last target in the dependency chain.
Upvotes: 0
Reputation: 1188
In this build.xml you might just want to try:
<project name="HW4_Build" default="jar">
Because the jar target already includes the other targets via the dependency chain.
<ant antfile="build"/>
Is used for invoking another build file. Not sure that's what you want.
Upvotes: 1