You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Bob Bronson <rb...@yahoo.com> on 2005/05/05 02:43:43 UTC
My Classpath Should be Separate From Ant's
Hi All,
I tracked down a problem I'm having to the fact that when Ant compiles
my code (using the <javac> task), it uses the "Ant execution
classpath". What I'm saying is that the same classpath Ant sets up for
itself in order to run is also used as the classpath when compiling
*my* code.
In the <javac> task, set the "verbose" attribute to "yes" and you will
see tons of Ant-supplied JARs. I don't want to go into too many details
except to say that it causes versioning problems when my code is
compiled against those JARs and then run against different JARs.
I was hoping to tell the <javac> task something like, "compile my code
against these JARs AND THESE JARS ONLY. Do not consider the JARs needed
by Ant as part of my classpath".
I hope this is making sense. Is there a way to specify this?
Thanks very much.
Bob
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: My Classpath Should be Separate From Ant's
Posted by Bob Bronson <rb...@yahoo.com>.
Thanks, Jeff, This is *exactly* what I was missing. I haven't worked
with Ant in a while and I guess I was a little careless in reading the
docs.
Thanks again.
Bob
----- Original Message -----
From: "Jeffrey E Care" <ca...@us.ibm.com>
To: "Ant Users List" <us...@ant.apache.org>
Sent: Wednesday, May 04, 2005 9:15 PM
Subject: Re: My Classpath Should be Separate From Ant's
> Try reading the manual page for the javac task
> (http://ant.apache.org/manual/CoreTasks/javac.html), specifically the
> section on the includeAntRuntime attribute.
>
> --
> Jeffrey E. Care (carej@us.ibm.com)
> WebSphere Build SWAT Team Lead
> WebSphere Build Tooling Lead (Project Mantis)
> https://w3.opensource.ibm.com/projects/mantis
>
>
> "Bob Bronson" <rb...@yahoo.com> wrote on 05/04/2005 08:43:43
> PM:
>
>> Hi All,
>>
>> I tracked down a problem I'm having to the fact that when Ant
>> compiles
>> my code (using the <javac> task), it uses the "Ant execution
>> classpath". What I'm saying is that the same classpath Ant sets up
>> for
>> itself in order to run is also used as the classpath when compiling
>> *my* code.
>>
>> In the <javac> task, set the "verbose" attribute to "yes" and you
>> will
>> see tons of Ant-supplied JARs. I don't want to go into too many
>> details
>> except to say that it causes versioning problems when my code is
>> compiled against those JARs and then run against different JARs.
>>
>> I was hoping to tell the <javac> task something like, "compile my
>> code
>> against these JARs AND THESE JARS ONLY. Do not consider the JARs
>> needed
>> by Ant as part of my classpath".
>>
>> I hope this is making sense. Is there a way to specify this?
>>
>> Thanks very much.
>>
>> Bob
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> 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: My Classpath Should be Separate From Ant's
Posted by Jeffrey E Care <ca...@us.ibm.com>.
Try reading the manual page for the javac task
(http://ant.apache.org/manual/CoreTasks/javac.html), specifically the
section on the includeAntRuntime attribute.
--
Jeffrey E. Care (carej@us.ibm.com)
WebSphere Build SWAT Team Lead
WebSphere Build Tooling Lead (Project Mantis)
https://w3.opensource.ibm.com/projects/mantis
"Bob Bronson" <rb...@yahoo.com> wrote on 05/04/2005 08:43:43 PM:
> Hi All,
>
> I tracked down a problem I'm having to the fact that when Ant compiles
> my code (using the <javac> task), it uses the "Ant execution
> classpath". What I'm saying is that the same classpath Ant sets up for
> itself in order to run is also used as the classpath when compiling
> *my* code.
>
> In the <javac> task, set the "verbose" attribute to "yes" and you will
> see tons of Ant-supplied JARs. I don't want to go into too many details
> except to say that it causes versioning problems when my code is
> compiled against those JARs and then run against different JARs.
>
> I was hoping to tell the <javac> task something like, "compile my code
> against these JARs AND THESE JARS ONLY. Do not consider the JARs needed
> by Ant as part of my classpath".
>
> I hope this is making sense. Is there a way to specify this?
>
> Thanks very much.
>
> Bob
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>