ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <gudnabr...@yahoo.com>
Subject Re: conditional copy
Date Thu, 22 Aug 2002 13:41:54 GMT
This is the normal way of doing things, and in fact,
conditionally executed tasks are what I use myself in
such a situation.  However, it is only fair to give
mention to ant-contrib's <if> task which provides
inline conditional task execution...

-Matt

--- jfc <jfc100@btopenworld.com> wrote:
> jfc wrote:
> 
> > Erik Hatcher wrote:
> >
> >> Yes, if you nest the task inside a conditional
> <target>.  Targets 
> >> have conditional (if/unless) capability, but not
> tasks.
> >>
> >> jfc wrote:
> >>
> >>> Hi,
> >>>
> >>> I have just been looking at the docs and it
> seems one can set a 
> >>> property value conditionally.
> >>>
> >>> Is there a way that I can have a task executed
> conditionally?
> >>>
> >>> I'd like to say something like :
> >>>
> >>> <condition>
> >>>    <!-- predefined property -->
> >>>    <property name="myprop" value="aaa">
> >>>        <!-- so this copy will only happen if
> myprop == "aaa" -->
> >>>        <copy  
> file="${project.home}/etc/Manifest.mf" 
> >>>
>
tofile="${build.home}/ear/war/META-INF/Manifest.mf"/>
> >>>    </property>
> >>> </condition>
> >>>
> >>> Thanks
> >>> jfc
> >>>
> >>>
> >>> -- 
> >>> To unsubscribe, e-mail:   
> >>> <mailto:ant-user-unsubscribe@jakarta.apache.org>
> >>> For additional commands, e-mail: 
> >>> <mailto:ant-user-help@jakarta.apache.org>
> >>>
> >>>
> >>>
> >>
> >>
> >>
> >> -- 
> >> To unsubscribe, e-mail:   
> >> <mailto:ant-user-unsubscribe@jakarta.apache.org>
> >> For additional commands, e-mail: 
> >> <mailto:ant-user-help@jakarta.apache.org>
> >>
> >>
> > thanks for that.
> >
> > its kinda 'call a target even if you're not going
> need to ignore its 
> > contents' but it works! ;-)
> >
> > jfc
> >
> >
> >
> > -- 
> > To unsubscribe, e-mail:   
> > <mailto:ant-user-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail: 
> > <mailto:ant-user-help@jakarta.apache.org>
> >
> >
> sorry, that should be ' ... even if you're going to
> ignore its contents'
> 
> 
> 
> --
> To unsubscribe, e-mail:  
> <mailto:ant-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:ant-user-help@jakarta.apache.org>
> 


__________________________________________________
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message