Prerequisites

Java 11Fedora 6 is built and tested using Java 11
Maven 3The Fedora 6 build uses Maven.
GitThe Fedora repositories are on Github

Source Control

Fedora uses git, hosted on GitHub, for version control. You can find the main repository at http://github.com/fcrepo/fcrepo.

Setting up your IDE

Eclipse Setup

  1. m2e Connector
  2. EGit or JGit plugin
  3. Sonar plugin - config tbd.
  4. Set your Eclipse preferences, see fcrepo/src/site/eclipse/README.md

Style Guide

There is a style guide, which should prevent some extravagant commits full of formatting changes.

Build - Maven

Committing Code

  • 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/fcrepo/fcrepo/tree/main/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.

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>
  • No labels