Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Should I put Eclipse settings and .project file to SCM when using Maven?

Should I put .classpath, .project files and .settings files on SCM when working with Maven project with m2eclipse plugin? Theoretically every developer can grab the sources and import maven projects.

Due to your experience is it better to do this that way or to put Eclipse files to SCM too? Some developers are using InteliJ so I don't want the projects to be Eclipse specific. It seems that the .project file may change according to the set of installed plugins, e.g. change buildCommand from org.eclipse.jdt.core.javabuilder to org.eclipse.wst.common.project.facet.core.builder etc.

Please share your knowledge and experience.

like image 568
Piotr Gwiazda Avatar asked Dec 20 '25 11:12

Piotr Gwiazda


1 Answers

In my experience, you should not include .classpath, .project or .settings. All the information needed to re-import the project is in the pom file, so long as you use "import existing maven projects".

If you put all those local ones, you are likely to end up having SCM changes for irrelevant things, such as different order of entries, local modifications someone made to their project preferences, etc...

like image 198
Miquel Avatar answered Dec 23 '25 10:12

Miquel



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!