ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dominique Devienne" <DDevie...@lgc.com>
Subject RE: building custom task
Date Mon, 01 Nov 2004 17:10:41 GMT
> From: Carter, Scott [mailto:Scott.Carter@GTECH.COM]

> I have a really easy question about building a custom task.  Within my
> custom task I am getting and setting ant properties.  I.E.  I have
code
> like
> the following :
> 
> 	String test = getProject().getProperty("ant.home");
> 
> My simple question is, what do I need in my classpath to compile this
> code.
> The getProject() method does not seem to be defined in any of the
classes
> in
> ant.jar  file :
> 
> $ javac -classpath ant.jar buildLabel.java
> buildLabel.java:36: cannot resolve symbol
> symbol  : method getProject  ()
> location: class buildLabel
>                 String test = getProject().getProperty("ant.home");

Your custom task needs to derive from ProjectComponent,
usually thru Task. --DD

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


Mime
View raw message