Android Setup Guide: Installing and Configuring Eclipse’s Subversion (SVN) Plug-in (part 2)
Posted: February 15, 2012 Filed under: NEZzen Leave a comment »Adding the Subversion (SVN) Plug-in to Eclipse
You will most likely want to use a version control system for managing the source code in your project. This set of instructions will step you through adding the Subversion plug-in to your existing Eclipse installation.
- Start up the Eclipse IDE if you haven’t already done so.
- Go to the “Help” menu again and select “Install New Software…” from the drop down.
- In the “Work With” drop down, select the “Indigo” source (or whatever is the name of your release).
- The list below will populate. Scroll up and expand the “Collaboration” section.
- Place a check in the selection box next to “Subversion SVN Team Provider (Incubation)”.
- Click “Next” and then click “Next” again at the confirmation page.
- Accept the license agreement. Now click “Finish”. Wait for a bit while the plug-in is downloaded and installed.
- Restart Eclipse when you are prompted to do so.
- Go to the “Window” menu and select “Open Perspective” from the drop down. Then click “Other…”
- Pick “SVN Repository Exploring” from the list and click on “OK”.
- Place a checkbox next to “SVN Kit 1.3.5” in the next window. Then click “Finish”.
- Click “Next” and then click “Next” again at the confirmation page.
- Accept the license agreement. Now click “Finish”. Wait for a bit while the plug-in is downloaded and installed.
- Restart Eclipse when you are prompted to do so.
- You should now have a Subversion view available in addition to the normal Java view. Look in the top-right hand corner of the Eclipse window. You will see the current view, along with a small >> button to select other views.
Connecting the Eclipse SVN Plug-in to Your Repository
This step assumes you already have Subversion hosting provided to you. If you do not, you can create a free account for open-source projects through a website such as Google Code (http://code.google.com/) or SourceForge (http://www.sourceforge.net/). You can also run one on your own server, or use services provided by a hosting company to set one up. Doing this is outside the scope of this document, however.
- When you are in the Subversion view inside of Eclipse, you should have a windows/tab called “SVN Repository Browser” located at the bottom of the screen (unless you closed or moved it).
- In that window, right click and select “New” from the drop down menu, then click “Repository Location…”
- If you are using Google Code, in the URL field, enter the URL https://PROJECTNAME.googlecode.com/svn/ where PROJECTNAME is changed to the unique name of your Google Code project. If you aren’t using Google Code, your Subversion host will have provided you with the correct URL.
- Fill in the “Username” field. If you are using Google Code, this is something like YOURNAME@gmail.com.
- Fill in the “Password” field. If you are using Google Code, your password is not your Google account password, but a different one that can be found at https://code.google.com/hosting/settings.
- Check the box next to “Save Authentication” and “Validate Repository on Finish”.
- Click “Finish” to complete this step.
- Your repository should show up in the left hand side of the screen. Expand it to see the contents.
Note: Only follow the next two instructions if you do NOT want to create a specific Eclipse project for the repository you just checked out. This is likely not the case, so move on to the next part of this guide.
- Right click on the root node of the tree (the repo URL) and click on “Check-out” to download the contents of the repo to your local workspace.
- Now when you right click on the root node, you can go to the “Team” sub-menu which will contain all of the SVN functions such as “Commit”, “Update” and more!