Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

Info
titleFedora now builds with Maven

As of version 3.3, Fedora is now built with Maven instead of Ant.  This document describes how to build Fedora 3.3 from source -- instructions for building Fedora 3.2.x are still available here.

Prerequisites

See the release notes for the most up to date information on the prerequisites

...

You must install Maven on your build platform (or use an IDE like Eclipse that has Maven integrated into it) as a prerequisite for building from source. There are a number of options for installing Maven and most will work for building from source. DuraSpace currently maintains a Maven repository for several critical third party libraries that are not provided in Maven Central, the software supplier's repository or one of several large, stable public repositories. However, because of licensing, DuraSpace cannot store a copy of some resources, notably some key Oracle (formerly Sun) Java libraries. Libraries (and dependencies) change with each release. Your customizations may also cause a change in dependencies. If you encounter a build error such as the one shown below, follow the instructions to obtain a copy of the dependency and install it in your local Maven repository.

true
Code Block
collapse
No Format
[INFO] Unable to find resource 'javax.resource:connector-api:jar:1.5' in repository central (http://repo1.maven.org/maven2)
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.

Missing:
----------
1) javax.resource:connector-api:jar:1.5

  Try downloading the file manually from the project website.

  Then, install it using the command: 
      mvn install:install-file -DgroupId=javax.resource -DartifactId=connector-api -Dversion=1.5 -Dpackaging=jar -Dfile=/path/to/file

  Alternatively, if you host your own repository you can deploy the file there: 
      mvn deploy:deploy-file -DgroupId=javax.resource -DartifactId=connector-api -Dversion=1.5 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

  Path to dependency: 
        1) org.fcrepo:fcrepo-common:jar:3.5-SNAPSHOT
        2) org.fcrepo:mulgara-core:jar:2.1.4
        3) javax.resource:connector-api:jar:1.5

----------
1 required artifact is missing.

...

Building the Installer

To build the installer, at a command prompt, enter:panel

No Format

mvn clean install

...

 -Dintegration.test.skip=true

This will take a long time to run the first time, since many dependent libraries must be loaded from various maven repositories if they're not already present on your system. When finished, you'll find the installer at:

No Format

Panel
java -jar
fcrepo-installer/target/fcrepo-installer-VERSION.jar

Please ensure that the user account that is running the installer has sufficient permissions to write to the directories where Fedora will be installed (if deploying to an existing Tomcat installation, this includes permissions to the Tomcat directory). For more information on the Installer, see the Installation instructions in the Installation and Configuration Guide.

Other useful build targets in the source distribution include:

Panel
  1. mvn clean install
    • builds all source code
    • runs all unit & integration tests
  2. mvn install -Dintegration.test.skip=true
    • runs all unit tests
    • skips all integration tests
  3. mvn install -Dmaven.test.skip=true
    • skips all unit tests
  4. Wiki Markup
    mvn integration-test \-P config\[A\|B\|C\|Q\]
    • runs system tests per given configuration.  For details on what each system test does, see the README at the root of the source distribution.

Back to Installation and Configuration Guide

...