At this point you can connect to Subversion repositories. For projects hosted on dev2dev CodeShare, you'll find a repository URL on the access options page available from the Version control project menu. Here is an example. The CodeShare SVN server requires the same user name and password you use for the dev2dev site.
Figure 6. Connect to Subversion repositories.
If the connection parameters are correctly set, you'll see an SSL certificate confirmation dialog.
Figure 7. Accept the SSL certificate.
After accepting the certificate you should be able to browse the repository and check out existing projects.
Figure 8. View existing projects in the SVN repository.
You should now be ready to start using Subversion and the Subclipse plug-in!
As you can see in an SVN Repository view, a common layout can be found in many CodeShare projects as well as other projects using Subversion. They often look something like this:
https://xjms-ra.projects.dev2dev.bea.com/svn/xjms-ra +-- branches +-- www +-- xjms-ra +-- mqseries (work in progress) +-- activemq +-- tags +-- xjms-ra +-- 0.0.1 (stable versions or releases) +-- 0.0.2 +-- trunk +-- www (project web site) +-- xjms-ra (project source)
trunk folder contains the mainline development source; a
tags folder contains stable snapshots or releases; and a
branches folder contains code from alternative lines of development. In Subversion, tags and branches are just a versioned copy of the selected source snapshot. Refer to the
Subversion book for more details.
You can select the trunk or a specific tag or branch for a current project in the SVN Repository view and choose the Check Out As... action from the pop-up menu. You will then be guided through a standard New Project Wizard that allows you to choose project type (for example, Java or Simple Project), project name and location as well as configure the Java build path if necessary.
The version control repository is an important part of any project infrastructure. For open-source projects (including those hosted at CodeShare) it also plays a key role in the communication between developers and other community members. For example, it allows end users to contribute patches to the most recent code and provides an early update mechanism for important fixes. Because of this role, it is important to configure the SVN repository for a new project and put all project code under version control from the very beginning.
When a new CodeShare project is created, the SVN repository contains
branches folders, as well as a
www module under
trunk, which contains an
index.html file for a project Web home page. You can verify that in SVN Repository view and create missing folders using actions from a pop-up menu in this view.
Let's assume all source code, build scripts, documentation, and other project resources are organized as an Eclipse project. Then you can use the Team -> Share Project... action from a pop-up menu on a Package Explorer or Navigator view. The Share Project Wizard will let you select the SVN repository type, and then on the next page you can choose one of the existing repositories or configure a new one.
Figure 9. Select the SVN repository type in the Share Project Wizard.
On the next screen you should specify a module name. Since we should create modules under the
trunk folder in order to match the CodeShare project layout, specify
trunk/<project name> as a module name, such as
Figure 10. Specify a module name.
After confirmation, Subclipse creates the module and imports all project files into the SVN repository.