ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anderson, Rob (Global Trade)" <Rob.Ander...@nike.com>
Subject RE: How to build silently
Date Wed, 26 Apr 2006 17:56:59 GMT
You might consider creating some wrapper scripts that pass in the
appropriate properties on the command line, then use the unless
attribute of target. Something like this...

Wrapperscript
==============

ant -Dsomeproperty=something targetname

Build.xml
==========
<target name="getInput" unless="someproperty">
  <input addproperty="someproperty" message="What do you want to set
someproperty to?"/>
</target>

Then when you run the wrapper with whatever value you specify, the
getInput target does not execute. But when running ant without passing
in someproperty you are prompted for the input.

-Rob Anderson

> -----Original Message-----
> From: BOUSQUET Jeremie [mailto:Jeremie.BOUSQUET@gemplus.com] 
> Sent: Wednesday, April 26, 2006 10:06 AM
> To: Ant Users List
> Subject: How to build silently
> 
> Hello, 
>  
> I had some fun with <input> task in my generic build process 
> with ANT, to ask users for various things (labels, passwords ...).
> But now teams use more and more automation, and I could not 
> find any way to easily make these <input> silent !
>  
> I know default values can be a solution, but sometimes these 
> default values can only come from command line (which is 
> masked from end-user and so not very usable here), and 
> sometimes there is just no default value (and so it will 
> always ask you to press a key) ...
>  
> Is there any way to force ant to keep silent on <input> tasks 
> with some ANT command line option, or do I have to rethink 
> (and redeliver ...) my build ?
>  
> Any suggestions warmly appreciated,
>  
> -- Jeremie
> 


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


Mime
View raw message