This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
The project I have to work on has that obscure structure: <project>/batch/build/build.xml <project>src/com/.... Means the location of build.xml is 'somewhere' and it defines basedir=../.. I setup a freeform project that works fine. Thus project.xml correctly contains this line: <property name="ant.script">batch/build/build.xml</property> Now I create a standard NB project and make it depend on the freeform project. Here is the bug now: in the new project build-impl.xml, the following line is inserted: <target name="deps-jar" depends="init" unless="no.deps"> <ant target="build" inheritall="false" dir="${project.HerkulesAnt}/batch" antfile="build/build.xml"/> This sets a wrong basedir. Should be: <target name="deps-jar" depends="init" unless="no.deps"> <ant target="build" inheritall="false" dir="${project.HerkulesAnt}" antfile="batch/build/build.xml"/>
I was about to close as WONTFIX, since the current build-impl.xml for e.g. j2seproject just sets basedir to the dir containing the subproject's build.xml; specifying just <ant antfile="sub/build.xml"/> does not work since then the basedir will be inherited from the superproject, completely ignoring the basedir decl in sub/build.xml, yielding nonsense. (Don't ask me why Ant works this way, but it does.) For that reason we currently do <ant dir="sub"/> [implied antfile="build.xml"] which sets basedir to sub, again ignoring any decl in sub/build.xml, but at least normally correct, since people should avoid basedir tricks and use basedir="." as a rule. However I just realized that if you pass inheritall="false" - which we do anyway - then <ant antfile="sub/build.xml" inheritall="false"/> works as expected, picking up any basedir decl from sub/build.xml and resolving it relative to "sub/". So what we should do is fix build-impl.xsl in java/j2seproject, web/project, etc. to delete all the complicated stuff after <xsl:variable name="script" select="projdeps:script"/> and replace it with simply <ant target="{$subtarget}" inheritall="false"> <xsl:attribute name="antfile">${project.<xsl:value-of select="$subproj"/>}/<xsl:value-of select="$script"/></xsl:attribute> </ant> which should work in all cases. Note that this should also simplify the fix of issue #50092 a bit.
asotona, you might want to do the same in J2ME. Fixed in: java/j2seproject/src/org/netbeans/modules/java/j2seproject/resources/build-impl.xsl; new revision: 1.37; previous revision: 1.36 web/project/src/org/netbeans/modules/web/project/resources/build-impl.xsl; new revision: 1.39; previous revision: 1.38
Also in j2ee, if applicable.
thanks for notification fixed in J2ME
This issue was solved long time ago. Because nobody has reopened it neither added comments, we are verifying/closing it now. If you are still able to reproduce the problem, please reopen. Thanks in advance.