Checking out Maven projects from SCM repositories

If we have to check out a Maven project from an SCM repository such as SVN or CVS, we can check it out directly as a Maven project. Usually, the Eclipse configuration resources are not committed on the SCM; even better, they are added to the .svnignore or .cvsignore files. This is because the m2e plugin is able to recreate all the necessary Eclipse configuration starting from the POM.

If our SCM repository is Subversion, we could install the Subclipse plugin from the Eclipse Marketplace by navigating to Help | Eclipse Marketplace…; just type subclipse in the search textbox and then select the appropriate plugin. In addition, we have to install the Maven SCM handler for Subclipse if we want to check out the Maven project directly, as we are about to show. We can install this component by navigating to Help | Install New Software…, adding the update site http://subclipse.tigris.org/m2eclipse/latest/, and finally selecting the Maven integration for the Subclipse checkbox, as shown in the following screenshot:

Checking out Maven projects from SCM repositories

Installation of the Maven SCM Handler for Subclipse

At this point, we are able to check out the project by opening the SVN Repository Exploring perspective (by navigating to Window | Open Perspective | Other...), then right-clicking on the project folder and selecting the Check out as Maven Project… menu item, as shown in the following screenshot:

Checking out Maven projects from SCM repositories

Check out from the repository exploring perspective

Alternatively, we can check out our projects directly by navigating to File | Import | Maven | Check out Maven Projects from SCM and then filling the SCM URL dropdown, as shown in the following screenshot:

Checking out Maven projects from SCM repositories

Check out from the main menu

If our SCM repository is CVS, we can install the Maven SCM Handler for CVS using the update URL http://repository.tesla.io:8081/nexus/content/sites/m2e.extras/m2eclipse-cvs/0.13.0/N/0.13.0.201304101743/ and then proceed in a similar manner.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset