You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Dave <da...@gmail.com> on 2007/06/08 17:48:12 UTC

Can properties set in a build called from another build be reference by the calling buildfile?

I have two ant scripts. A target in build-1 has dependencies on a target in
build-2. Those dependences are called using the <ant> task. The target in
build-1 will run depending on whether or not a property is set by a
<condition> task in the target in build-2. I wondering can (and if not, how
could it be done) the original build-1 read properties set by build-2?

-- 
There are 10 types of people in the world.
Those who understand binary and those who do not.

Re: Can properties set in a build called from another build be reference by the calling buildfile?

Posted by Peter Reilly <pe...@gmail.com>.
<ant> and <antcall> set up a new proiject with it's own
set of properties, properties set in the new project are
not seen by the calling project.

To do what you want I would advice using <import> and
perhaps <macrodef> to refactor so that only one project
is used.

Alternatively one can use ant-contribs' <antcallback> task:
http://ant-contrib.sourceforge.net/tasks/tasks/antcallback_task.html

Peter

On 6/8/07, Dave <da...@gmail.com> wrote:
> I have two ant scripts. A target in build-1 has dependencies on a target in
> build-2. Those dependences are called using the <ant> task. The target in
> build-1 will run depending on whether or not a property is set by a
> <condition> task in the target in build-2. I wondering can (and if not, how
> could it be done) the original build-1 read properties set by build-2?
>
> --
> There are 10 types of people in the world.
> Those who understand binary and those who do not.
>

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