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?
Pre-requisites
—————————————-
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
4. Selected the Maven Project and choose Check out as Maven Project…
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.
Done =)
Reference: Installing m2eclipse Extras
i was struggling for 3hrs, thanks to your article got my workspace up!
LikeLike
good to know that it could help =)
LikeLike
Thank you very much for this tutorial.
LikeLike
You are welcome. i am glad to know it could help you. =)
LikeLike
Thanks for your mini tutorial!..
LikeLike
you are welcome~ good to know that it could help. =D
LikeLike
i think this is working in helios but not in indigo.. thanks
LikeLike
I haven’t tried it in Indigo.
The m2eclipse plugin has been updated. maybe you could find more information @ http://eclipse.org/m2e/
hope this help and thanks for your comment. =)
LikeLike
that’s right for indigo,we need to use this link
http://download.eclipse.org/technology/m2e/milestones/1.0
LikeLike
Thanks for you link. =)
LikeLike
very useful…but how do you check in your maven project to svn, i mean, which files are necessary??
LikeLike
You should be able to checkin using the m2clipse in Eclipse.
LikeLike
how import mavan project in to svn in command promte
LikeLike