views:

118

answers:

2

I created a maven2 project in eclipse, and then I moved the folder to another location.

How can I open that project now in eclipse, I can't seem to find a 'open an exisiting maven' project or the like?

Opening the file pom.xml just opens the file, kinda stuck sorry.

+1  A: 

If you are using the M2Eclipse plugin for Eclipse, you can right-click in the Package Explorer view and then Import... > Maven > Existing Maven projects:

alt text

If you are using the maven-eclipse-plugin, then simply import it as an Import... General > Existing Projects into workspace.

Pascal Thivent
where is the package explorer? I just see the project explorer.
Blankman
Window > Show View > Package Explorer on the Eclipse menu, at the top of the window.
Chris Dennett
ok I changed to the 'java perspective' and I see package explorer tab now. But right-clicking doesn't give me the 'import' option. I do have the m2eclipse addon installed though, hmm?
Blankman
@Blankman Then you must be in the Java EE perspective. But this doesn't matter, the **Import...** entry is there too (or access it through **File > Import...**)
Pascal Thivent
yeah I did the import -> existing projects into workplace and then I get an error, with it referencing the old path where the project used to be. I thought I installed the M2Eclipse, it is better it seems since I can import via the pom.xml
Blankman
ok it is installed, when trying http://m2eclipse.sonatype.org/sites/m2e it says it is already installed.
Blankman
eclipse.buildId=M20090917-0800java.version=1.6.0_18java.vendor=Sun Microsystems Inc.BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_USFramework arguments: -product org.eclipse.epp.package.jee.productCommand-line arguments: -os win32 -ws win32 -arch x86 -product org.eclipse.epp.package.jee.productErrorSun Mar 14 22:43:24 EDT 2010Working directory does not exist: E:/dev/eclipse/HrpSpider
Blankman
@Blankman If you have m2eclipse, import it as an **Existing Maven Projects** as I wrote. If it doesn't work, then you must have something else interfering.
Pascal Thivent
Hmm..could be the andriod plugin I installed, that is the only thing else I have. thanks!
Blankman
+1  A: 

Try File->Import->General->Existing Project into Workspace.

alt text

ScArcher2