You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Kenneth Ryan <ad...@softwurks.com> on 2000/09/27 00:15:42 UTC

ant doesn't compile classes in sample application

Hello,

ant reports that it is compiling X of N classes to
$TOMCAT_HOME/webapps/myapp/WEB-INF/classes

however, doing an ls shows no classes created, and a 404 error is
returned (as expected)
for the servlet at http://localhost:8080/myapp/hello. <servlet> and
<servlet-mapping> appear OK
in etc/web.xml

Everything appears to have worked, except the servlet class is not
compiled.
Attached is ./build all > out.txt

Any ideas?

Regards,

Ken






Re: ant doesn't compile classes in sample application

Posted by Kenneth Ryan <ad...@softwurks.com>.
Peter,

Thanks for the reply. There were some dependency problems.

I tried running the stock build script in the sample directory -- ant seemed
to be failing silently by not reporting trouble compiling the servlets.

I fixed the problem by building ant to /opt/ant, and changing the $CP variable
in the build script to point to $ANT_HOME/lib/ant.jar instead of the ant.jar
that ships with tomcat. For some reason I also had the specify an XML Parser
(xerces) after making this change to $CP.

Regards,

Ken



Peter Donald wrote:

> At 03:15  26/9/00 -0700, you wrote:
> >Hello,
> >
> >ant reports that it is compiling X of N classes to
> >$TOMCAT_HOME/webapps/myapp/WEB-INF/classes
> >
> >however, doing an ls shows no classes created, and a 404 error is
> >returned (as expected)
>
> Well first you need to tell us what version you are running on. A really
> old version used to have this problem with modern compiler but current Ant
> shouldn't (run ant -version to check version). Then try running ant
> -verbose and see if the output makes any sense. If not get back to us with
> a snippet from verbose output.
>
> Cheers,
>
> Pete
>
> *------------------------------------------------------*
> | "Nearly all men can stand adversity, but if you want |
> | to test a man's character, give him power."          |
> |       -Abraham Lincoln                               |
> *------------------------------------------------------*


Re: ant doesn't compile classes in sample application

Posted by Peter Donald <do...@mad.scientist.com>.
At 03:15  26/9/00 -0700, you wrote:
>Hello,
>
>ant reports that it is compiling X of N classes to
>$TOMCAT_HOME/webapps/myapp/WEB-INF/classes
>
>however, doing an ls shows no classes created, and a 404 error is
>returned (as expected)

Well first you need to tell us what version you are running on. A really
old version used to have this problem with modern compiler but current Ant
shouldn't (run ant -version to check version). Then try running ant
-verbose and see if the output makes any sense. If not get back to us with
a snippet from verbose output.

Cheers,

Pete

*------------------------------------------------------*
| "Nearly all men can stand adversity, but if you want |
| to test a man's character, give him power."          |
|       -Abraham Lincoln                               |
*------------------------------------------------------*