Versions Compared

Key

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

...

  • 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/fcrepo4/fcrepo4/tree/master/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
languagexml
titleExample 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>


Note

Some IDEs with Maven support might complain about the use of dynamic properties as they are not defined in the <properties> section of the POMs. See:

Jira
serverDuraSpace JIRA
serverIdc815ca92-fd23-34c2-8fe3-956808caf8c5
keyFCREPO-1341