Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

User talk:Gaurangtpatel.gmail.com

Revision as of 13:57, 3 April 2009 by Gaurangtpatel.gmail.com (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="classpath.id" default="default.classpath" />
  <attribute name="src.dir" default="${src.java.dir}" />
  <sequential>
     <mkdir dir="@{build.dir}" />
     <javac destdir="@{build.dir}" debug="${debug}"
       optimize="${optimize}">
        <classpath refid="@{classpath.id}" />
        <src path="@{src.dir}" />
     </javac>
  </sequential>

</macrodef>

Back to the top