In that case I would use if and unless on targets
which make s to the nearly-identical code,
modified to be parameterized...
-Matt
--- Markus Kramer <[EMAIL PROTECTED]> wrote:
> Matt,
> unfortunately, this does not resolve the pitfall of
> having nearly identical
> code in two places.
>
> -Mark
Vilya,
this sounds *wonderful*.
I would very much like to ask you for your modified Ant.
-Markus
Vilya Harvey wrote:
> I've modified my copy of Ant (1.5) to have if="" and unless="" on every
> task; I can send you the modified source code if you like. When I have a bit
> more time I intend to s
Matt,
unfortunately, this does not resolve the pitfall of having nearly identical
code in two places.
-Markus
Matt Benson wrote:
> I thought that would be nice too, having if and unless
> available everywhere. I don't really think about it
> anymore. What you do is wrap these types of things
couldn't find a work-around on Google groups or the FAQs.
Many thanks,
Michael
- Original Message -
From: "Vilya Harvey" <[EMAIL PROTECTED]>
To: "Ant Users List" <[EMAIL PROTECTED]>
Sent: Friday, September 20, 2002 12:18 PM
Subject: Re: OS-specific exe
Sent: Friday, September 20, 2002 4:58 PM
Subject: Re: OS-specific execution of any element requested
> I thought that would be nice too, having if and unless
> available everywhere. I don't really think about it
> anymore. What you do is wrap these types of things in
> other target
I thought that would be nice too, having if and unless
available everywhere. I don't really think about it
anymore. What you do is wrap these types of things in
other targets, put the if/unless on the targets, and
make your main target dependent on those.
-Matt
--- Markus Kramer <[EMAIL PROTEC
Matt,
this sounds wonderful, trouble is that the unless attribute is not allowed for
things like paths:
brakes Ant.
My proposal would be to have the unless (and the if) attribute allowed on
*any* Ant element.
This is more flexible than my first proposal to have an "os" attribute.
Trouble is,
Absolutely. much better than antcalls.
Good tip ;)
Roland.
-Message d'origine-
De : Matt Benson [mailto:[EMAIL PROTECTED]]
Envoye : vendredi 20 septembre 2002 15:21
A : Ant Users List
Objet : RE: OS-specific execution of any element requested
Or making all the targets dependencie
Or making all the targets dependencies and relying on
if/unless to stop the wrong ones from executing is
probably the intended way, as opposed to
which is nice for more dynamic things.
-Matt
--- EXT / FOCAL MALAPRADE Roland
<[EMAIL PROTECTED]> wrote:
> you could use a as such:
>
>
>
you could use a as such:
with a PatternSet. i.e.:
and then call a target as such:
if you make one target per os, and call all of them with an , the
right one should get called.
Roland
-Message d'origine-
De : Markus Kramer [mailto:[EMAIL PROTECTED]]
Envoye : v
10 matches
Mail list logo