This module was added in DSpace 3.0 and should be used to store dspace-api changes, custom plugins, ... Classes placed in
[dspace-source]/dspace/modules/additions will override those located in the dspace-api. This module will be used for all the webapps located in the
[dspace-source]/dspace/modules directory and in the command line interface. It is recommended to place all dspace-api changes in this module so the changes made are contained in a single module, making it easier to get an overview of changes made.
If you are using Tomcat 8 or later, the jar-files on a webapps classpath are not loaded alphabetically anymore. This means you need to explicitly instruct Tomcat to first load the additions.jar file, and after that all other jar-files (a technique called class shadowing). You can do this by adding the following to your webapp context XML file:
This dynamically (and virtually) puts the additions.jar (or any other jar you want) in the
Note that you need to do this for every DSpace webapp you deploy in Tomcat 8+.
Maven WAR Overlays
Much of the customisation described in the JSPUI and XMLUI customisation sections is based on Maven WAR Overlays. In short, any classes or files placed in
[dspace-source]/dspace/modules/* will be overlayed onto the selected WAR. This includes both new and amended files.