Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Import Project using pom.xml

Tags:

maven-2

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.

like image 909
jwmajors81 Avatar asked Aug 14 '09 15:08

jwmajors81


1 Answers

If you set up the scm section of the POM, you can do Import...->Maven->Materialize Maven Projects, then enter the groupId or artifactId of the project you want to import.

If the project is a dependency of one of your existing workspace projects you can also right-click on it and then select Maven->Import Project.

If m2eclipse can find a version of the project in the index for any repository it will list it, and you can then import the project.

For details of the scm section of the POM you need to see the documentation for your SCM provider. For example here's the SVN provider documentation.

There's more detail on importing projects in the m2eclipse book. It also describes how to import local file system Maven projects.

Here's an example of the Maven import wizard in action:

alt text http://docs.codehaus.org/download/attachments/73335/import-projects-poms.png

like image 179
Rich Seller Avatar answered Sep 30 '22 15:09

Rich Seller