Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NetBeans: should nbactions.xml, nb-configuration.xml and catalog.xml go into source control?

This thread is very useful for finding out which files in Netbeans should go into source countrol, but it doesn't cover all files.

In particular I'm wondering whether the following files should go into source control. Here are my assumptions/guesses:

  • nb-configuration.xml - easiest - the file itself in the comment says it should go into source control.

  • nbactions.xml - from what I see this file stores information typical to running the application. I.e. JVM arguments etc. So I suppose it is a question of taste - if you want other developers to have a "suggested" Run configuration - include it. Otherwise - don't. Correct?

  • catalog.xml - not sure what this does (I GUESS it's used by the editor to find out xml schemas and such to enable syntax coloring, but it's just a guess). Anyway - I see that this file has system-specific information (path) - so it shouldn't go into source control.

Can anyone confirm the above? Thanks,

Piotr

like image 804
machinery Avatar asked Apr 04 '12 16:04

machinery


3 Answers

I never put my IDE configuration files in the repository, for several reasons:

  • other colleagues may want to use theirs;
  • other colleagues may want to use other IDEs (such as Eclipse) and seeing those files (or even have to exclude them from the checkout) could be annoying for them;
  • some of these files are generally not related to a single project, others automatically generated, so no need to store them in the source code of every project.

In order to exclude them, our first solution was the .svnignore, but it was still logically wrong to modify some shared content for the specific needs of a single user, so we decided to be more strict:

in my ~/.subversion/config I have:

[miscellany]
global-ignores = nbactions.xml nbproject

Hope this helps,

Marcello

like image 108
marcello Avatar answered Nov 15 '22 21:11

marcello


In my Maven based projects I put nbactions.xml into source control. Just make sure to change absolute paths to relative ones.

like image 26
Leif Gruenwoldt Avatar answered Nov 15 '22 21:11

Leif Gruenwoldt


I put nbactions.xml into source control BUT there is a caveat: it's internal format can change so if your developers, for any reason, use different versions of NetBeans you could have to remove it because sharing it becomes nasty.

Recently I upgraded from NetBeans 7.3.1 to 7.4 and the "Run" action was giving a strange error message. I solved the problem by deleting and regenerating nbactions.xml: the old one had a custom Maven goal for the "Run" and "Debug" actions; it was org.codehaus.mevenide:netbeans-deploy-plugin:1.2.4:deploy it was not visible in the IDE v7.3.1 (perhaps it has been generated by an even older version for internal usage) and was generating a class not found for org.openide.util.Lookup in v7.4. I'm documenting the problem here because I found the solution by myself after an unsuccessful search on the Net. I hope this can help someone else.

like image 42
Pino Avatar answered Nov 15 '22 22:11

Pino