问题
I have been working with Netbeans quite a while and I am now moving to Eclipse.
Basically I have a Maven project that I would like to work on using Eclipse.
What I am not sure about is whether I need to point my Eclipse workspace to the directory where my project super pom is located or whether the Eclipse workspace needs to point to a clean/empty directory.
My question is basically:
- Are the source files eventually located in the Eclipse workspace directory?
Can anyone please advise?
Regards,
回答1:
If you have the m2e or m2eclipse plugin installed, you can just do "Import..." then "Existing Maven Projects" and point it at the super-pom. It'll import all the modules it finds, as separate projects.
回答2:
you can use the maven eclipse target to generate project files so you can move them directly in the eclipse workspace:
mvn eclipse:eclipse
info on the plugin
回答3:
It's a matter of personal preference whether you have the source files in the workspace folder or not. Eclipse can import your project from any folder. Personnaly, I keep my projects folder separated from the workspace folder.
来源:https://stackoverflow.com/questions/8852989/maven-project-and-eclipse-workspace