ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Weintraub" <qazw...@gmail.com>
Subject Re: ant default classpath
Date Sun, 26 Oct 2008 05:12:06 GMT
Well, Ant is a Java project and does set a classpath for itself to
launch. Try this:

<project name="ant-test" default="test" basedir=".">
    <target name="default">
        <property environment="ENV"/>
        <echo> Classpath = "${ENV.CLASSPATH}"</echo>
    </target>
</project>

If it prints out "Classpath = "${ENV.CLASSPATH}"", then no classpath
is set when ant is running. Also see if there is anything in the
$ANT_HOME/lib directory that might be used when you do your <javac>
tasks. Sometimes I find that jarfiles in this directory can be used by
the <javac> task.


--
David Weintraub
qazwart@gmail.com



On Sat, Oct 25, 2008 at 9:28 PM, Brendan Miller <catphive@catphive.net> wrote:
> I'm on Linux. I don't have CLASSPATH set in my shell. It sure doesn't
> look like it's getting set in elsewhere, but the build environment I'm
> working in is complicated, so maybe I'm missing something.
>
> Are you *sure* that Ant doesn't try to construct a default classpath
> from sources other than the CLASSPATH env var? That really looks like
> what is going on.
>
> On Sat, Oct 25, 2008 at 12:40 AM, Mark Salter <marksalter@talktalk.net> wrote:
>> Brendan Miller wrote:
>>> In a build.xml I have, I have a javac task that I perfrom where I
>>> don't explicitly pass it any classpath. Yet, when I run ant -v, I get
>>> an enourmous classpath. What gives?
>>>
>>> How does ant construct it's default classpath? Is this documented
>>> anywhere? I didn't see anything in the javac task documentation.
>>
>> ant is honouring classpath from your environment.  What operating system
>> are you using?
>> Do you have a variable called CLASSPATH defined?
>>
>> --
>> Mark
>>
>> ---------------------------------------------------------------------
>> 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


Mime
View raw message