These instructions detail the steps needed to create a full Java development environment for working with the Shared Records source code to develop server applications.

Install

Install all of the components mentioned in each of these sections:

Checkout

  1. launch Eclipse
  2. create a new workspace
  3. open the "SVN Repository" perspective
  4. create a new repository location
    • right-click within the "SVN Repository" tab, then select "New->Repository Location.." from the context menu
    • OR click the new repository icon in the toolbar
    1. enter the root repository URL noted in the SubversionRepositoryGuide?
    2. click "Finish"
    3. if an "Accept Digital Authority" dialog appears, click "Accept Permanently" to accept the certificate
    4. your username and password is the same as your trac username/password
  5. expand the repository
    1. expand the path: <root>/java/core/Core/
    2. expand the path: <root>/java/server/RestServlet/
    3. expand the path: <root>/java/server/TokenServlet/
  6. checkout the core project
    1. right-click <root>/java/core/Core/trunk, then select "Checkout..."
    2. review the project settings, then click "Finish" on the "Checkout from SVN" dialog box
  7. in the same way, checkout the REST servlet from <root>/java/server/RestServlet/trunk
  8. also checkout the Token servlet from <root>/java/server/TokenServlet/trunk

Configure Runtime

Create a Tomcat runtime for testing

  1. Right-click the "org.sharedrecords.web.rest" project
  2. Select "Properties"
  3. In the section listing on the left, select "Targeted Runtimes"
  4. Click "New..."
  5. Expand the "Apache" listing, select the version of Tomcat you have installed
  6. Leave the "Also create a local server" checkbox checked
  7. Click "Next"
  8. Enter the "Tomcat installation directory:", to match CATALINA_HOME
  9. Click "Finish" to dismiss the dialog
  10. Select the newly created server runtime

Create a local Shared Records data store

  1. Create a local directory, referred to as LOCAL_DATASTORE
  2. Ensure that the local directory is writeable
  3. Edit the runtime configuration file
    1. open "org.sharedrecords.web.rest/WebContent/WEB-INF/config/org.sharedrecords.properties"
    2. property org.sharedrecords.core.FileStoreRoot=LOCAL_DATASTORE
    3. property org.sharedrecords.core.DataStoreMode=local

Test

  1. Right-click the "org.sharedrecords.web.rest" project
  2. Select "Run As->Run on Server"
  3. Leave the "Choose an existing server" radio button selected
  4. Click "Finished"

You should now have a basic Shared Records server running at the endpoint  http://localhost:8080/records/ .

Deploy

  1. Right-click on a servlet project
  2. Select "Export->WAR file"
  3. choose an output directory and name of the file
    • Note that the name of the war file is typically the root of the endpoint.
    • Recommended name for REST api: records.war
    • Recommended name for Token servlet: tokens.war