Skip to content

Building the Rosa Project

jabrah edited this page Oct 26, 2016 · 3 revisions

##Common build scenarios Build for production server

mvn clean install

Build for test server (rosetest) [optional, set image endpoint to test server as well]

mvn clean install -Diiif.pres.host=rosetest.library.jhu.edu [-Diiif.image.host=rosetest.library.jhu.edu]

Build project, but do not copy archive metadata or generate search index

mvn clean install -Dindex.phase=none -Dcopy.metadata.phase=none -Dweb.archive=/mnt/archive

Build with non-default artifact names

mvn clean install -Diiif.pres.prefix=<new-iiif-pres-name> 
mvn clean install -Diiif.image.prefix=<new-image-name> 
mvn clean install -Drose.name=<new-rose-name> -Dpizan.name=<new-pizan-name>

##Dependencies The Rosa project is built using Java 8 and the Java based build tool, Maven. It uses Git for version management. These tools must be installed on your machine before you can perform a build.

Parts of this project are dependent on an external dependency not in a Maven repository. In order to get this dependency, currently, you must clone its Github repo and use Maven to build it and put the artifact into your local maven repository.

git clone https://github.com/jhu-digital-manuscripts/lucene-latin-stemmer.git
cd lucene-latin-stemmer/
mvn install

Part of the build requires a connection to the archive. By default, these parts will look for such a connection at the directory /mnt/archive

##Build

mvn install

The standard Maven build is all that is needed to initiate a build. Many properties in this project can be modified at the time of the build through the command line. Some properties are shared among all modules that produce a deployable artifact, some other properties only apply to specific modules.

To configure properties in Maven, you can just set a system property on the command line. Any number of these properties can be specified for any given build.

mvn clean install -D<prop.name>=<prop.val>

Example:
mvn clean install -Darchive.path=/mnt/archive -Dindex.phase=none

###Shared Build Properties

  • archive.path : for the build, this defines the location of of the data archive. By default, this is set to /mnt/archive
  • index.phase : this property defines the Maven lifecycle phase during which the search index is generated. Set this to none if you want to disable the search index generation during build. Default: generate-resources
  • copy.metadata.phase : the Maven lifecycle phase during which metadata is copied from the archive. Set this to none if you want to disable the copying of archive metadata. Default: generate-resources

You can unbind the task that copies metadata from the archive to the WAR file or the task that generates the search index by setting the respective ‘phase’ to none.

mvn clean install -Dindex.phase=none -Dcopy.metadata.phase=none

###IIIF Presentation Endpoint properties These properties are designed to be useful only to the rosa-iiif-presentation-endpoint module. Other modules will ignore these properties.

  • iiif.pres.scheme : URL scheme for the IIIF presentation endpoint. Default: http
  • iiif.pres.host : host name for the IIIF presentation endpoint. This should be changed to match the hostname of the server. Default: jdm.library.jhu.edu
  • iiif.pres.port : port. Default: 80
  • iiif.pres.prefix : name of the deployed artifact. Default: iiif-pres
  • iiif.image.scheme : URL scheme of the IIIF image endpoint. Default: http
  • iiif.image.host : hostname for the IIIF image endpoint. Default: jdm.library.jhu.edu
  • iiif.image.port : Default: 80
  • iiif.image.prefix : name of the deployed artifact. Default: iiif-image

###Manuscript Sites properties These properties are designed to be useful for the manuscript sites. Some will apply to all manuscript sites, others will apply to only specific sites as noted in the property description.

  • fsi.url : URL of the FSI server. This must be formatted as a URL and end with a forward slash ‘/’. Default: http://fsiserver.library.jhu.edu/
  • rose.name : name of deployed artifact for the Rose site. This does not change the generated WAR file, but does change the paths where the webapp looks for data. Default: rose
  • pizan.name : name of the deployed artifact for the Pizan site. This does not change the generated WAR file, but does change the paths where the webapp looks for data. Default: pizan