...
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:
- Download an executable jar file for the release
- Launch the jar file by double-clicking on it or typing "java -jar filename" in the command line
Install in Tomcat:
- Install tomcat
- Download a pre-built war file for the file system federation
- Copy that war file into the webapps directory of your tomcat installation
- 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 | ||
---|---|---|
| ||
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 indirectoryPath
).
Install the fcrepo-jcr artifacts to your local maven repository:
Code Block | ||
---|---|---|
| ||
cd fcrepo4/fcrepo-jcr
mvn clean install |
Run the web application in jetty:
Code Block | ||
---|---|---|
| ||
cd fcrepo/fcrepo-webapp
mvn clean jetty:run |
Browse your home directory through fedora at http://localhost:8080/rest/home