You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Grant Lewis <uk...@yahoo.com> on 2006/05/09 02:23:49 UTC

trouble with inheritrefs in version 1.5.4

I'm not having much luck with <ant inheritrefs="true" ...> in version
1.5.4. I'm stuck using 1.5.4 because a weblogic ant task used in my
build process requires 1.5.4 so I can't upgrade to the latest release.

In my parent script I define a path element like the following:

<path id="global.classpath">
  <fileset dir="...">
    <include name="**/*.jar"/>
  </fileset>
</path>

I then have a target definition that invokes a child build process:

<target name="build-module">
  <ant dir="${basedir}/module" inheritrefs="true"/>
</target>

In my child project I have the following path definition:

<path id="module.classpath">
  <path refid="global.classpath/>
</path>

Ant has not successfully passed the references so far. I've also tried
using nested reference elements without success. When I copy the path
references from the parent project to the child project, the build is
successful, so I know my reference names are right. Any ideas because
this apparently works in the 1.5 branch?

The only oddity may be that I don't set the basedir attribute in the
project tag of my child build file. Could that cause any strange
behavior or am I missing something?

Grant

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


Re: trouble with inheritrefs in version 1.5.4

Posted by Grant Lewis <uk...@yahoo.com>.
Stefan Bodewig wrote:
> On Mon, 08 May 2006, Grant Lewis <uk...@yahoo.com> wrote:
> 
>> In my child project I have the following path definition:
>>
>> <path id="module.classpath">
>>   <path refid="global.classpath/>
>> </path>
> 
> Is that inside or outside of a target?  I vaguely recall that only one
> of the alternatives worked, so if it is outside of a target move it
> inside of one and try again.
> 
> Stefan
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 

My path definitions are outside targets in both parent and child. I'll
try moving the path definitions in my child project into a target when I
get to the office. Thanks.

Grant

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


Re: trouble with inheritrefs in version 1.5.4

Posted by Stefan Bodewig <bo...@apache.org>.
On Mon, 08 May 2006, Grant Lewis <uk...@yahoo.com> wrote:

> In my child project I have the following path definition:
> 
> <path id="module.classpath">
>   <path refid="global.classpath/>
> </path>

Is that inside or outside of a target?  I vaguely recall that only one
of the alternatives worked, so if it is outside of a target move it
inside of one and try again.

Stefan

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