ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jose Alberto Fernandez <JFernan...@viquity.com>
Subject RE: [PATCH] New <case> task
Date Wed, 11 Oct 2000 18:10:22 GMT
> From: Glen_Stampoultzis@ansett.com.au
> 
> 
> Just curious as to whether there is a specific problem that 
> you are trying to
> overcome with the addition of this task.  It usually helps me 
> if I can associate
> a given solution with the problem it's trying to overcome.
> 

In my case, the project we are building using ANT is designed to work in
multiple RDBMSs. We have defined a properties file that different developers
modify to configure for the particular DB they have installed.
The ANT buildfile is use for the deployment of the test environment. There
is a property on that file that defines what kind of DB is been used,
"oracle", "mssql", etc. Based on the value, I would like to make decisions
on some parts of the deployment that are special for different RDBMSs.

I do not want to clutter people with 5 or 6 different variables from which
they need to set just one, in order to pick the right configuration. That is
why I originally provided the 'if="prop=value"' patch. Which I also think
was quite declarative. As a compromise I defined the task, which means that
the buildfile will have to dealt with the 5 or 6 properties but at least
users do not. And it allows a way to guarantee consistency.

Hope this clears my needs.

> Regards,
> 
>      Glen Stampoultzis
> 
> 
> 
> 
> 
> 
> Jose Alberto Fernandez <JFernandez@viquity.com> on 11/10/2000 
> 11:01:14 AM
> 
> Please respond to ant-dev@jakarta.apache.org
> 
> To:   "'ant-dev@jakarta.apache.org'" <ant-dev@jakarta.apache.org>
> cc:    (bcc: Glen Stampoultzis/ITD/MEL/Ansett/AU)
> Subject:  RE: [PATCH] New <case> task
> 
> 
> 
> If we were to follow this line of thought to their last consequences,
> We should remove <available> because we should be doing that 
> with scripts.
> I see no difference what so ever between setting a property 
> based on the
> existance of a file or setting a property based on a value.
> 
> To me scripting is using a cannon ball to kill a fly. Why do 
> I need to have
> BSF installed and learn javascript, or netrexx or some other 
> language AND
> download the interpreter for such language just to be able to 
> make decision
> based on a value.
> 
> With respect to whether we are going procedural here, I was 
> very careful on
> the construct to stay declarative. The case statement is one of the
> constructs allowed in every single declarative language I 
> know, from PROLOG
> (where you do it with unification) to all the functional 
> languages and the
> parallel declarative languages as well.
> This is not more procedural than <available>. Actually, 
> <available> is more
> procedural, given that it can check external resources that 
> can be change
> depending on the execution order.
> 
> I am offering this task because I think it is a functionality 
> that should be
> in ANTs core, and not be in some optional part of ANT that 
> requires you to
> download extra stuff and learn extra languajes.
> 
> I hope you agree with my point of view.
> 
> Jose Alberto
> 
> > -----Original Message-----
> > From: Sean Brandt [mailto:sean@fuzzymagic.com]
> > Sent: Tuesday, October 10, 2000 5:48 PM
> > To: ant-dev@jakarta.apache.org
> > Subject: Re: [PATCH] New <case> task
> >
> >
> >     Hmm, with the advent of dynamic properties, scripting
> > really should be the
> > answer for this type of problem, IMHO. Perhaps there should
> > be a contrib package
> > of useful utility scripts?
> >
> > - Sean Brandt
> >
> >
> 
> 
> 
> 
> 
> 
> _____________________________________________________________________
> CAUTION - This message may contain privileged and confidential 
> information intended only for the use of the addressee named above.
> If you are not the intended recipient of this message you are hereby 
> notified that any use, dissemination, distribution or reproduction 
> of this message is prohibited. If you have received this message in 
> error please notify Ansett Australia immediately. Any views expressed 
> in this message are those of the individual sender and may not 
> necessarily reflect the views of Ansett Australia.
> 
> ABN Ansett Australia Ltd	37 004 209 410
> ABN Ansett International Ltd	72 060 622 460
> _____________________________________________________________________
> 

Mime
View raw message