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.
I have project A which is a Web project generated with existing sources and it contains a custom build.xml file. On creation time, a second xml file is generated (by default nbbuild.xml) which is used to build the project. I've added that project A to an Enterprise Application project (ear) but it adds the dependencies in the form: <ant antfile="${project.A}/build.xml" inheritall="false" target="clean-ear"> <property location="${build.dir}" name="dist.ear.dir"/> <property name="disable.deploy.on.save" value="${build.disable.deploy.on.save}"/> </ant> So building the ear fails because it should use nbbuild.xml instead of build.xml. The correct one would be: <ant antfile="${project.A}/nbbuild.xml" inheritall="false" target="clean-ear"> <property location="${build.dir}" name="dist.ear.dir"/> <property name="disable.deploy.on.save" value="${build.disable.deploy.on.save}"/> </ant> I think it should detect which file is used to build a web application when that application is added to an ear instead of assuming that it will be build.xml.
I would like to enhance AntProjectHelper.createSimpleAntArtifact() with new parameter: property name holding project relative location and name of Ant build script to use. See attached patch. What's not included in the patch but would be done before commit: * increase spec version and add @since * remove java.j2seproject.J2SEProjectAntArtifact and replace it with call to this method * use the new method in web/j2ee projects
Created attachment 68294 [details] implementation
The patch looks fine, feel free to integrate.
Thanks for review Tomas.
Locally fixed as #1949eb983737.
Integrated into 'main-golden', available in build *200808280201* on http://bits.netbeans.org/dev/nightly/ Changeset: http://hg.netbeans.org/main/rev/1949eb983737 User: David Konecny <dkonecny@netbeans.org> Log: #144273 - Interproject dependency is broken when Ant script has different name than "build.xml"
*** Bug 160104 has been marked as a duplicate of this bug. ***