Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse m2e "Update Maven Project" adds an unneeded bin directory

Tags:

eclipse

m2e

I encounter a strange behavior of m2e on eclipse:

  1. Clone project from remote git repository
  2. 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"
  3. 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?

like image 911
dhchen Avatar asked Dec 13 '12 06:12

dhchen


1 Answers

It seems, that before you did the "update project", the bin dir 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 to target/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.

like image 195
dunni Avatar answered Sep 28 '22 09:09

dunni