You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Mark Lundquist <ml...@comcast.net> on 2005/06/27 23:02:33 UTC

directed exit of ant build?

Hi all,

Is it possible for a target to script the termination of the build?

I want something like this:

	<available file="config" property="config.dir.exists"/>
	<target "config" unless="config.dir.exists">
		<exec executable="svn">
			<arg line="export config.tmpl.config"/>
		</exec>
		<echo message="Edit the files in config/, then run Ant again."/>
		<!--
		    ********** Here I would like to abort the ant run! *********
		-->
	</target>

any way to do this?  (sorry if it's a FAQ :-/)
thx,
—ml—

Re: directed exit of ant build?

Posted by Jeffrey E Care <ca...@us.ibm.com>.
The <fail> task accepts nested <condition> elements.

-- 
Jeffrey E. Care (carej@us.ibm.com)
WebSphere Build SWAT Team Lead
WebSphere Build Tooling Lead (Project Mantis)
https://w3.opensource.ibm.com/projects/mantis


Mark Lundquist <ml...@comcast.net> wrote on 06/27/2005 05:02:33 PM:

> Hi all,
> 
> Is it possible for a target to script the termination of the build?
> 
> I want something like this:
> 
>    <available file="config" property="config.dir.exists"/>
>    <target "config" unless="config.dir.exists">
>       <exec executable="svn">
>          <arg line="export config.tmpl.config"/>
>       </exec>
>       <echo message="Edit the files in config/, then run Ant again."/>
>       <!--
      ********** Here I would like to abort the ant run! 
> *********
  -->
>    </target>
> 
> any way to do this?  (sorry if it's a FAQ :-/)
> thx,
> ?ml?

Re: directed exit of ant build?

Posted by Mark Lundquist <ml...@comcast.net>.
On Jun 27, 2005, at 2:05 PM, Ninju Bohra wrote:

> How about the <fail> task

Perfect! :-)... thx Ninju (et al :-)
—ml—


Re: directed exit of ant build?

Posted by Ninju Bohra <ni...@yahoo.com>.
How about the <fail> task

--- Mark Lundquist <ml...@comcast.net> wrote:

> Hi all,
> 
> Is it possible for a target to script the
> termination of the build?
> 
> I want something like this:
> 
> 	<available file="config"
> property="config.dir.exists"/>
> 	<target "config" unless="config.dir.exists">
> 		<exec executable="svn">
> 			<arg line="export config.tmpl.config"/>
> 		</exec>
> 		<echo message="Edit the files in config/, then run
> Ant again."/>
> 		<!--
> 		    ********** Here I would like to abort the ant
> run! *********
> 		-->
> 	</target>
> 
> any way to do this?  (sorry if it's a FAQ :-/)
> thx,
> —ml—
> 





__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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