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.
Summary: | Add extensions target (like "-post-jar") to Module and Module Suite projects | ||
---|---|---|---|
Product: | apisupport | Reporter: | remonet <remonet> |
Component: | Project | Assignee: | Jesse Glick <jglick> |
Status: | RESOLVED WONTFIX | ||
Severity: | blocker | ||
Priority: | P2 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | ENHANCEMENT | Exception Reporter: |
Description
remonet
2008-03-13 13:35:24 UTC
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> |