You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Klas Eriksson <kl...@micronic.se> on 2004/07/29 08:25:52 UTC

ant/javac prepends destdir to classpath

Hi
 
I have illegal code, A.java, that doesn't compile using 'javac' manually at
cmd-line.
Fine.
 
But when I use ant/javac A.java compiles, and that's wrong since it refers
to a package it shouldn't be able to access. (This package is available for
other code in directory X.)
The problem is that ant/javac seems to automatically prepend the 
destdir="X" to the classpath when compiling.
Is this a bug or how to I prevent ant/javac to improvise its own classpath?
 
When i run "ant -verbose" I clearly see that the directory "X" is prepended 
to the classpath by ant.
The problem is both in ant v1.5 and v1.6.
 
/klas

Re: ant/javac prepends destdir to classpath

Posted by "mail.laconiadatasystems.com" <we...@laconiadatasystems.com>.
Klas-
Does the same hold true if you use package exclude and package include ?
 <javac srcdir="${src}"
         destdir="${build}"
         includes="A/**"
         excludes="X/**"
         classpath="xyz.jar"
         debug="on"
  />
replik varsågod,
-martin
----- Original Message -----
From: "Klas Eriksson" <kl...@micronic.se>
To: <us...@ant.apache.org>
Sent: Thursday, July 29, 2004 2:25 AM
Subject: ant/javac prepends destdir to classpath


> Hi
>
> I have illegal code, A.java, that doesn't compile using 'javac' manually
at
> cmd-line.
> Fine.
>
> But when I use ant/javac A.java compiles, and that's wrong since it refers
> to a package it shouldn't be able to access. (This package is available
for
> other code in directory X.)
> The problem is that ant/javac seems to automatically prepend the
> destdir="X" to the classpath when compiling.
> Is this a bug or how to I prevent ant/javac to improvise its own
classpath?
>
> When i run "ant -verbose" I clearly see that the directory "X" is
prepended
> to the classpath by ant.
> The problem is both in ant v1.5 and v1.6.
>
> /klas
>


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