2

I am having a problem with an Ant project in Netbeans 7.4 . When building a certain web app that i had to create via importing it from a WAR into Netbeans it keeps nesting the output directories in the build directory deeper and deeper.

It happens during the Ant target -copy-webdir . It outputs "x.class omitted as pathtox/x.class" for every file in the build/web directory and creates an even deeper nested set of directories on each build.

Here is a small extract from the project.properties file:

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}

target -copy-webdir in the nbproject/build-impl.xml:

<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>

What am i doing wrong here?

  • Since i dont have the reputation to answer my question and no time to wait 8 hours i will post it as a comment: – user3118785 Dec 19 '13 at 12:55
  • The setting on the target server requires that the jsp folder is directly in root instead of WEB-INF. I set the Web Pages Folder in Project Properties -> Sources to "." and that got copied to Ant and other build files causing Ant to recursivly copy files into the build.web.dir. Instead of "." i set an absolute path for the basedir attribute in the project tag of the build.xml . I also set absolute paths for build.dir, conf.dir and dist.dir in project.properties although I am not sure if that was necessary. – user3118785 Dec 19 '13 at 12:58
  • Hope that helps some other newbie with the same strage requirements – user3118785 Dec 19 '13 at 12:59
  • I was wrong, the problem is still not solved yet. – user3118785 Dec 19 '13 at 16:23

0 Answers0