Yeah that's what I'd arrived at too.  It's easy for me to set the build
path.

The real problem I was having was how to select two differnt formats of
distribution: WAR archive vs unpacked binary distribution.

I guess it's not that huge of a thing.  I was just trying to build a good,
generic build file that I could use in my projects without making (very
many, if any) adaptations to it other than the values of the properties set.
Maybe the <if> task is what I am after.  I don't see that though.  Any ideas
where I could snag a copy of it?  Is it difficult to install such things?

Thanks so much!

Eddie
----- Original Message -----
From: "Diane Holt" <[EMAIL PROTECTED]>
To: "Ant Users List" <[EMAIL PROTECTED]>
Sent: Thursday, May 09, 2002 8:26 PM
Subject: Re: Flow-Control


> --- Eddie Bush <[EMAIL PROTECTED]> wrote:
> > Hi - I'm fairly new to ant so please don't laugh me off the list if
> > there is an obvious solution to this that I have overlooked.
> >
> > I have a build file that will, by changing a property definition value
> > (delploy.forreal) from false to true, will allow me to select either a
> > development or production deployment.  I want to extend this concept to
> > distributing a 'packed' (WAR) or unpacked application.  My problem is
> > that I don't see any flow-control mechanism that would let me route to
> > one alternative or the other in my 'deploy' task.
>
> You have several alternatives. One would be to not set a "deploy.forreal"
> property at all, since Ant's if/unless attributes don't check for value
> (eg., "false" or "true"), but only for whether the named property is set
> at all. Instead, just have a "production" property, which is only set when
> doing a production deployment, and 'unless="production"' on your dev
> deploy, and 'if="production"' on your production deploy.
>
> If you go with the "deploy.forreal" being set to "false" or "true"
> approach, you'd need to conditionally set another property to use for your
> if/unless attrs -- eg:
>   <condition property="production" value="true">
>     <equals arg1="deploy.forreal" arg2="true"/>
>   </condition>
> and still if/unless on "production" in your deploy targets.
>
> The third alternative is to use the ant-contrib <if> task (personally
> highly recommended for this sort of thing, since having <target>'s
> if/unless attributes do a test-for-equality is something I campaigned
> strenuously for somewhere back in 2000, but was turned down flat, so
> pointing people to the <if> task is my little revenge :)
>
> Diane
>
> =====
> ([EMAIL PROTECTED])
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Shopping - Mother's Day is May 12th!
> http://shopping.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]>

Reply via email to