我有一个构建文件,其中我有以下任务
//tomcat停止ant脚本
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:DevWebDevXYZbuild.xml:103: C:DevWebDevXYZ${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,
看起来您的属性文件被加载到'clean'目标中。如果只是单独调用"tomcat-stop"目标,则不会加载属性文件。你的其他目标正在工作,因为他们依赖于"干净"。
尝试移动加载属性文件的行,使其成为根元素的直接子元素。