ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dominique Devienne" <ddevie...@gmail.com>
Subject Re: Trying to do things the "Ant way"
Date Fri, 28 Jul 2006 19:09:33 GMT
> I think you've misunderstood what I intended the "build-all" task to mean.

I think you're right. I've misunderstood the problem. Now that I think
I do, I probably would have gone with <ac:if> <then> NFS... </then>
<else> SSH </else> </ac:if> wrapped in a <macrodef>. Something like:

macro deploy
  attr server
  attr deploy-type defaults to ${@{server}.deploy-type}
  sequential
    ac:if ... then NFS else SSH

In your properties file, you can have:

server1.ip = ...
server1.deploy-type = ssh

server2.ip = ...
server2.deploy-type = nfs

See, no <antcall> ;-)

I think the ${@{server}.deploy-type} default atrtibute value trick
works, but my Ant is getting rusty since I don't use it, so I may be
wrong...

>    <property file="$environment}.properties" />

Watch out, missing { above.

>    <taskdef name="svn" classname="org.tigris.subversion.svnant.SvnTask" />
>    <taskdef resource="net/sf/antcontrib/antcontrib.properties" />

I'd advise you to use xmlns:ac="antlib:net.sf.antcontrib", which
disambiguate where tasks are coming from (<ac:for> instead of <for>,
etc...)

I hope this helps. --DD

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


Mime
View raw message