Actually, I was thinking you'd have targets with the block of properties
you need to set, conditionally running the target based on your
determining property.

Using <condition>, you'd set a property to "if" on in the property-setting
targets (eg., you'd set something like "setForVal1" if your determining
property was equal to "val1", "setForVal2" if it was equal to "val2",
etc., and have <target name="setVal1Props" if="setForVal1">).

Using Matt's <switch>, you'd just set "target" to run the property-setting
target you needed (eg., <case value="val1" target="setVal1Props"/>).

Diane

--- DONNIE HALE <[EMAIL PROTECTED]> wrote:
> The use of <condition> becomes tedious, it seems, for lots of conditions
> and lots of properties per condition. The <switch> task looks close, but
> I need to be able to set multiple properties per <case>:
> 
> <switch value="..."> <!--for consistency, "value" should be
> "property"-->
>   <case value="val1">
>     <property name="prop1" value="prop1.1" />
>     <property name="prop2" value="prop2.1" />
>   </case>
>   <case value="val2">
>     <property name="prop1" value="prop1.2" />
>     <property name="prop2" value="prop2.2" />
>   </case>
>   ...
> </switch>
> 
> Hope that makes sense. At that point, the clarity and length of the .xml
> file vs. my shell script is about equal.
> 
> If <switch> is enhanced that way, I'd say add it as a core task. :)
> 
> Thanks,
> 
> Donnie
> 
> 
> >>> [EMAIL PROTECTED] 12/19/01 11:51AM >>>
> --- DONNIE HALE <[EMAIL PROTECTED]> wrote:
> > We've only got one target - the .ear file. What we have is four
> > different WebLogic "domains" - unit, int, qa, and "arch" (for
> > architecture testing, etc.). Each of those imply different
> directories,
> > admin server ports, etc. The shell script has a case statement that
> sets
> > up all this very nicely, and with Ant's current facilities, it's much
> > more convoluted. Now if Ant had a <case> task ... :)
> 
> I take it you don't think <condition> would do it for you? (I think I
> could see it being used, but then, I haven't seen your shell-script.) 
> But
> if you don't think it would, you might want to consider asking Matt
> Inger
> for his <switch> task -- see:
>   http://marc.theaimsgroup.com/?l=ant-dev&m=99409422803319&w=2 
> 
> Diane
> 
> =====
> ([EMAIL PROTECTED])
> 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Check out Yahoo! Shopping and Yahoo! Auctions for all of
> your unique holiday gifts! Buy at http://shopping.yahoo.com 
> or bid at http://auctions.yahoo.com 
> 
> --
> To unsubscribe, e-mail:  
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> 
> 
> 
> --
> To unsubscribe, e-mail:  
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> 


=====
([EMAIL PROTECTED])



__________________________________________________
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at http://shopping.yahoo.com
or bid at http://auctions.yahoo.com

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to