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: problem with <fail/>
Date Thu, 20 Jul 2006 18:48:44 GMT
A macrodef would probably belong outside of a target. Also, I don't see
where you are actually executing the task you define with the macrodef.
What is the output of your build?

-Rob Anderson 

> -----Original Message-----
> From: Mayuresh Kshirsagar [mailto:mkshirsagar@Bladelogic.com] 
> Sent: Thursday, July 20, 2006 6:11 AM
> To: Ant Users List
> Subject: problem with <fail/>
> 
> Hi I am trying the following block:
> 
> <target name="init">
> 	<tstamp/>
> 	
> 	<macrodef name="ReadConfig">
> 		<attribute name="buildType" default="all"/>
> 		<element name="SomeMoreTasks" optional="true"/>
> 		<sequential>
> 			<echo message="The build type is @{buildType}"/>
> 			<echo message="Reading property file
> @{buildType}.cfg"/>
> 			
> 			<!--Check if the config file is available-->
> 			<assert>
> 				<available file="@{buildType}.cfg"/>
> 			</assert>
> 			
> 			<property file="@{buildType}.cfg"/>
> 			<SomeMoreTasks/>
> 			<fail/>
> 		</sequential>
> 	</macrodef>
> </target>
> 
> But the fail as I have placed doesn't fail the build. Only if 
> I place fail outside macrodef, then alone does the build 
> file. How can I make the build file by placing <fail/> where it is?
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For 
> additional commands, e-mail: user-help@ant.apache.org
> 
> 
> 


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


Mime
View raw message