ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <hol...@yahoo.com>
Subject Re: Properties and the <ant> tag
Date Sat, 26 May 2001 21:51:57 GMT
--- Glenn McAllister <glenn@somanetworks.com> wrote:
> Just because you can't code a proposal doesn't mean it isn't
> valuable. There have been a number of issues brought up in the past by
> regular users that have been incorported by others (read: committers)
> into the system.

Okay, well in that case... I've always thought it would be nice to have a
way to do something like:
<template name="myjavac" task="javac">
  <defaults
      compiler="jikes"
      includeAntRuntime="no"
      bootclasspath="${nowhere}"
      extdirs="${nowhere}"
      failonerror="${proceed}"
      debug="${debug}"
      depend="${depend}"
      deprecation="${deprecation}"
      optimize="${optimize}"
      verbose="${verbose}"
      srcdir="${javasrc.dir}"
      destdir="${classes.dir}"
      classpath="${compile.classpath}"/>
</template>

Then, for compiles that use all the defaults, have targets like:
  <target name="compile">
    <myjavac includes="${com.dir}/simple/**"/>
  </target>

Or, for compiles that need different values:
  <target name="compile">
    <myjavac
      compiler="modern"
      bootclasspath=""
      extdirs=""
      destdir="${special_classes.dir}">
      <classpath>
        <pathelement location="${javatools.dir}/extra.jar"/>
      </classpath>
      <include name="${com.dir}/special/**"/>
    </myjavac>
  </target>

I haven't completely thought it all out, so that's just a rough-draft off
the top of my head (I snuck in the "compiler" attribute, which I do think
should be an attribute of <javac> and not the global "build.compiler"
property that it currently is :)

Diane

=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/

Mime
View raw message