ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Clements <>
Subject RE: Scope of a patternset
Date Mon, 10 Feb 2003 15:20:33 GMT
This is what I am trying to do and seem to be getting strange results:

I have a main build file with a target called initializeDefaults.  This target will set up
some properties and
patternsets with default parameters. For example:

<target name="initializeDefaults">
<patternset id="compileFiles">
	<include name="nofiles">

<patternset id="copyFiles">
	<include name="nofiles">

Now, I have another build file that gets imported via the <import> task provided in

This project has a target called initializeComponent.  The point of this target is to set
component specific
overrides to the defaults. For example:

<target name="initializeComponent" depends="initializeDefaults">
<patternset id="compileFiles">
	<include name="**/*">

Now I have a build target in the first project that uses depends to ensure that "depends"

Then I run this target I get an error: "Reference copyFiles not found."  

This was working for me when I had everything declared at the top level, however I wanted
some more
flexibility so I refactored it.

Any Ideas,


David Clements

> -----Original Message-----
> From: Martin [] 
> Sent: Wednesday, August 14, 2002 5:13 PM
> To: Ant Users List
> Subject: Re: Scope of a patternset
> David-
> Global to the scope in which it is declared Yes
> Global to any objects declared outside of that scope No
> Could you give us an example of what you are trying to 
> accomplish ? In that case we could be more helpful if we knew 
> what you were trying to do.. -Martin
> ----- Original Message -----
> From: "David Clements" <>
> To: <>
> Sent: Friday, February 07, 2003 8:43 PM
> Subject: Scope of a patternset
> > Is the scope of a patternset global?
> >
> > David
> >
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > For additional commands, e-mail:
> >
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

View raw message