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.
Standard J2SE project allows user to extends build process in a non-invasive way by overriding dedicated targets such as "-pre-jar", "-post-jar", "-pre-compile", ... It is impossible to do such customization with Module and Module Suite projects. It would be really useful to extend build with, for example, "-post-branding", "-pre-build-zip", "-post-nbm", ...
Probably will not bother adding such targets for NBM projects. It is indeed possible to do such hooks. For -pre-something, use <target name="something"><!-- according to needs: depends="init" --> <custom/> <antcall target="myprj-impl.something"/> </> For -post-something, use <target name="something" depends="myprj-impl.something"> <custom/> </target> Would be nice if Ant better supported before and after "methods" for targets, and perhaps in 1.8.0 it will, but this works in the meantime.
Thank you for the quick reply. I took a closer look at ant. If anyone needs it, here is a more detailed "workaround" example: In build.xml, first define a new task <target name="-pre-build-zip"> ... </target> and then redefined the one you want to extend <target name="build-zip" depends="-pre-build-zip"> <!-- Could add your -pre- code here instead --> <subant target="build-zip" buildpath="." antfile="nbproject/build-impl.xml"/> <!-- Could add your -post- code here --> </target>