I encounter a strange behavior of m2e on eclipse:
- Clone project from remote git repository
- The dir structure showed at project explorer does not have maven natures, only pom.xml at root and packages. No “JRE System Library”, no “Maven dependencies”. No “src/main/java”, only “my.packages.1”, “my.packages.2”
- I update the project using maven->Update Maven Project. Everything displays well, except one “bin” directory created and the content of bin dir is the same as what i checkout from git.
example:
before update maven project:
.settings/
src/
pom.xml
.gitignore
after update maven project:
.settings/
src/
pom.xml
.gitignore
bin/ <------ this dir appears after update maven project
bin/.settings/ <----------- contents the same as outside dir
bin/src
bin/.gitignore
bin/pom.xml
How should I avoid this strange behavior?
It seems, that before you did the “update project”, the
bindir was configured as output directory. Output directories are hidden by default in Eclipse (at least in Package Explorer and Project Explorer). When you configured the project as Maven project, the output directory was changed totarget/classes. Your bin folder is now just another folder, which isn’t hidden any more.Since you don’t need it anymore, you can safely delete it.