Table of Contents
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:
- RecommendedDeveloperEnvironment#JavaDevelopmentEnvironment
- RecommendedDeveloperEnvironment#ServerDeploymentEnvironment
Checkout
- launch Eclipse
- create a new workspace
- open the "SVN Repository" perspective
- 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
- enter the root repository URL noted in the SubversionRepositoryGuide?
- click "Finish"
- if an "Accept Digital Authority" dialog appears, click "Accept Permanently" to accept the certificate
- your username and password is the same as your trac username/password
- expand the repository
- expand the path: <root>/java/core/Core/
- expand the path: <root>/java/server/RestServlet/
- expand the path: <root>/java/server/TokenServlet/
- checkout the core project
- right-click <root>/java/core/Core/trunk, then select "Checkout..."
- review the project settings, then click "Finish" on the "Checkout from SVN" dialog box
- in the same way, checkout the REST servlet from <root>/java/server/RestServlet/trunk
- also checkout the Token servlet from <root>/java/server/TokenServlet/trunk
Configure Runtime
Create a Tomcat runtime for testing
- Right-click the "org.sharedrecords.web.rest" project
- Select "Properties"
- In the section listing on the left, select "Targeted Runtimes"
- Click "New..."
- Expand the "Apache" listing, select the version of Tomcat you have installed
- Leave the "Also create a local server" checkbox checked
- Click "Next"
- Enter the "Tomcat installation directory:", to match CATALINA_HOME
- Click "Finish" to dismiss the dialog
- Select the newly created server runtime
Create a local Shared Records data store
- Create a local directory, referred to as LOCAL_DATASTORE
- Ensure that the local directory is writeable
- Edit the runtime configuration file
- open "org.sharedrecords.web.rest/WebContent/WEB-INF/config/org.sharedrecords.properties"
- property org.sharedrecords.core.FileStoreRoot=LOCAL_DATASTORE
- property org.sharedrecords.core.DataStoreMode=local
Test
- Right-click the "org.sharedrecords.web.rest" project
- Select "Run As->Run on Server"
- Leave the "Choose an existing server" radio button selected
- Click "Finished"
You should now have a basic Shared Records server running at the endpoint http://localhost:8080/records/ .
Deploy
- Right-click on a servlet project
- Select "Export->WAR file"
- 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
