Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

problem with Tomcat and Ant.....any one help

843838Mar 14 2007 — edited Apr 7 2008
I use Spring MVC, and in my project , when I use "ant build" command to compile a java file(of course, the target is write in the build.xml which implement the compile task ), the build faied, The command window shows (PS: springapp is my project folder name under webapps):

Buildfile: build.xml

build:
[javac] Compiling 1 source file to C:\Program Files\Apache Software Fo
on\Tomcat 5.5\webapps\springapp\war\WEB-INF\classes

BUILD FAILED
C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\springapp\b
ml:51: C:\Documents and Settings\Chen Xi\Tomcat 5.5\common\lib not found.


But my tomcat is installed in
C:\Program Files\Apache Software Foundation\Tomcat 5.5

And the content of build.properties file is like follows:

# Ant properties for building the springapp
appserver.home=${user.home}/Tomcat 5.5
deploy.path=${appserver.home}/webapps
tomcat.manager.url=http://localhost:8080/manager
tomcat.manager.username=admin
tomcat.manager.password=tomcat


And I know the problem is in build.properties file and build.xml files, for example, in build.properties file, the appserver.home=${user.home}/tomcat 5.5 is wrong, and I correct the appserver.home= value to be my tomcat home directory which is: C:\Program Files\Apache Software Foundation\Tomcat 5.5 , the ant build command still failed to compile the java file, the command window shows now:

BUILD FAILED
C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\springapp\build.xml:51: C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\springapp\Program FilesApache Software FoundationTomcat 5.5\common\lib not found.


How to solve the problem, it seems that inside build.xml, the comipler task can not point to the write location of java file to compile.

by the way, what does the value contain in ${user.home} in build.properties file?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 5 2008
Added on Mar 14 2007
12 comments
387 views