Old:Updating the Codebase

From Dryad wiki
Jump to: navigation, search

How to update the code that runs a particular Dryad instance.

The Dryad source code is implemented as an overlay to DSpace.

Building a new release involves checking out the dryad-master branch from the Dryad code repository and manually building it:

git clone git@github.com:datadryad/dryad-repo.git
cd dryad-repo/dspace
git pull
sudo mvn clean package -P env-dev
cd target/dspace-1.7.3-SNAPSHOT-build.dir/
sudo ant -Doverwrite=true update

Alternately, you can use Jenkins. For example, on http://dev.datadryad.org, Jenkins is configured to automatically rebuild when there is any change to the dryad-dev branch.

Jenkins should tell you that the build has succeeded. If it fails, it may just be that Tomcat failed to start. Consult the build log, titled "Console Output", also on the upper left side of the Jenkins screen for more details about the build (logs, warnings, exceptions, etc.)

Updates to static web resources

Cocoon maintains an application-level cache for static web resources, for example, the Javascript and CSS files served as part of the current theme. This cache affects both the versions of the files that are forwarded to Tomcat, Apache, and the end user's browser, as well as the HTTP headers returned with the files.

This cache is in place to limit the use of system resources by Cocoon/Tomcat at runtime, and is configured in the sitemap file that specifies how static resources should be handled. For example, the Mirage theme is currently configured to cache Javascript files for an hour, according to the following

<map:parameter name="expires" value="access plus 1 hours"/>

In DSpace 1.8 an update to the Control Panel was implemented to manually expire the application cache for static resources. Prior to DSpace 1.8, the static resource cache may be cleared by restarting Tomcat and removing cache directories, as indicated here:

Clearing Cocoon (XMLUI) cache