I’m trying to simplify the development process for a team of eight or nine developers. As part of this, I’m moving our project over to git and Maven.
Our project uses some custom Maven goals in order to support our git workflow. In NetBeans, which is our primary development platform, I’m able to configure these custom goals to be triggered via the “Custom” submenu under the project context menu, which is very friendly and ideal for the undergraduate researchers who come and go on our project.
I had omitted nbactions.xml from .gitignore and, happily, this meant whenever a new developer pulled down the code and opened the Maven project with NetBeans, they got the custom actions (which require some scary configuration) for free.
Unfortunately, when developers configure their run/debug settings and run our project, their run/debug/profile actions also get added to nbactions.xml, which then gets committed, and hoses everyone else’s private workflow when they next pull down the code.
Is there a way to separate the actions available in the “Custom” submenu (or some equivalently easy mechanism for triggering specific Maven goals) from run/debug configurations such that one can be version controlled while the other is ignored?
“Insist everyone use relative paths” isn’t a great answer to start with, but it’s particularly ill-suited for our purposes where folks often have to point their working directory for the VM at different arbitrary directories that they keep according to their own scheme.
After a fair amount more research, it looks like there’s just no way to do exactly what I want. See here:
http://netbeans.org/bugzilla/show_bug.cgi?id=162764
Which is basically what I want—per-developer custom actions that “inherit” project custom actions. The response:
And the ticket is set Resolved/WontFix.
So, for the moment, here’s my next-best-thing:
NetBeans permits different execution Profiles for which Run/Debug/Profile, as well as all the custom actions, can be independently defined. Each Profile is stored in a separate
nbactions-XXX.xml, whereXXXis the name of the profile. So, I’m able to putnbactions-*.xmlin.gitignore, but make an exception fornbactions-GroupGlobals.xml.This is less than ideal–using one of my custom goals means right-clicking the project, going to the Profiles menu, selecting the GroupGlobals Profile, right-clicking the project again, going to the custom goals, running my goal, right-clicking the project again, going to Profiles, and selecting the default process.
Still, I suspect it will be less scary than the command line for some of my developers.
I remain on the lookout for a better solution, though.