You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by John Minne <jm...@webtaggers.com> on 2000/11/06 22:34:20 UTC
can't find classpath task
I am getting the error: "Could not create task of type classpath because I
can't find it in the list task class definitions."
I didn't think that classpath is considered a task...
ant -version gives: "Ant version 1.2 compiled on October 26 2000"
my code is:
<target name="compile" depends="prepare">
<javac srcdir="src" destdir="${deploy.home}/WEB-INF/classes" debug="on"
optimize="off" deprecation="off">
<classpath>
<path refid="mb2.class.path"/>
<pathelement location="${deploy.home}/WEB-INF/classes"/>
</classpath>
</javac>
</target>
this seems to be inaccordance with the manual:
<target ... >
<javac ...>
<classpath>
<pathelement location="lib/" />
<pathelement path="${java.class.path}/" />
<pathelement path="${additional.path}" />
</classpath>
</javac>
</target>
any suggestions?
thanks,
-johnboy
-----Original Message-----
From: Diane Holt [mailto:holtdl@yahoo.com]
Sent: Monday, November 06, 2000 12:37 PM
To: ant-user@jakarta.apache.org
Subject: RE: ant breaking w/ lots of files?
Robert,
This might not fix all your problems, but one thing: You have your srcdir
set to ${src}/com/winwin, but you should have it set to just ${src} and
have your includes set to com/winwin/**.
Diane
--- "Armstrong, Robert" <Ro...@Winwin.com> wrote:
> -----Original Message-----
> From: Stefan Bodewig [mailto:bodewig@bost.de]
> Sent: Monday, November 06, 2000 3:26 AM
> To: ant-user@jakarta.apache.org
> Subject: Re: ant breaking w/ lots of files?
>
>
> >>>>> "r" == robert <ro...@elastica.com> writes:
>
> >> Ant/Java somehow fails to load in all of my packages/classes and
> >> even though the package directory structure is correct it fails to
> >> find several packages which causes the whole build to fail.
>
> > Robert (Armstrong in this case) could you send a snippet of your
> > buildfile and the result of ant -debug?
>
> This is the interesting part of my buildfile:
>
> <javac verbose="true" srcdir="${src}/com/winwin" destdir="${dest}"
> includes="**\*.java" classpath=" etc, etc.">
>
> Turning on -debug reveals that javac is in fact parsing all the files
> that I
> have and particularly the ones that later on it says it can't find the
> packages for.
>
> So it says:
>
> [javac] [parsed
> /usr/local/build/src/com/winwin/xmlsystem/XMLGenerator.java in 1 ms]
>
> and then later on I'm told it can't find com.winwin.xmlsystem.
>
> I had been redirecting output to files and hadn't been monitoring stderr
> until now. Now that I am watching stderr I noticed this:
>
> /export/home/rarmstrong/ant/winbuild.xml:62: Error starting classic
> compiler:
> java.lang.reflect.InvocationTargetException: java.lang.OutOfMemoryError
>
> This happens AFTER all the package errors and in fact after the BUILD
> FAILED
> message. Was it buffered? Or is that when it actually happened? I've
> been
> trying to bump up the memory to javac but it doesn't seem like there is
> a
> way to pass along the -J parameters through javac to
> the javac VM. Thanks for the help!
>
> robert
>
=====
(holtdl@yahoo.com)
__________________________________________________
Do You Yahoo!?
Thousands of Stores. Millions of Products. All in one Place.
http://shopping.yahoo.com/
Re: can't find classpath task
Posted by Stefan Bodewig <bo...@bost.de>.
>>>>> "JM" == John Minne <jm...@webtaggers.com> writes:
JM> I am getting the error: "Could not create task of type classpath
JM> because I can't find it in the list task class definitions."
JM> I didn't think that classpath is considered a task...
And it isn't.
Are you sure
JM> <target name="compile" depends="prepare">
JM> <javac srcdir="src" destdir="${deploy.home}/WEB-INF/classes"
JM> debug="on" optimize="off" deprecation="off">
JM> <classpath>
JM> <path refid="mb2.class.path"/>
JM> <pathelement location="${deploy.home}/WEB-INF/classes"/>
JM> </classpath>
JM> </javac>
JM> </target>
is a literal copy of your build file? It works for me.
My wild guess would be that you have accidently terminated the javac
start tag with /> so that <classpath> is at the same level like
<javac> and not a child element of it.
Stefan