views:

24

answers:

1

The NetBeans command to run an Ant build for a project is F11. I always believed that the target that it executes is named "default". I overrode the default target to do nothing other than simply flag that it ran. When I manually run the target from Ant, or by selecting the particular default target in Netbeans, I get the expected "flagging" behavior.

However, when I press F11, Netbeans runs the init, deps-jar, compile, and jar targets. It seems that I actually did not override the default target, as far as NetBeans is concerned.

I'm doing this so I can effectively decouple my build script from my IDE, but I get the impression that NetBeans isn't helping with this.

Essentially, what I want is to override the default target so that when I press F11, targets that I specifically add are run. Is this achieved by eliminating the build-impl.xml file?

A: 

After a little luck, I figured out how to define a keyboard short-cut for custom defined targets. Create Shortcut -> Create Keyboard Shortcut does the trick. It seems to me that NetBeans has a predefined F11 target that won't change. It's as close as I'll get, but at least I have an F12 and an Ant target now.

Mike