ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Rice <rob...@windermere.com>
Subject RE: Custom Selectors missing Project and logging?
Date Tue, 12 Aug 2003 21:28:42 GMT
Any chance this also goes for the list of parameters?  getParameters( ) 
seems to return null, though I am setting two parameters on the custom 
selector using the <param> nested element.

Robert Rice

On Tue, 12 Aug 2003, Dominique Devienne wrote:

> I think I spoke too soon...
> 
> You can get back the current Task, thru Project#getThreadTask, but you need
> a Project instance to do that. I'm not sure the current project is ever
> registered... Sorry, --DD
> 
> > -----Original Message-----
> > From: Robert Rice [mailto:robert@windermere.com]
> > Sent: Tuesday, August 12, 2003 2:54 PM
> > To: Dominique Devienne
> > Subject: RE: Custom Selectors missing Project and logging?
> > 
> > Thanks for the help.  I was guessing that it might be a bug.  Just seemed
> > too strange since Project is usually readily available.
> > 
> > If you find the reference to getting the current project, I would sure be
> > interested.  I had previously poked around thinking I might be able to
> > find it but no luck.  I will follow your suggestions and see what I can
> > find.
> > 
> > Thanks again,
> > Robert Rice
> 
> > -----Original Message-----
> > From: Dominique Devienne [mailto:DDevienne@lgc.com]
> > Sent: Tuesday, August 12, 2003 2:19 PM
> > To: 'Ant Users List'
> > Subject: RE: Custom Selectors missing Project and logging?
> > 
> > I think there was a bug (now fixed in CVS) where setProject() was not
> > called for custom selectors in 1.5.x.
> > 
> > As a turn around, somebody posted a few months back a trick getting back
> > the
> > current project for the current thread either thru the context loaded, or
> > a
> > thread local (I think it was the former). I cannot find the reference
> > though... --DD
> > 
> > > -----Original Message-----
> > > From: Robert Rice [mailto:robert@windermere.com]
> > > Sent: Tuesday, August 12, 2003 2:32 PM
> > > To: user@ant.apache.org
> > > Subject: Custom Selectors missing Project and logging?
> > >
> > > I'm writing a simple custom selector that extends
> > > BaseExtendSelector.  Thus far, I have only implemented the one required
> > > method: public boolean isSelected( File basedir, String filename, File
> > > file );
> > > My custom selector is declared using the <custom ...> tag nested within
> > a
> > > <fileset>.
> > >
> > > I am trying to log messages from this custom selector.  It does not log.
> > > As I look closer, I find that the project reference ( getProject( ) ) is
> > > null, which may explain why no logging takes place.
> > >
> > > Is there something I need to do within my selector implementation, or in
> > > the way that I reference it in my build file, to cause the project to
> > get
> > > set on the selector?
> > >
> > > Robert Rice
> > 
> > ---------------------------------------------------------------------
> > 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
> 


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


Mime
View raw message