If you are looking for ways to override specific classes or resources in DSpace (specifically in the backend), this page provides a guide for how to do so.

Additions module

Location: [dspace-source]/dspace/modules/additions/

This module may be used to store dspace-api changes, custom plugins, etc. Classes placed in [dspace-source]/dspace/modules/additions will override those located in the [dspace-source]/dspace-api

This module may be used to override classes across all webapps located in [dspace-source]/dspace/modules/ directory, as well as in the command line interface.  Therefore, this modules is for global overrides only. If you have overrides specific to a single webapp, use the "Maven WAR Overlays" option below.

Server Webapp Overlay

Location: [dspace-source]/dspace/modules/server/

This module overlay directory allows you to override any classes, resources or files available (by default) in the Server Webapp.  This includes overriding files of any of the following source directories:

Java classes place in [dspace-source]/dspace/modules/server/ will override classes (of the same path/name) in any of the above modules.

You can also override resources (i.e. any files under a /src/main/resources/ directory) which are embedded in one of the JARs by putting them under [dspace-source]/dspace/modules/server/src/main/resources/.  For example, to override the "[dspace-source]/dspace-oai/src/main/resources/templates/index.twig.html" file embedded in the dspace-oai.jar, you'd place your own version at [dspace-source]/dspace/modules/server/src/main/resources/templates/index.twig.html. This results in the resource/file being copied over into the WEB-INF/classes/ subdirectory of the "server" webapp, and in that location it will override any file of the same name embedded in a JAR (per Servlet Spec 3.0).

Rest (Deprecated) Webapp Overlay

Location: [dspace-source]/dspace/modules/rest

If you have chosen to install the deprecated REST API v6 webapp, you can similar override any classes/files of that separate webapp by just placing those files in the [dspace-source]/dspace/modules/rest/ directory