Building from within Eclipse
There are instructions for creating and deploying the Shared Records REST Servlet through Eclipse. This can also be done through the command line on the target server, those instructions can be found here. If you want to build and deploy the archive remotely (on a client machine), these instructions will walk you through the teps.
Prerequisites
- Eclipse IDE
- Shared Records Eclipse source project
- Apache ANT
- A Java Application Server
Instructions
You will be working with the following project files:
- etc/buildWAR-eclipse.xml - apache ANT build file for creating the Shared Records servlet war
- etc/org.sharedrecords.properties - configuration file for the server
- Edit etc/org.sharedrecords.properties
- Ensure that the server is configured for local storage
- org.sharedrecords.core.DataStoreMode=Local
- Change the location of the local storage as appropriate for your target install
- Windows: org.sharedrecords.core.FileStoreRoot=C:\\Program Files\\SRA\\data_store\
- Unix: org.sharedrecords.core.FileStoreRoot=/var/SRCDataStore
- Note: the application host must have read/write privileges
- Ensure that the server is configured for local storage
- Build the war file
- Right click on buildWAR-eclipse.xml
- Select "Run As --> Ant Build"
- This will run the ant script for the default task, build-in-place, which will build the war.
- The resulting WAR file will be placed in the base directory of the project.
- NOTE: The ANT script will temporarily move your SVN folder to create the WAR without including all of the SVN markup files. If for some reason the ANT process fails to complete, your SVN files will not be copied into your workspace properly. In order to copy for the files back in, run the ANT task restore-svn. This task is normally run by the the build-in-place task after the WAR has been created.
- Deploy the WAR file
- Deploy on Sun Java System Application Server
- Deploy on Tomcat
- Test the new deployment
- Change the URL against which the tests run
- Edit org.sharedrecords.tests.GlobalTestVars?
- Change the value of the string targetURL to match the URL where your server is deployed
- Run the unit tests
- Right click on
- Change the URL against which the tests run
Run the org.sharedrecords.tests.storageprovider.RemoteStorageProviderTest? to verify that your server was correctly deployed.
