Antoine,

Thanks for waking me up!

I don't believe it was a problem with Ant but with the environment
settings.
I am deliberately using my own script to call Ant with correct settings
to avoid such problems. I would normally always run my build script in a
new command window. On this occasion I was re-using the same window
whilst debugging and I believe there must have been some rubbish in the
environment settings. Running in a fresh command window has cured the
problem.

Ant.bat is probably OK because the "shift" command moves the other
paramters into %1 so at first glance it looks as though only %1 is being
considered where in fact they all are.

Now that it works I find this a much cleaner way of controlling
taskdefs: I should be able to upgrade to a different release of tools
like xdoclet and hibernate just by changing the lib directives in the
build script (except if they have major API changes of course!)

Danke, Merci, Thanks

Regards
Gary Howard
Senior Software Engineer 
 
Celona Technologies Ltd.
Celona: Accelerated Transformation
 

-----Original Message-----
From: Antoine Levy-Lambert [mailto:[EMAIL PROTECTED] 
Sent: 14 June 2006 15:42
To: Ant Users List
Subject: Re: Strange behaviour

Hello Gary,

what you are describing sounds like a bug.

the question is where does the bug happen.

A possible candidate would be ant.bat.

I suspect that the -noclasspath option is not executed reliably
depending upon -quiet comes before -noclasspath or not.

-noclasspath is a command line option which is completely processed in
ant.bat, not reached to the java code.

Actually, a look at the code of ant.bat in ant 1.6.5 shows that the
option only works when it is the first argument on the command line. (or
I do not understand the full picture).

So your build *does not* work when you start it with -noclasspath.

Regards,

Antoine

-------- Original-Nachricht --------
Datum: Wed, 14 Jun 2006 10:22:30 +0100
Von: Gary Howard <[EMAIL PROTECTED]>
An: user@ant.apache.org
Betreff: 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 
> ______________________________________________________________________

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED] For additional
commands, e-mail: [EMAIL PROTECTED]


______________________________________________________________________
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]

Reply via email to