我正在使用ANT在eclipse中构建一个名为“HelloWebApp”的简单Web应用程序项目。但是,当使用ANT构建build.xml文件时,我收到以下错误。无法在使用ANT构建eclipse时在eclipse中的WEB_INF文件夹中创建文件夹“类”
Buildfile: C:\Users\bimal\workspace\HelloWebApp\build.xml
clean:
[echo] Cleaning the build
init:
[echo] Creating the build directory
BUILD FAILED
C:\Users\bimal\workspace\HelloWebApp\build.xml:18: Directory C:\Users\bimal\workspace\HelloWebApp\build \WEB-INF\classes creation was not successful for an unknown reason
Total time: 849 milliseconds
下面给出了导致错误的build.xml文件中的部分。
<target name="init" depends="clean">`
<echo>Creating the build directory</echo>
<mkdir dir="${build.dir}/WEB-INF/classes"/>
<mkdir dir="${build.dir}/WEB-INF/lib"/>
<mkdir dir="${dist.dir}"/>
</target>
请为此问题提供解决方案。提前致谢。
build.dir的值是多少?请分享您的ant构建文件的内容。在构建build.dir变量的值后,我看到一个空格。 – RuntimeException 2013-05-02 12:40:46
相关:http://stackoverflow.com/questions/9290591/mkdir-in-ant-fails-how-can-i-handle-this-error – whiskeyspider 2013-05-02 15:25:57