Java Netbeans、Ant和嵌套构建目录

Java Netbeans、Ant和嵌套构建目录,java,netbeans,ant,build-target,Java,Netbeans,Ant,Build Target,我对Netbeans 7.4中的Ant项目有问题。在构建某个web应用程序时,我必须通过将其从WAR导入到Netbeans中来创建该应用程序,它会不断地将输出目录嵌套在构建目录中越来越深 它发生在Ant目标复制webdir期间。它为build/web目录中的每个文件输出“x.class省略为pathtox/x.class”,并在每个build上创建更深层的嵌套目录集 以下是project.properties文件的一个小摘录: build.classes.dir=${build.web.dir}

我对Netbeans 7.4中的Ant项目有问题。在构建某个web应用程序时,我必须通过将其从WAR导入到Netbeans中来创建该应用程序,它会不断地将输出目录嵌套在构建目录中越来越深

它发生在Ant目标复制webdir期间。它为build/web目录中的每个文件输出“x.class省略为pathtox/x.class”,并在每个build上创建更深层的嵌套目录集

以下是project.properties文件的一个小摘录:

build.classes.dir=${build.web.dir}/WEB-INF/classes
build.classes.excludes=**/*.java,**/*.form
build.dir=build
build.generated.dir=${build.dir}/generated
build.generated.sources.dir=${build.dir}/generated-sources
build.test.classes.dir=${build.dir}/test/classes
build.test.results.dir=${build.dir}/test/results
build.web.dir=${build.dir}/web
build.web.excludes=${build.classes.excludes}
目标-在nbproject/build-impl.xml中复制webdir:

<target name="-copy-webdir">
    <copy todir="${build.web.dir}">
        <fileset dir="${web.docbase.dir}" excludes="${build.web.excludes},${excludes}" includes="${includes}"/>
    </copy>
    <copy todir="${build.web.dir}/WEB-INF">
        <fileset dir="${webinf.dir}" excludes="${build.web.excludes}"/>
    </copy>
</target>


我在这里做错了什么?

因为我没有声誉来回答我的问题,也没有时间等待8个小时,我将把它作为一条评论发布:目标服务器上的设置要求jsp文件夹直接位于根目录而不是WEB-INF。我将Project Properties->Sources中的WEB Pages文件夹设置为“”这被复制到Ant和其他构建文件中,导致Ant递归地将文件复制到build.web.dir中。我在build.xml的项目标记中为basedir属性设置了一个绝对路径,而不是“.”。我还为project.properties中的build.dir、conf.dir和dist.dir设置了绝对路径,尽管我不确定这是否必要。希望这能帮助其他具有相同策略要求的新手。我错了,问题还没有解决。