Wednesday, November 09, 2011

Maven + Subversion Enabled Eclipse Java Project

What I want for my Eclipse projects is to be Java projects, allow content revisions with Subversion and be managed by Maven.

This is what I need to do.

Eclipse version: Eclipse Indigo
Subversion plugin: Subversive
Maven plugin: m2eclipse
Java: JDK 1.6

Support for Subversion and Maven is now integrated into Eclipse.
  1. Choose Help --> Install new software --> Work with: Indigo - http://download.eclipse.org/releases/indigo
  2. Expand collaboration and check the m2eclipse and Subversive packages.
  3. Configure the Maven repository here: Window --> Preferences --> Maven --> Installations.
Now you need the Maven SCM handler for Subversive.
  1. The easy way is to create a fake new project from File --> new project --> New Project wizard
  2. Select the project type: Maven --> Checkout Maven Projects from SCM
  3. In the target location dialog box select the m2e marketplace in the right bottom corner.
  4. When you are presented with the list of connectors, the m2e-subversive is the the last one.
  5. Once Eclipse has restarted, you can choose again to create a project through Maven --> Checkout Maven Projects from SCM and this time you will be able to specify a SCM URL (svn) and fill in the URL.
Now you have a project checked out from a Subversion repository which uses a Maven repository to manage its library dependencies.

References
  1. The place where I found the final answers is Ralph's Java blog.

0 comments: