Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Adding instructions for adding the REST API module to a source code installation.

...

For both approaches you should have Apache Maven installed. Then proceed using Subversion and check out the code from http://scm.dspace.org/svn/repo/modules/rest/branches/dspace-rest-gsoc10/trunk

1) This way assumes you are running DSpace under Tomcat. Locate src/main/webapp/WEB-INF/web.xml (under directory you just downloaded DSpace REST API). Find variable named dspace-config and alter it to point to current location of dspace.cfg file of your DSpace instance. Position into the root directory of the REST API and type maven package. If everything goes well, in target directory will be packaged dspace.war. Use this file and deploy it to your current Tomcat instance. The application will be available under http://localhost:8080/rest/ by default.

...

Afterwards you can restart tomcat and visit the rest api in action at: http://localhost:8080/rest

(Option 3a) Install as a DSpace Module in a source code installation

Its unlikely you will want to do this unless you are a committer or just nosey like me and like to play around with the code.

1) Create a new directory for the REST module source code - dspace-src/dspace-rest.

2) Checkout the source code from http://scm.dspace.org/svn/repo/modules/dspace-rest/trunk into the new directory.

3) Incorporate the new module into your project by adding a new <module> element for dspace-rest to the 'all' profile in dspace-src/pom.xml.

4) Tell Maven to use your new local module by adding a new <profile> to dspace-src/dspace/pom.xml. If you don't do this the project will build okay but won't be using your local source code for that module.

5) Create a new directory dspace-src/dspace/modules/rest.

5a) Add a sub-directory src/main/webapp and a pom.xml to the directory created in 5. (Copy the pom from any other modules/xxxx module).

6) Add a <profile> to dspace-src/dspace/modules/pom.xml.

7) Rebuild your project.

Possible problems:

 - If you have troubles starting the application, try to check dspace-config variable and make it to point to location dspace.cfg using absolute addressing (take a look at commented line in configuration file).

...