Good Afternoon Martin, I'm not sure what version of Ant you are referring to because the newer versions (1.6+) have the -lib command line option to add to the classpath (See http://ant.apache.org/manual/running.html)
As I said below my build script works fine when any of the output options (-debug, -verbose, -quiert etc.) are turned on -- the taskdef classes are all found and execute correctly and the build works. It's when I turn these options off for "normal" operation that I get the class not found errors. I don't understand the why output options should affect taskdef behaviour in this way. I'm trying to avoid explicitly specifying classpaths for taskdefs for "out of the box" tools like hibernate and xdoclet. I want to control the verion used from the ant command line by means of the -lib directive. Regards Gary Howard Senior Software Engineer Celona Technologies Ltd. Celona: Accelerated Transformation -----Original Message----- From: Martin Gainty [mailto:[EMAIL PROTECTED] Sent: 14 June 2006 12:54 To: Ant Users List Subject: Re: Strange behaviour Good Morning Gary- This is my understanding for ensuring classpath is updated for taskdef Taskdef CLASSPATH if no CLASSPATH available acquire from Target classpath if no CLASSPATH available acquire from Project classpath (build.xml) CLASSPATH variable if no CLASSPATH available acquire from System level CLASSPATH (usually environment variable) if you are able to locate the jars that contain the hibernate classes if you want my 2 cents I would make sure the CLASSPATH on taskdef is known- http://ant-contrib.sourceforge.net/ Let me know if you have any questions Thanks, Martin -- ********************************************************************* This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. ----- Original Message ----- From: "Gary Howard" <[EMAIL PROTECTED]> To: <user@ant.apache.org> Sent: Wednesday, June 14, 2006 5:22 AM Subject: Strange behaviour All, I am using ant 1.6.5 with the following command line on Windows XP Pro: call %ANT_HOME%\bin\ant -quiet -noclasspath -nouserlib ^ -lib tools\xdoclet-1.2.3\lib ^ -lib tools\hibernate-3.1 -lib tools\hibernate-3.1\lib ^ -lib lib\ext\j2ee-1.3 -lib libtest\junit3.8.2 -lib tools\bcel-5.2 and my build works fine. I can substitute "-debug" "-verbose" or "-logfile" for "-quiet" and it still works. However if I leave "-quiet" out altogether the taskdefs such as these: <taskdef name="hibernatedoclet" classname="xdoclet.modules.hibernate.HibernateDocletTask"/> <taskdef name="ejbdoclet" classname="xdoclet.modules.ejb.EjbDocletTask"/> all fail with the message: C:\clearcase_snapshots\ghoward_view\celona_software_dev\build.xml:402: The following error occurred while executing this line: C:\clearcase_snapshots\ghoward_view\celona_software_dev\build.xml:525: taskdef class xdoclet.modules.hibernate.HibernateDocletTask cannot be found Can someone explain how (and why) the output options are apparently affecting the taskdef classpath? Regards Gary Howard Senior Software Engineer Celona Technologies Ltd. Celona: Accelerated Transformation This communication contains information which is confidential and is for the exclusive use of the addressee. Any unauthorised use, distribution or copying of the information is prohibited. If you have received this transmission in error please contact the sender immediately. ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________ ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________ This communication contains information which is confidential and is for the exclusive use of the addressee. Any unauthorised use, distribution or copying of the information is prohibited. If you have received this transmission in error please contact the sender immediately. ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]