ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Clements <dcleme...@merc-int.com>
Subject RE: Scope of a patternset
Date Mon, 10 Feb 2003 16:04:51 GMT
I think I know what was happening.  Although, I don't understand the scope issues at all in
ANT.  I took out
some "unless" specifications in the main build file and things started to work.

My, guess is that the first time I was calling these targets was in a different scope.

Is that a good resource/dicussing on "scope" issues in ant?

David

> -----Original Message-----
> From: David Clements [mailto:dclements@merc-int.com] 
> Sent: Monday, February 10, 2003 8:21 AM
> To: 'Ant Users List'
> Subject: RE: Scope of a patternset
> 
> 
> 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>
> 
> <patternset id="copyFiles">
> 	<include name="nofiles">
> </patternset>
> </target>
> 
> Now, I have another build file that gets imported via the 
> <import> task provided in 1.6alpha.
> 
> 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="**/*">
> </patternset>
> </target>
> 
> Now I have a build target in the first project that uses 
> depends to ensure that "depends" on initializeComponent.  
> 
> 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,
> 
> Thanks,
> 
> David Clements
> 
> > -----Original Message-----
> > From: Martin [mailto:mgainty@hotmail.com]
> > 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" <dclements@merc-int.com>
> > To: <ant-user@jakarta.apache.org>
> > 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: ant-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: ant-user-help@jakarta.apache.org
> > >
> > 
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: ant-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: ant-user-help@jakarta.apache.org
> > 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 

Mime
View raw message