I'd like to have a button to run (custom) Maven targets in NetBeans 6.9. Hot-keys would also be nice. Is this possible?
If it is not possible: is开发者_如何学运维 there something like a console where I could Maven commands directly?
In NetBeans 6.9: Right-click on the project -> Custom -> Goals. Make sure to check "Remember as: ". You can run this by Right-click on the project -> Custom -> "myRememberAsName"
I don't know if there is an easy way to assign this to a button or a short cut.
Instead of using custom goals you can create a custom profile.
In the project properties, go in pane Configurations, add a new one, select it then click on Activate.
In the pane Run select your custom configuration.
Then in pane Actions select your custom configuration and add/edit the goals you need.
The goals that are already present can't be removed but you can delete the content in "Execute goals" and they will do nothing.
Then when you will click on Run button the goals you have set will be execute.
PS : There is a console in Netbeans (Window->Output->Terminal) but in 6.9 it's still experimental (and pretty inattractive), the one in 7.1.1 works well.
My solution isn't exactly what you are looking for, but it is worth mentioning. First, run your custom target in Netbeans. Once you do that, in the "Run" menu you see the "Repeat xxx" at the bottom. This menu has a keyboard shortcut (Command F11 on Mac, not sure what it is on other operating systems). Thus, using this keyboard shortcut, you can run the same maven goal repeatedly.
精彩评论