Skip to main content
Jump to: navigation, search


Revision as of 12:57, 3 April 2009 by (Talk | contribs) (Project proposal)

Proposal: Ant buildfile refactorings

A macrodef for compiling Java code using the javac Ant task could look like this:

<macrodef name="m_compile">

  <attribute name="build.dir" default="${build.dir}" />
  <attribute name="" default="default.classpath" />
  <attribute name="src.dir" default="${}" />
     <mkdir dir="@{build.dir}" />
     <javac destdir="@{build.dir}" debug="${debug}"
        <classpath refid="@{}" />
        <src path="@{src.dir}" />


Back to the top