I’m used to other IDEs such as Visual Studio which keep project structure on some metadata files. I’m using Eclipse right now and I used m2e eclipse to import a maven project. afaik Eclipse only gets source/resource files from pom.xml (or maven default directories if none is specified) and create the project tree.
Therefore, i think that, if I have the code and Eclipse configuration files (.project, .classpath) in a repository and I update code directory structure, no Eclipse files will be updated and therefore I don’t need to update Eclipse files in the repository.
Is that correct?
Generally, if you use m2e (recent versions) and a SCM (Git, Svn, CVS, etc.), you don’t need to commit the Eclipse configuration files to the repository.
These main files are :
.project.classpath.settings/There is a good example on GitHub of a
.gitignorefile which shows what files in Eclipse you don’t need to commit.EDIT :
To regenerate Eclipse project files, you can either :
Import > Existing Maven Projects : needed eclipse files are created
Import > Checkout Projects from SVN (or CVS, GIT, etc.) ….. if needed : Convert to Maven project
Use CLI maven-eclipse-plugin with
mvn eclipse:eclipse(Goal) (not recommended if using m2e)