Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

To easily test this feature during the install fest, we've built a sample war file that exposes a federation over the home directory of the user account under which the application is running.

Quick View:

  1. Download an executable jar file for the release
  2. Launch the jar file by double-clicking on it or typing "java -jar filename" in the command line

Install in Tomcat:

  1. Install tomcat
  2. Download a pre-built war file for the file system federation
  3. Copy that war file into the webapps directory of your tomcat installation
  4. When tomcat's running you can browse your home directory online at: http://localhost:8080/fcrepo-webapp-home-directory-federation-4.0.0-alpha-3-SNAPSHOT/rest/home

Build

...

from source:

Currently the configuration (which specifies which files to expose at what path) can only easily be edited before the application is compiled.  The following instructions explain the process of configuring, building

Requires Git, Maven 3, Java 7.

Get the source code:

Code Block
languagebash
git clone https://github.com/futures/fcrepo4.git

Update the repository configuration (fcrepo4/fcrepo-http-commons/target/classes/config/rest-sessions/repository.json) to include the following lines after the node-types definition (add a comma):

Code Block
"externalSources" : {
      "home-directory" : {
        "classname" : "org.modeshape.connector.filesystem.FileSystemConnector",
        "directoryPath" : "${user.home}",
        "projections" : [ "default:/home => /" ],
        "readOnly" : true,
        "addMimeTypeMixin" : true
      }
    }
  • The directoryPath parameter specifies the base directory of the filesystem that is accessible to fedora.
  • The projections parameter creates one or more mappings from a repository path to a filesystem path (relative to the base directory specified in directoryPath).

Install the fcrepo-jcr artifacts to your local maven repository:

Code Block
languagebash
cd fcrepo4/fcrepo-jcr
mvn clean install

Run the web application in jetty:

Code Block
languagebash
cd fcrepo/fcrepo-webapp
mvn clean jetty:run

Browse your home directory through fedora at http://localhost:8080/rest/home