Getting Started with OpenSHA Development
Changing your password
If you were given a temporary password, you should first change it here
Obtaining Source Code
Three options are available to obtain the OpenSHA source code:
Browse Source
on this website. Once in thetrunk
folder, the current release code may be downloaded as a zip file (the link is at the bottom of the page).
- Checkout the codebase directly from our Subversion (SVN) repository. We recommend using a newer version of the SVN client, even if your computer already has a client installed. Navigate to the directory you wish to download the project to, and run:
svn checkout https://source.usc.edu/svn/opensha/trunk
If you are a developer and have a unique user/pass, run the following command, substituting
username
andpassword
as appropriate:
svn checkout --username username --password password https://source.usc.edu/svn/opensha/trunk
- Checkout the codebase from our Subversion (SVN) repository using Eclipse (see below).
Obtaining Source Code via Eclipse
If you plan on working with OpenSHA, an alternative, and perhaps easier approach is to download the code from within Eclipse:
1) Download Eclipse
The latest version of Eclipse can be obtained from The Eclipse Website
The "Eclipse IDE for Java Developers" should be fine, however the Enterprise Edition (EE) will work as well.
2) Install the Subversion (SVN) Plug-in
The Eclipse SVN Plug in is called "Subclipse".
Follow these installation instructions, or see their wiki
- In eclipse, select Help > Install New Software
- Click the Add... button at the top right corner
- Enter "Subclipse" in the Name field and this url in the Location field:
https://dl.bintray.com/subclipse/releases/subclipse/latest/
- Hit enter, then select at least "Core SVNKit Library", "Optional JNA Library", and "Subclipse".
- Hit next and follow prompts to install the plugin, restart eclipse when prompted
3) Add the OpenSHA Source Repository
Once Subclipse is properly installed, from within eclipse:
- Select
Window > Open Perspective > Other
. - Select
SVN Repository Exploring
and hitOK
.
The SVN Repository
tab should now be visible:
- Click the
Add SVN Repository
button shown here...
- Enter
https://source.usc.edu/svn/opensha
as theURL
and hitFinish
. - Enter your
username
andpassword
if you have have them, otherwise leave the fields blank for anonymous read-only access.
4) Check out the OpenSHA Project
- Click the arrow to expand the repository tree.
- Right click on
trunk
and selectCheckout...
- If you are happy with the default options (they are fine for most people), just click
Finish
.- To specify where to put your "Working Copy" of the project, click
Next
instead.
- To specify where to put your "Working Copy" of the project, click
- Be patient, it may take a little while to check out the entire project the first time.
- Once it is checked out, switch to the Java perspective
Window > Open Perspective > Java
(orOther
, thenJava
). - More patience; it will probably take a little while to build the project as well (you should see
Building Workspace
in the lower right corner of the Eclipse window.
Working with OpenSHA
The instructions above will enable any registered user to get a copy of the trunk
or current codebase. Any new code by authorized developers, however, must be committed to the repository on a branch
. The details of merging and branching are outlined in The SVN Book and we encourage everyone involved to keep it handy. Some very basic instructions and guidelines are provided below.
Branching
OpenSHA development occurs on branches. To create a branch:
- Switch to the
SVN Repository Exploring
perspective (see Step 3 above). - Right click on
trunk
and selectBranch/Tag...
- In the window that follows, enter the following address in the
Copy to URL
field, replacingusername
andbranchname
as appropriate:https://source.usc.edu/svn/opensha/branches/username_branchname
- Click
Finish
(orNext
for more advanced options). - Once the branch is created, expand the
branches
folder and check outusername_branchname
as a "Working Copy" usingCheckout...
(see Step 4 above).
Merging
When new code is ready for inclusion in a release, project admins will assist with any required updates to a developers branched code and with merging it into the main line of the project.
Other Eclipse Tasks
Relocate Repository
If you had previously set up OpenSHA projects with our old server intensity.usc.edu
, you can 'relocate' the project rather than adding the new server source.usc.edu
and checking out the project again:
- Open any OpenSHA projects in the Eclipse Java perspective.
- Switch to the SVN Repository browsing perspective.
- Right click on
https://intensity.usc.edu/svn/opensha
. - Select 'Relocate' and advance to the screen where you can set the New URL to:
https://source.usc.edu/svn/opensha
Attachments (3)
- svn_branch.png (21.4 KB) - added by 13 years ago.
- svn_checkout.png (21.0 KB) - added by 13 years ago.
- svn_add_repo_button.png (6.6 KB) - added by 13 years ago.
Download all attachments as: .zip