Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: adding single quotes around the example of how to exclude individual modules


Panel

Contents

Table of Contents
outlinetrue
stylenone

Rebuild DSpace

Warning

...

The following directions are for DSpace versions from 1.5.x

...

up to 1.8.x. For DSpace 3 and above, see the official docs for the appropriate version (3.x, 4.x).

Directories:

  • [dspace] - The DSpace Installation directory
  • [dspace-source Code Block]/dspace/ - The DSpace Assembly project within the DSpace source code
  • [dspace-source Code Block]/dspace/target/dspace-[version]-build.dir/ - The directory where the DSpace Assembly project builds a new installation package for DSpace.
  • [Tomcat Code Block]/webapps/ (Mac OSX Server: Code Block/library/jboss/3.2/deploy)
  • Note: JBOSS comes pre-installed with Mac OS X server. However, for both server and desktop editions Tomcat may be used as with other platforms.

Quick Restart (Just restarts the web server after configuration changes*)

(*Exception - Changes to Messages.properties always requires a rebuild!)

  1. Stop Tomcat (WARNING: this will bring down the website)
    • (Linux / OS X / Solaris) [Tomcat]/bin/shutdown.sh
    • (Mac OS X Server) Use Server Admin to stop Tomcat ("Application Server")
    • (Windows) Use Tomcat Service Monitor (in Notification Area) to stop Tomcat
  2. Start Tomcat
    • (Linux / OS X / Solaris) [Tomcat]/bin/startup.sh
    • (Mac OS X Server) Use Server Admin to start Tomcat ("Application Server")
    • (Windows) Use Tomcat Service Monitor (in Notification Area) to start Tomcat

...

  1. Log on to the server DSpace is running on (e.g. ssh). Make sure to login as the user who initially installed DSpace!
  2. Open a command prompt (if you don't have one already), and Code Blockcd [dspace-source Code Block]/dspace/code
  3. mvn buildpackage (recompiles all DSpace code and rebuilds the DSpace installation package)code
  4. cd [dspace-source Code Block]/dspace/target/dspace-[version]-build.dir/ (move into the target directory where DSpace has been rebuilt)code
  5. ant update (updates your DSpace install based on the newly built content in your targetdirectory)
    • Alternatively, if you do not need to reinstall JAR files, you could instead run Code Blockant update_webapps (which just copies over web application changes to your [dspace])
  6. If you do not have Tomcat pointing at your [dspace Code Block]/webapps/ directory, you will also need to copy your final web application(s) into your [Tomcat Code Block]/webapps/directory.
    • Code Blockcp -R [dspace]/webapps/ [Tomcat Code Block]/webapps/
    • (For Mac OS X Server) Code Blockcp build/*.war /library/jboss/3.2/deploy
  7. Test your changes in DSpace

...

  1. Log on to the server DSpace is running on (e.g. ssh). Make sure to log in as the user who initially installed DSpace!
  2. Open a command prompt (if you don't have one already), and Code Blockcd [dspace-source Code Block]/dspace/
  3. Code Blockmvn clean buildpackage (removes all old compiled code and recompiles all DSpace code and rebuilds the DSpace installation package)code
  4. cd [dspace-source Code Block]/dspace/target/dspace-[version]-build.dir/ (move into the target directory where DSpace has been rebuilt)code
  5. ant update (updates your DSpace install based on the newly built content in your targetdirectory)
    • Alternatively, if you do not need to reinstall JAR files, you could instead run Code Blockant update_webapps (which just copies over web application changes to your [dspace])
  6. If you do not have Tomcat pointing at your [dspace Code Block]/webapps/ directory, you will also need to copy your final web application(s) into your [Tomcat Code Block]/webapps/directory.code
    • cp -R [dspace]/webapps/ [Tomcat Code Block]/webapps/
    • (For Mac OS X Server) Code Blockcp build/*.war /library/jboss/3.2/deploy
  7. Test changes in DSpace To force Tomcat to recompile everything, you may also wish to remove any DSpace related web application directories created in [Tomcat Code Block]/work/Catalina/localhost
  8. Start Tomcat
    • (Linux / OS X / Solaris) [Tomcat]/bin/startup.sh
    • (Mac OS X Server) Use Server Admin to start Tomcat ("Application Server")
    • (Windows) Use Tomcat Service Monitor (in Notification Area) to start Tomcat
  9. Test your changes in DSpace

Exclude individual modules

It doesn't happen often that someone needs all of the DSpace modules. Most prominent example are the web interfaces - most people need either JSPUI or XMLUI, but not both. You may cut down on build time by excluding unneeded modules. But beware, some modules have hidden interdependencies, so it's not always possible to exclude all modules. If a build fails, it may be for this reason. In that case try the full build again.

To build dspace without the JSPUI and LNI modules ("profiles" in Maven terminology), add this option to the Maven command:

Code Block
mvn package -P '!dspace-jspui,!dspace-lni'

The full list of DSpace modules that you may choose to exclude from the build include:

  • dspace-jspui (JSPUI)
  • dspace-lni (LNI)
  • dspace-oai (OAI-PMH)
  • dspace-sword (SWORD v.1)
  • dspace-swordv2 (SWORD v.2)
  • dspace-xmlui (XMLUI)