0

我有一个构建文件,其中有如下任务

//tomcat 停止蚂蚁脚本

When I run **tomcat-stop** task, instead of picking up the lib folder from tomcat server, it is trying to take my working directory.

I have set the project basedir as basedir=".". All my other tasks in the build file are working as expected but only in this scenario (tomcat-stop) I am finding an issue.

Error:

**C:\Dev\WebDev\XYZ\build.xml:103: C:\Dev\WebDev\XYZ\${build.tomcat.dir}\lib does not exist.**

I am using property file and everything from the property file is taken as expected. Also in the build.xml when I hover my mouse at the **classpathref="tomcat.class.path"**, it is showing all the files from tomcat lib but when I run the task I am getting the above error.

Entry in property file:
build.tomcat.dir=C:/TomcatServer

Any help is appreciated.

Thanks,
4

1 回答 1

0

看起来您的属性文件已加载到“干净”目标中。如果您只是单独调用“tomcat-stop”目标,则永远不会加载属性文件。您的其他目标正在工作,因为它们依赖于“干净”。

尝试移动加载属性文件的行,使其成为根元素的直接子元素。即没有嵌套在目标内。

于 2011-10-30T00:49:50.060 回答