ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Vogel <pvo...@arsin.com>
Subject RE: PATCH: Attributes of Target can reference properties
Date Tue, 03 Jul 2001 22:01:32 GMT
> > Instead of a nice clean:
> >    <target name="whatever">
> > 	<if expr="! ${buildnum}">
> >             <!-- do what it takes to look up and update the 
> buildnum -->
> >       </if>
> >       ...
> 
> BuildID should be a task not some adhoc scripting. It is 
> generic enough to be 
> a task - just that no one has ever sent in a patch to include it IIRC.

That's because different systems have different ways of maintaining a 
buildID cleanly.  For example, if you are using one of several commercial
tools, you might store the last buildID as an attribute on the build.xml 
file itself.  If you are using CVS the buildID might be in the tags on
the build.xml file, etc.  There is no "one way" to properly manage buildIDs,
so the tool should support fetching it in a methodology-specific manner.

Further, sometimes buildIDs will vary depending on whether the build is 
a formal build destined for QA (possibly even a release candidate) or
whether
it is a plain-'ol nightly.

> 
> > Adding a target that has to be explained to people for no 
> reason other than
> > to work around the need for an if!
> 
> thats not a good example because the "ant" way saids there 
> should be a task 
> for that and thus no if. Complexity is pushed into task.

Leading to an explosion of tasks that could just much more cleanly and 
transparently been done within the build.xml file.

> 
> > I already posted the mess that results from hacking around 
> the lack of a
> > foreach.
> 
> yep I agree and I don't think anyone on ant-dev has denied 
> it. But what is  your point? 

I should think it would be obvious.  Looping and Simple conditionals
are a common pattern in build infrastructures, the tool should support
them natively without making people go running to Java.  

> > > *-----------------------------------------------------*
> > >
> > > | "Faced with the choice between changing one's mind, |
> > > | and proving that there is no need to do so - almost |
> > > | everyone gets busy on the proof."                   |
> > > |              - John Kenneth Galbraith               |
> > >
> > > *-----------------------------------------------------*
> >
> > I think you and I both ought to take the above to heart!  
> I've actually
> > spent quite a lot of time over the past two months working 
> to instill the
> > "ant way" into myself, and I'll admit my position has 
> changed on a few
> > topics, but not the ones I'm most vocal about here, because 
> there *isn't*
> > another way to do the things that need to be done that 
> remains within the
> > goals of ant.
> 
> My opinions have changed at least 3 times that I recall ;) In 
> the begining I 
> was of "traditional" ant mindset. ie procedural 
> elements/scripting == evil. 
> Then I went to dynamic templating+scripting is good with low 
> cost antcalls as 
> methods etc. Now I am in dynamic templating is bad, build 
> specification 
> should be deterministic and determined before build process. 
> As procedural 
> elements are always going to be needed this implies 
> templating (or something 
> else I haven't thought of).

Ever consider that the "something else" might be simple extensions
to ant itself? :-)

-Peter 

Mime
View raw message