Project + for nbactions.xml developers?

I am trying to simplify the development process for a team of eight or nine developers. As part of this, I move on to the git and Maven project.

Our project uses some custom Maven goals to support our git workflow. In NetBeans, which is our main development platform, I can configure these custom goals to run through the “Custom” submenu in the project’s context menu, which is very convenient and ideal for students who come and continue the project.

I skipped nbactions.xml from .gitignore and, fortunately, that meant whenever a new developer dumped code and opened a Maven project using NetBeans, they got free user actions (which require some scary configuration).

Unfortunately, when developers tweak their startup / debugging options and launch our project, their run / debug / profile actions are also added to the nbactions.xml file, which is then fixed, and all other private workflows hoses the next time they reset the code .

Is there a way to separate the actions available in the Custom submenu (or some equivalent simple mechanism for launching certain Maven targets) from start / debug configurations so that you can control versions while others are ignored?

“Insisting on using relative paths” is not a great answer to start with, but it is especially bad for our purposes, when people often have to specify their working directory for the virtual machine in different arbitrary directories that they store in accordance with their own scheme.

+4
source share
2 answers

After quite a lot of research, it seems that it is simply impossible to do exactly what I want. See here:

http://netbeans.org/bugzilla/show_bug.cgi?id=162764

It would be useful if nbactions.xml and nb-configuration.xml acted in the same way as the parent POM: if I have nbaction.xml in the parent project, then all actions are inherited.

Basically this is what I want, and user actions for each developer that "inherit" the user actions of the project. Answer:

Probably impractical ...

And the ticket is set by Resolved / WontFix.


So, for now, here is my next thing:

NetBeans permits different executions. Profiles for which Run / Debug / Profile, as well as all user actions can be independently defined. Each profile is stored in a separate nbactions-XXX.xml , where XXX is the profile name. So, I can place nbactions-*.xml in .gitignore , but make an exception for nbactions-GroupGlobals.xml .

This is less than ideal - using one of my custom goals means right-clicking on a project, going to the Profiles menu, choosing GroupGlobals profile, right-clicking on a project, switching to custom goals, launching my goal, right-clicking again Click the project by going to the Profiles section and selecting the default process.

However, I suspect it will be less scary than the command line for some of my developers.

I remain in search of a better solution.

+3
source

In IntelliJ IDEA, you can run any ant target or maven from the list (and even assign a key to it). I am sure there is something similar in Netbeans. So instead of using netbeans-specific things, you can do this as ant / maven configs. Of course, for these purposes no parameters / settings / etc are required. You can split the local settings into a separate file (included by the main ant script or in settings.xml or OS env or something else).

0
source

Source: https://habr.com/ru/post/1434941/


All Articles