ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Larry Sanderson" <>
Subject Re: New core functionality
Date Sun, 21 Jan 2001 18:32:18 GMT
See inline below...
  ----- Original Message ----- 
  From: Nico Seessle 
  Sent: Sunday, January 21, 2001 2:06 AM
  Subject: Re: New core functionality


    I have modified ant for our corporate use, and I thought some of you may be interested
in the additions / changes:

    1) I modified the Ant task to accept a nested "antpath" element.  This is a standard path
element that defines a list of sub-tasks to execute.  We use it to glob large nested builds.
 (Note: this task remains completely backward compatible)

        <fileset dir="." includes="*/**/build.xml" />
  Isn't that an foreach-loop :-) Isn't execution order a problem for you? maybe ant get's
them in the "right" order now, but what happens if Sun (or the Ant-team) changes the order
files are listed/processed?

It is absolutely a for-each loop, and as you say, it only works when order is unimportant.
 Basically, I have had difficulty writing a flexible build script - it is always tightly coupled
with the the exact structure of my source.  Ant is missing the ability to do even basic iteration,
and this is exactly what I need to make my projects work the way I want.
    3) I modified Main to accept only one task at a time.  All additional arguments are translated
into user-properties. (This one is NOT backward compatible)

    when you run:  ant foo bar dee

    only the target, "foo", is run, but there are two additional user properties available:
arg1="bar", arg2="dee".
  You could accomplish the same by modifying ant.bat (or create your own build.bat). So I
don't think we should change this inside ant if we pay with less "features" (possibilities).
It's more common to let a buildfile do "this" and "that" and sometimes only "that" because
"this" needs not to be done than to have properties named arg1, ..., arg9, ...arg?.

Yeah, I was thinking of going that route, but I'm way better at Java than at .bat or sh scripts.
 (Can this even be done on a windows environment??).  Anyway, I agree with your assessment
on this last item, but I strongly believe ant needs both a conditional, and a looping task.
Has this idea already been shot down?


View raw message