Archived / Obsolete Documentation

Documentation in this space is no longer accurate.
Looking for official DSpace documentation? See all documentation

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

Build and deployment instructions for services-api (development)

DSpace source modifications (temporary)

The following changes cannot be committed and should just be made locally.

dspace pom.xml

Alter the dspace pom.xml (the one next to the module directory that is responsible for creating the install directory), NOT the dspace-parent pom.xml.

Replace the following dependency:

<!-- This dependency ensures DSpace OAI JAR is added to [dspace]/lib/,
        so that the 'dspace oai' launcher.xml command works.  -->
<dependency>
       <groupId>org.dspace</groupId>
       <artifactId>dspace-oai</artifactId>
       <type>jar</type>
       <classifier>classes</classifier>
</dependency>

by the following dependency

<dependency>
    <groupId>org.dspace.modules</groupId>
    <artifactId>additions</artifactId>
</dependency>

This is needed because the dspace-oai module currently doesn't compile and without this we cannot create an installation directory.

build.xml file

In order to be able to perform a fresh_install with ant we need to remove the "test_database" depends from the fresh_install target. This should be on or around line 861 in the standard build.xml

The DatabaseUtils is currently broken because I'm unsure of how to fix it at the current time.

Before:

<target name="fresh_install"
        depends="init_installation,init_configs,test_database,install_code"
        description="Do a fresh install of the system, overwriting any data">

After:

<target name="fresh_install"
        depends="init_installation,init_configs,install_code"
        description="Do a fresh install of the system, overwriting any data">

Postgres changes

Enable pgcrypto extension

In order to generate UUID identifiers in postgres an extension module is required.

  • Start by installing the "pgcrypto" module
  • Connect to the database using user postgres
  • Run the following command: "CREATE EXTENSION pgcrypto;"
  • The output of the command if successful is blank, so you can always try to run "SELECT gen_random_uuid();" which should return a result.

Maven build instructions

Since not all the modules are currently compiling (the only operations ones are dspace-api, dspace-services, dspace-xmlui) a special command is needed to build everything:

mvn clean package -P -dspace-oai,-dspace-jspui,-dspace-rdf,-dspace-sword,-dspace-swordv2,-dspace-rest,dspace-services

Ant update

Don't forget to ant update/fresh_install before starting up tomcat again.

Starting tomcat

Create a database backup before starting the tomcat, as it will trigger a migration.

Before starting tomcat it is best to set a breakpoint in the org.dspace.core.HibernateFlywayIntegrator class on line 72 (this catches SQL exceptions caused by flyway & will be useful information if it fails).

  • No labels