Versions Compared

Key

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

...

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.

Code Blocknoformat
collapsetrue
[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.

...

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

Panelnoformat

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:

Panelnoformat

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

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 -Dmaven.test.skip=true
    • skips all unit tests

...