----- Original Message -----
From: "Martin Monsorno" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, February 14, 2002 05:23
Subject: How to warn when jar-file in classpath does not exist?


> Hi *,
>
> I have the following problem: I add a jar-file to the classpath I use
> for compiling like this:
>
>   <path id="project.compile.path">
>     <pathelement location="${global.module.dir}/bla.jar" />
>   </path>
>
> If the jar-file does not exist in this place, ant removes it quietly
> from the classpath it handles over to the java compiler. Even with -v
> there is no error message printed.
>
> Is this the desired behaviour? Can I make ant print a warning message
> to the screen in case the file does not exist? Or must I check the
> file myself?

standard practise is to use <available> to probe for a class you need; that
decouples you from knowing where the class is implemented, then conditional
<fail> if you really need that class to be there


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

Reply via email to