About Anton Arhipov

Anton is JRebel Product Lead at ZeroTurnaround. Professional interests include programming laguages, middleware and tooling. Java enthusiast, vim fan, IntelliJ addict and JetBrains Academy member. He blogs at "Code Impossible" blog and speaks at Java conferences.

IDE Project Files In Version Control – Yes or No? Of Course, Not!

Just recently I had some discussions with the clients who were claiming that they keep IDE project files in version control system hence they avoid any changes to those files. For reference, those are Eclipse generated .project and .classpath. From my point of view it is a bad practice by all means, however I usually prefer to collect some information on the topic before I say it loudly. So I asked from my G+ and Twitter followers, IDE project files in version control – Yes/No? Surprisingly, I’ve got quite a number of responses, so I decided to summarize the information as a blog post. 

Basically, the answer to this question isn’t binary, yes or no, but it also could be ‘yes, but… ‘ or ‘no, if…’. So there might be some argument why someone prefers one way or another.

The vast majority of the answers is ‘No, no, noooooooo!! Never!’. And just a couple of answers were ‘yes’ with some weak arguments of why someone should keep those files in version control.

Here are some yes answers first.

Bad stuff. Seems that the team isn’t really competent with the tools. The project should be easy to setup and why on earth I should press 100500 buttons to setup a project. If this is the case, the first thing that team lead should do, is to simplify the project structure, setup and build process. No excuses there.

Yeah, yeah, I can already hear some arguments like ‘but we have a complex project’ or ‘this is the way our setup is done’. Bullsh*t!

OK, there is some optimization for the setup, IDE specific though. If all the team members use the same setup, it might even make sense for those who want to keep hands off the console.

Here’s another one:


‘Specific Eclipse plugins’ – yeah! that’s is actually an argument for not keeping the files in version control! Eclipse plugins usually modify .project files as they add a ‘nature’ or any other project specific settings to the configuration. And actually, IntelliJ does the same, but (let me bash to tools a bit) IntelliJ can suggest the settings as you open a project from scratch. And with Eclipse, you have to do that manually. What if your colleague uses some awesome eclipse plugin that makes modifications to .project file, and you hate that plugin and do not want to install it, and the .project file is in version control? Here’s just a simple example that you could see while exporting a project with existing project files:

This is so annoying to resolve this kind of problems. And all you want to do is just to open the project and proceed with your normal work.

Here’s more:


Currently, I use IntelliJ and the rest of the team uses Eclipse. And I absolutely do not care if they put the project files into version control, because I will import it into my IDE in two clicks anyway. So the assumption that ‘absolutely yes, given that the team is working with the same IDEs’ is wrong, and no viable argument here as well.
However, here we have some much more interesting ideas:


Wow, this is really interesting one – ‘those that define formatting or source code’. Indeed! In cases when you work on varions projects for different clients, the requirements and code styles might be quite different and it makes sense even to keep this kind of files in version control, so you can share it with the team and restore the code style settings if you lost them. Good point here!
However, you can probably see the vector of my post now.

So the point is, IDEs support Maven quite well, so why on earth I would need to keep the IDE settings in version control if we already have what we need: pom.xml. IntelliJ and NetBeans cope with that quite well, and Eclipse also, if you use JBoss Tools.
But what if I’m a Maven hater? (I really am). Here’s an interesting conversation:


Oh sure, Gradle that is! Well, the IDE support isn’t there yet. Luckily, STS provides a nice Gradle plugin for Eclipse, but the support for IntelliJ and NetBeans isn’t quite there yet.
However, my claim is that Maven or Gradle isn’t the prerequisite to avoid the project files in version control. The real prerequisite is the simple setup of you project and a clean structure, so that importing the project is just a couple of clicks. Then you can cope with any kind of project, even if it doesn’t contain pom.xml.
And here’s what most of them say about the topic:

Myself, I have tried both ways – keeping the project files in version control and not checking them in, and my take is that under no circumstances it is a good idea to check the project files in. Again, a much better solution is to keep your project structure clean and simple, which might be harder than to check the files into version control, but much more beneficial on the long run.
Thanks everyone for the input! Take care…

Reference: IDE Project Files In Version Control – Yes or No? Of Course, Not! from our JCG partner Anton Arhipov at the Code Impossible blog.

Related Whitepaper:

Transforming a Generic Java IDE to Your Application Specific IDE

Improve software development by passing along shared knowledge and best practices.

One of the biggest challenges in application development today is how to factor in application-specific information. The answer lies in the ability to capture application evolution and developers' knowledge of building and extending the application as metadata so that it's not lost in time or translation. Once that can be done effectively, the combination of the application code along with application-specific metadata can be meaningfully packaged into reusable software asset modules. This white paper will discuss how 'Application Factories' can transform an IDE to play a central role in capturing both the application evolution and the developers' knowledge.

Get it Now!  

One Response to "IDE Project Files In Version Control – Yes or No? Of Course, Not!"

  1. Paul Wellner Bou says:

    I agree completely, I’d just like to add: If no build tool is used or the build tool is supported by the IDE, I would prefer to have scripts/tools in version control, that are able to generate the IDE’s project files — on request. This would make life easier for those using this IDE, may be a kind of documentation of the project set up for others and will not create conflicts because of different versions/plugins/whatever of the same IDE.

Leave a Reply


nine − = 3



Java Code Geeks and all content copyright © 2010-2014, Exelixis Media Ltd | Terms of Use | Privacy Policy
All trademarks and registered trademarks appearing on Java Code Geeks are the property of their respective owners.
Java is a trademark or registered trademark of Oracle Corporation in the United States and other countries.
Java Code Geeks is not connected to Oracle Corporation and is not sponsored by Oracle Corporation.

Sign up for our Newsletter

20,709 insiders are already enjoying weekly updates and complimentary whitepapers! Join them now to gain exclusive access to the latest news in the Java world, as well as insights about Android, Scala, Groovy and other related technologies.

As an extra bonus, by joining you will get our brand new e-books, published by Java Code Geeks and their JCG partners for your reading pleasure! Enter your info and stay on top of things,

  • Fresh trends
  • Cases and examples
  • Research and insights
  • Two complimentary e-books