You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by supareno <re...@free.fr> on 2008/03/02 15:00:09 UTC

exclude a loaded class from the classpath

hello everyone,

i'm facing to a BIG problem at my office...
i work for a company with strange practices. i have to make a build file 
for an old project...
the problem is:
(jar names are not the real one)


1- somebody redefines classes from A.jar in the project.
2- Foo.java extends a class redefined from A.jar: the class redefines is 
in the project
3- so i didn't use A.jar in my classpath to avoid conflicts
4- But B.jar (that i need absolutely) is compiled with A.jar inside so 
when i lauch the build file, i've got a problem because it loads the 
class from A.jar to compile Foo.java and not the class defined in the 
project :-(

when we build it with JBuilder2006 (yes, some entreprises olds 
JBuilder!) it works.

So my question is:

is it possible to use preferred class loaded in the javac task?? i would 
like to exclude from the classpath a class loaded from A.jar via B.jar : 
possible ???

regards
supareno

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


Re: exclude a loaded class from the classpath

Posted by supareno <re...@free.fr>.
Garrett Smith a écrit :
> On Sun, Mar 2, 2008 at 6:00 AM, supareno <re...@free.fr> wrote:
>   
>> hello everyone,
>>
>>  i'm facing to a BIG problem at my office...
>>  i work for a company with strange practices. i have to make a build file
>>  for an old project...
>>  the problem is:
>>  (jar names are not the real one)
>>
>>
>>  1- somebody redefines classes from A.jar in the project.
>>  2- Foo.java extends a class redefined from A.jar: the class redefines is
>>  in the project
>>  3- so i didn't use A.jar in my classpath to avoid conflicts
>>  4- But B.jar (that i need absolutely) is compiled with A.jar inside so
>>  when i lauch the build file, i've got a problem because it loads the
>>  class from A.jar to compile Foo.java and not the class defined in the
>>  project :-(
>>
>>     
> It sounds like they have a need for a branch from a certain release.
> Find out when that is.
>
> If they don't have already have a branch, they seem to need one.
>
> Get the old version of all the jars from the repository, with that
> release date, put it in the new branch.
>
> Add in changes to that branch.
>   
i could not !! i don't have the choice: i should use the B.jar (that 
contains the A.jar)
and i could not redesign the old project...

i think that i will add the missing method (because the difference 
between redesigned class in the project
and the class in A.jar is a method commented in the redesigned class!) 
because i can't influence on the javac
task !
>
>   
>>  when we build it with JBuilder2006 (yes, some entreprises olds
>>  JBuilder!) it works.
>>
>>  So my question is:
>>
>>  is it possible to use preferred class loaded in the javac task?? i would
>>  like to exclude from the classpath a class loaded from A.jar via B.jar :
>>  possible ???
>>
>>  regards
>>  supareno
>>
>>  ---------------------------------------------------------------------
>>  To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>>  For additional commands, e-mail: user-help@ant.apache.org
>>
>>
>>     
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>
>
>   


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


Re: exclude a loaded class from the classpath

Posted by Garrett Smith <dh...@gmail.com>.
On Sun, Mar 2, 2008 at 6:00 AM, supareno <re...@free.fr> wrote:
> hello everyone,
>
>  i'm facing to a BIG problem at my office...
>  i work for a company with strange practices. i have to make a build file
>  for an old project...
>  the problem is:
>  (jar names are not the real one)
>
>
>  1- somebody redefines classes from A.jar in the project.
>  2- Foo.java extends a class redefined from A.jar: the class redefines is
>  in the project
>  3- so i didn't use A.jar in my classpath to avoid conflicts
>  4- But B.jar (that i need absolutely) is compiled with A.jar inside so
>  when i lauch the build file, i've got a problem because it loads the
>  class from A.jar to compile Foo.java and not the class defined in the
>  project :-(
>
It sounds like they have a need for a branch from a certain release.
Find out when that is.

If they don't have already have a branch, they seem to need one.

Get the old version of all the jars from the repository, with that
release date, put it in the new branch.

Add in changes to that branch.


>  when we build it with JBuilder2006 (yes, some entreprises olds
>  JBuilder!) it works.
>
>  So my question is:
>
>  is it possible to use preferred class loaded in the javac task?? i would
>  like to exclude from the classpath a class loaded from A.jar via B.jar :
>  possible ???
>
>  regards
>  supareno
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>  For additional commands, e-mail: user-help@ant.apache.org
>
>

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