How to setup Subversion working with Eclipse

Client Side
Step 1. Installing Subclipse
Now it’s time to install the Subclipse plug in on the client machine, ’cause we’re not more used to type long cryptic commands on the console and we all want a beautiful GUI well integrated with our favorite IDE.

1. Open Eclipse.
2. Open the menu “Help”>”Software Update”>”Find and install…”
3. click “Search for new features to install”
4. click “New remote site…” and type in the URL of the Subclipse plug in “http://subclipse.tigris.org/update_1.0.x”

Now launch the update on the added update site. This will install Subclipse. The installation can take some minutes if you choose to update all the Eclipse plug in. At the end Eclipse needs to be restarted to take full advantages of the new Subclipse plug in, so restart it!

Step 2. Configuring Subclipse
Subclipse needs some configuration. Subclipse can use two libraries to manage connections to the Subversion repository: “JavaHL”, which is selected by default, and “JavaSVN”. In my experiments I experienced unsolvable troubles with “JavaHL”, so I’m going to explain how to set up Subclipse to use the “JavaSVN” library, but feel free to use the “JavaHL” library if this doesn’t raise any problem on your machine. I don’t think the behaviour of Subclipse depends upon the chosen library.

1. Open the menu “Preferences”>”Team”>”Svn”.
2. On the right panel check the “JavaSVN” library instead of “JavaHL”.
3. click “Apply” and confirm all changes.

Step 3. Connection with the Subversion server
If you successfully installed and configured Subclipse it’s time to create the connection at the Subversion server we started some step ago.

1. Open “Window”>”Open Perspective…”>”Other”>”SVN Repository Explorer”.
2. Click right on the “add SVN repository” button
3. In the window that will pop up type the URL of the repository that will be in this case “svn://dellbox”, where “dellbox” is the name of the machine with the repository.
4. Type user name and password when requested, as you specified in the “passwd” file.

Now you have a working connection with the server.

Step 4. Putting the project under Subversion control
1. Open your project as usual in Eclipse, in the Java perspective.
2. Right click on the project folder you want to be controlled by Subversion
3. Choose “Team”>”Share project…”>”SVN”.
4. Choose “Use Existing Repository Location”.
5. Click on the icon of the connection we set up in the previous step.
6. Choose “Use Project name as folder name”.
7. Finally press “Finish”.

Then a window will ask you what resources you need to put under control of Subversion. Choose the folder containing the source code and the files contained.
The Eclipse console should show some activity. After some moments the copy of file to subversion will be finished. After that the project tree will be shown as follow, every file shows the version. You are now ready to work with Subversion and Subclipse.

Pages: 1 2 3

Leave a Reply

You must be logged in to post a comment.