ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Vogel <pvo...@arsin.com>
Subject RE: if and unless attributes for all Tasks
Date Wed, 16 May 2001 23:03:33 GMT
>From my POV:

Because it isn't in the core, and it is dependant upon language
interpreters being available (i.e. javascript, etc.) somewhere
else.

It is close though...  

-Peter

> -----Original Message-----
> From: Michael McCallum [mailto:michael@spinsoftware.com]
> Sent: Wednesday, May 16, 2001 3:35 PM
> To: ant-dev@jakarta.apache.org
> Subject: RE: if and unless attributes for all Tasks
> 
> 
> Why not use the script task?
> 
> On 16 May 2001, at 14:36, Jason_Henriksen@providian.com wrote:
> 
> > 
> > Hi All,
> > 
> > Roger Vaughn and I have been discussing XML as a flow 
> control language and
> > I've come up with a compromise that I'm considering taking a stab at
> > writing.  I want to bounce the idea off all of you before I 
> invest a pile
> > of time into an idea that one of you might be able to easily debunk.
> > 
> > I feel that XML is a very poor language for describing 
> conditionals.  All
> > the arguments seem to show that.  I suggest a new task 
> called 'code' that
> > would work something like this:
> > 
> >  <target name="make">
> >    <code>
> >          if(true){
> >            callTarget("compile");
> >          }
> >    </code>
> >  </target>
> > 
> > My task would then take all of the Java between the code 
> tags, put it into
> > a TempTaskN.java file, compile it, load the class then call 
> the task just
> > like any other.  Basically, the code tag is just a scriptlet in the
> > build.xml.
> > 
> > To my thinking this has the following advantages:
> >      - It doesn't break the current design and architecture
> >      - It takes advantage of the fact that we already have 
> a very nice
> > language and compiler,
> >           we should not have to build another one
> >      - Because tasks in this context tend to be one-off, 
> non-reusable bits
> > of code, it is
> >           really nice to keep the task code in the same 
> file as the rest of
> > the build.
> >      - The java in the code block could call the other 
> tasks, but still
> > have all of the
> >           flexibility of Java
> > 
> > My most optimistic hope is that I can write this into a 
> regular task, and
> > ANT itself would not have to change at all.
> > 
> > Can any of you think of a reason this wouldn't work?  If 
> not, I'm going to
> > try coding it next week and I've got some scraps of free 
> time coming.
> > 
> > Let me know what you think, and thank's to Roger for the 
> discussion about
> > it.
> > 
> >                                                         
> Jason Henriksen
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> --------------------------------------------------------------
> ----------------
> > Warning : The information contained in this message may be 
> privileged and confidential and protec
> ted from disclosure. If the reader of this message is not the 
> intended recipient, you are hereby no
> tified that any dissemination, distribution or copying of 
> this communication is strictly prohibited
> . If you have received this communication in error, please 
> notify us immediately by replying to thi
> s message and then delete it from your computer. All e-mail 
> sent to this address will be received b
> y the Providian Financial corporate e-mail system and is 
> subject to archiving and review by someone
>  other than the recipient.
> > 
> > 
> ==============================================================
> ================
> > 
> > 
> 
> 

Mime
View raw message