You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "Dmitri G. Chtchekine" <dg...@emory.edu> on 2001/12/10 16:19:32 UTC
property immutability -AGAIN!
OK, I don't want to 'beat a dead horse' about
should a property be immutable or not. I just
want to throw a scenario at you and ask to make
comments on how to accomplish this task without changing
property's value.
My build reads several properties from a file,
one of them is deployment.box which is the name of the box where I want
my code to be deployed (via FTP). Here is an example:
<target name="push" depends="init" if="deploy">
<ftp server="${deployment.box}"
userid="${ftp.id}"
password="${ftp.password}"
remotedir="${deploy.dir}">
<fileset dir="${build.dir}">
<include name="${package.root}\**"/>
</fileset>
</ftp>
</target>
Now, as far as there is only one box where I want to push the
code everything is clear. But now I want to push code to several
boxes in one build. This can be easily accomplished by changing
the value of deployment.box property.
How would you suggest I do this without changing property value ?
(Evidently using separate property for each box will result in code
duplication.)
I hope that this problem is general enough and I am looking forward
to your comments.
Dmitri
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: property immutability -AGAIN!
Posted by Stefan Bodewig <bo...@apache.org>.
On Mon, 10 Dec 2001, Dmitri G. Chtchekine <dg...@emory.edu> wrote:
> How would you suggest I do this without changing property value ?
Use <antcall> to invoke that target, use nested <param>s inside the
<antcall>s with different values for the property that needs to be
changed.
Stefan
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>