ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dalg...@ix.netcom.com (Mike Castle)
Subject Re: Using the same targets across multiple platforms
Date Thu, 31 Jul 2003 17:41:00 GMT
In article <0C94C6A4B6C4744F8E2B5FB6272D8A850ED151@ausyd0433.au.deloitte.com>,
Parnell, Giles (AU - Sydney) <user@ant.apache.org> wrote:
>I don't want to have to write different targets for each environment as
>it'll make the build script harder to maintain and far to long. I wanted to
>use the ant 'if' statement but it appears to only apply to a target, and
>what I really want is to be able to apply the if to specific exec statements

<exec/> supports the `os' attribute.

><target name="debugjboss" >		
>	<!-- Only do if SOLARIS -->
>	<exec dir="${bin}" executable="${bin}/run.sh">
>		<arg line="-c ${projectName}"/>
>		<env key="JAVA_OPTS" value="-remote debugging props/>
>	</exec>

Add to the exec:
os='Solaris'

or something like that.

mrc
-- 
     Mike Castle      dalgoda@ix.netcom.com      www.netcom.com/~dalgoda/
    We are all of us living in the shadow of Manhattan.  -- Watchmen
fatal ("You are in a maze of twisty compiler features, all different"); -- gcc

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


Mime
View raw message