We did talk about how to use Maven in Eclipse. So let’s move on to see how to integrate SVN and Maven in Eclipse.
For a simple Java project, only the /src folder and the pom.xml are needed to be stored in SVN repository. if you like to do development without the IDE. u can just check out the project to the file system of a computer with Maven installed and run the Maven commands in command prompt/terminal.
For Eclipse user, assume we have already import them in the SVN repository. How could we check out them in Eclipse such that developers can run the project immediately after check out?
1. Eclipse with subclipse and m2clipse installed
2. Maven installed
Check out the Maven Project in Eclipse
1. Install the Maven SCM handler for Subclipse with the following update url.
- Update url for m2eclipse extras – http://m2eclipse.sonatype.org/sites/m2e-extras
2. Open the SVN Repository View in Eclipse
3. Connected to your SVN repositoy
5. After check out, you may need to configure the project build path to your desired JDK instead of the Eclipse default JRE.
6. mvn build/install the project once. Then open the Team Synchronizing perspective and add all those Eclipse related files such as .settings and the Maven created folders like /target to SVN ignore.
Reference: Installing m2eclipse Extras