<< Java, Bash, Cygwin, ... | Home | Alex Miller: Exploring Terracotta >>

Thursday Ant Quiz

I'm tearing my hairs out, so I think you should do the same. I'll make you, as a matter of fact, by way of a Thursday Ant quiz:

The Set Up: There are two files in the current directory: Foo.java and Foo.class.

Q: Write an Apache Ant 1.7.0 compatible build.xml file in the directory, which, when invoked with the ant, removes Foo.class but not Foo.java. You cannot use the word "Foo" in the build file.

No Googling, no peeking into the online Ant manual or any Ant books.

Tags :


Re: Thursday Ant Quiz

<target name="clean">
  <delete>
    <fileset dir="." includes="*.class"/>
  </delete>
</target>

Re: Thursday Ant Quiz

<project default="delete">
    <target name="delete">
        <delete dir="." includes="*.class"/>
    </target>
</project>

Add a comment Send a TrackBack