Importing Maven projects into Eclipse when using SVN as the revision control system is often a two step process. While it is one of the fastest ways to import the projects, it requires a developer to perform two steps. This can easily be done in one step given that the right plugins are installed in Eclipse.
- Eclipse Kepler (Service Release 1 was used)
- Maven Integration for Eclipse (Juno and newer) 1.4
- Subversive as SVN plugin
The Maven and Subversive plugins can be found in the Eclipse Marketplace (Help -> Eclipse Marketplace…)
Installing the plugin
Add the following update site via Help -> Install New Software…
And check the ‘Subversive Integration for the M2Eclipse Project’ and process with the installation of the plugin.
Restart Eclipse after installing.
Checkout a project
Open the SVN Repository Exploring perspective (Window -> Open Perspective) and add the repository from which you want to import. (If you’ve never done this, here is a tutorial: http://www.eclipse.org/subversive/documentation/teamSupport/new_location_wiz.php).
Browse to the project you want to import and open up all the way to either the trunk or the branch you wish to import. Right click on the trunk or branch version and click ‘Check out as Maven Project…’ as shown in the screenshot.
Press ‘Next’ in the new window if you’d like to import the project into a specific set or workspace or finish if you want to use the default settings.
After importing Eclipse, Maven and Subversion can be used normally. There are no special requirements for committing or updating the local sources.
The import process could take a bit longer then you are used to, but we’re talking seconds. But saves you time switchting between terminal, eclipse and using other tools to import projects.