You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by David Bates <da...@triggersoft.com> on 2006/11/06 15:09:02 UTC
Referencing another build file
I'm using Ant within Netbeans. I have two projects: ProjectA and
ProjectB. ProjectA is dependant upon ProjectB. I'm trying to write a
new task which will copy the JAR produced by each project onto my web
server.
The problem I am having is that I can't find a nice way to refer to the
location of the "dist" directory for ProjectB because the variable name
for the location is called ${dist.dir} in both projects, rendering the
"inheritall" Ant task attribute fairly useless.
Any thoughts?
Cheers,
David.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: Referencing another build file
Posted by Daniel Blaukopf <Da...@Sun.COM>.
Use a propertyset with a mapper:
<ant ...>
<propertyset>
<mapper type="glob" from="*" to="parent.*"/>
</propertyset>
</ant>
and then refer to the parent's dist.dir as ${parent.dist.dir}
alternatively, just override the specific property:
<ant ...>
<property name="parent.dist.dir" value="${dist.dir}"/>
</ant>
Daniel
David Bates wrote:
> I'm using Ant within Netbeans. I have two projects: ProjectA and
> ProjectB. ProjectA is dependant upon ProjectB. I'm trying to write a
> new task which will copy the JAR produced by each project onto my web
> server.
>
> The problem I am having is that I can't find a nice way to refer to the
> location of the "dist" directory for ProjectB because the variable name
> for the location is called ${dist.dir} in both projects, rendering the
> "inheritall" Ant task attribute fairly useless.
>
> Any thoughts?
>
> Cheers,
>
> David.
>
>
> ---------------------------------------------------------------------
> 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