0

I've searched around and cant seem to find a definitive answer. I have a Java Swing project on intranet git server that will have contributors using different IDEs.

Is there a best practice for setting this up? I would like the repository to work on both Eclipse and Netbeans naturally. Should we keep the IDE specific files as part of the repository? Should I create separate branches for each of the IDEs? Are there any drawbacks I should watch out for?

Thanks!

[edit] I got flagged that this answer may be opinionated. Redirecting the question: Assuming we dont use something like Maven, what negative impacts are there in just storing both Netbeans and Eclipse centric files in the source control?

John Lee
  • 1,357
  • 1
  • 13
  • 26
  • 3
    You shouldn't keep any IDE-specific folders in your repository. Rather, you should keep the pom.xml (or equivalent) that will generate the relevant files locally. – hd1 Jan 20 '14 at 22:13
  • As far as Eclipse goes, there is no opinion about it, Eclipse project config and settings files are *designed* and *intended* to be stored along with the source files. See http://wiki.eclipse.org/FAQ_How_do_I_set_up_a_Java_project_to_share_in_a_repository%3F – E-Riz Jan 22 '14 at 18:19

1 Answers1

1

I don't know about Netbeans, but Eclipse is designed to enable storing the basic project settings and configuration files in source control. See this answer.

Yes, maven and Gradle can generate Eclipse project files for you, but they don't necessarily do it in the best way and they don't generate all of the files that are typically recommended in order to ensure complete uniformity among different developers/workspaces. There are plenty of reasons to make sure all developers' workspaces treat the projects the same away, and at least in the case of Eclipse, the files don't "get in the way" or impact other tools in any way. It's the way Eclipse is designed to work and has been proven for many years to serve well.

Community
  • 1
  • 1
E-Riz
  • 31,431
  • 9
  • 97
  • 134
  • Thanks for this link. I'm new to Maven but that seems like a good option for us. But even if we dont, it seems like I could store both Netbeans and Eclipse files through the source control. They dont overlap and I dont think they will get changed often anyways. @hd1 - even if we didnt use the POM.xml are there reasons for not keeping these IDE specific files / folders? – John Lee Jan 21 '14 at 01:51