Re: invoking the logger in the constructor

2005-10-17 Thread duvelbier-tsmets
When I define only the following constructor : /** * */ public MyTask() { log("Test"); } The trace I have is the following : BUILD FAILED C:\MyProject\spike\SpecialLibraries\XLtoCSV\SpecialBuild.xml:21: Could not create type XL

AW: invoking the logger in the constructor

2005-10-17 Thread Jan.Materne
>The reason seem to be (but I haven't been able to confirm as I >have been busy in other matters) that the Task has a default >constructor (that I use). To use the 'log()' method, I'd need >to invoke a constructor with the node name I want to use. Task [1] is an abstract class not providing a c

Re: invoking the logger in the constructor

2005-10-16 Thread duvelbier-tsmets
The reason seem to be (but I haven't been able to confirm as I have been busy in other matters) that the Task has a default constructor (that I use). To use the 'log()' method, I'd need to invoke a constructor with the node name I want to use. Smthg like : class MyTask extends Task { public

Re: invoking the logger in the constructor

2005-10-14 Thread Peter Reilly
The two init calls issue has been fixed in the ant-core SVN head. If you want to use log in a constructor, you can use the (Project p) constructor: public MyCustomTask (Project project) { setProject(project); System.out.println("Instanciated"); log("Hello");

AW: invoking the logger in the constructor

2005-10-14 Thread Jan.Materne
>> >> public class MyCustomTask extends Task { >> public MyCustomTask () >> { >> System.out.println("Instanciated"); >> } >> } >> > >regarding the exception in the constructor; send a stack trace. > > >Ant tasks normally use the log() operations, with different >levels of ve

Re: invoking the logger in the constructor

2005-10-14 Thread Steve Loughran
Thomas SMETS wrote: dear, I create a simple task as indicated in the ANT book : "Ant: The Definitive Guide", Second Edition from O'Reilly. Something like import java.io.IOException; import org.apache.tools.ant.Task; import org.apache.tools.ant.taskdefs.Execute; import org.apache.tools.ant.typ

invoking the logger in the constructor

2005-10-13 Thread Thomas SMETS
dear, I create a simple task as indicated in the ANT book : "Ant: The Definitive Guide", Second Edition from O'Reilly. Something like import java.io.IOException; import org.apache.tools.ant.Task; import org.apache.tools.ant.taskdefs.Execute; import org.apache.tools.ant.types.Commandline; public