tags:

views:

1030

answers:

4

Is there any way to point ecilpse (Galileo) at a pom.xml file located at a URL and have it setup my workspace based upon what is in the pom.xml file. I have tried to use the import maven project feature in eclipse by downloading the pom.xml file to my desktop and importing the pom.xml file. That resulted in my project containing all of the items from my desktop.

There was also a function to Checkout Maven Project from SVN and I tried that also, but encountered the following error:

Can't rename c:\users\leto\FunJavaDevelopment\maven.1250263290804

The SVN URL is http://dbunit.svn.sourceforge.net/svnroot/dbunit/trunk

Am I just misunderstanding how to use the pom.xml file? Any assistance would be greatly appreciated.

By the way, I'm posting this on stackoverflow rather than dbunits site because I thought others might find the answer to be informative.

Thanks in advance.

+1  A: 
Rich Seller
A: 

I think the Import Projects feature is only in the latest stable development build of the m2e plugin.

Here's the easiest way I've found to do what you are describing:

  1. Check out the entire svn repo somewhere, including all of the source (I use TortoiseSVN for this) Go to File...Import..Maven..Existing Maven Projects
  2. Browse to the directory I just checked out, and click "Finish"
  3. If there are multiple nested modules, the m2e plugin will create a new project for each one, in addition to one master project that contains all of the projects, but isn't a Java project.
Ken Liu
A: 

Although this is an old thread, I thought I'd share my solution to the "Can't rename..." error:

  • Make sure you don't have another project with the same name in c:\users\leto\FunJavaDevelopment\, e.g. a previous version of dbunit. Maven won't override the old project, it just gives this cryptic error.
  • Make sure no other programs are reading files within c:\users\leto\FunJavaDevelopment\maven.1250263290804. For instance, if you had a command prompt cd'd to this directory, it would block the rename.
Quantum7
A: 

Thank you, Quantum7, it was a right tip!

Alex