...
Prerequisites
7 4 6 is built and tested using Java |
7, and uses some Java 7+ features 4 6 build uses Maven. |
Git | The Fedora repositories are on Github |
Source Control
Fedora users uses git, hosted on GitHub, for version control. You can find the main repository at http://github.com/futuresfcrepo/fcrepo4fcrepo.
Setting up your IDE
Eclipse Setup
- m2e Connector
- EGit or JGit plugin
- Sonar plugin - config tbd.
- Set your Eclipse preferences, see fcrepo4 fcrepo/src/site/eclipse/README.md
Style Guide
There is a style guide, which should prevent some extravagant commits full of formatting changes.
...
Use "mvn clean verify"
to run tests, "mvn clean install"
to build and install in local Maven repository (where it can be found by other local projects).
- When adding new classes, they should probably not go in the kernel. Look for a submodule or separate project that's appropriate for the functionality you're adding. Ask if it's not clear where something should go.
- fcrepo-http-api (https://github.com/futuresfcrepo/fcrepo4fcrepo/tree/mastermain/fcrepo-http-api) is a good example to follow when setting up new modules (though new modules should be in a separate repo, not in fcrepo4).
- Logging output can be configured using System properties. In general, stacktraces, RDF graph dumps and other verbose output should be logged at DEBUG or higher log level, even in tests. WARN and ERROR should be reserved for unhandled exceptions, failures to persist data, and other repository errors (not client errors that have been successfully handled and reported to the client).
Dynamic build properties
Integration tests use Build Helper Maven Plugin to dynamically generate configuration properties. This is used to automatically detect and configure unused ports for several server components. All dynamically generated properties should have the word "dynamic" in their name.
Code Block |
---|
language | xml |
---|
title | Example usage |
---|
|
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<configuration>
<portNames>
<portName>fcrepo.dynamic.test.port</portName>
<portName>fcrepo.dynamic.jms.port</portName>
<portName>fcrepo.dynamic.stomp.port</portName>
<portName>jetty.dynamic.stop.port</portName>
</portNames>
</configuration>
</plugin> |