Contribute to the DSpace Development Fund
The newly established DSpace Development Fund supports the development of new features prioritized by DSpace Governance. For a list of planned features see the fund wiki page.
This document is intended to be kept up to date by the DSpace Release Managers. It details the steps necessary to perform snapshot and official releases of DSpace and supporting Modules.
Table of Contents
Useful Sonatype Links
For lack of a better place at this time, here's some useful pages on Sonatype which detail the Sonatype Maven Release Process:
Release Numbering Convention
major.minor.subminor (e.g. 1.7.0)
- Increment major (e.g. 1.x.x -> 2.x.x) for major architectural changes
- Increment minor (e.g. 1.7.x -> 1.8.x) for feature changes and minor architectural changes (database schema, translations, APIs may change, though we'll try and keep API changes as small as possible, and will always provide an upgrade/migration path)
- Increment subminor (e.g. 1.7.0 -> 1.7.1) for bug-fix only releases (database, translations and core APIs stable)
The one exception is that the Language Packs (dspace-api-lang
and dspace-xmlui-lang
) use the numbering convention major.minor.subminor.sequence-number (e.g. 1.7.0.0). This allows us to release new versions of the language packs more frequently than normal DSpace releases.
Prerequisites
Verify Release Privileges
To perform a release, you must have all of the following:
- Write access to the DSpace subversion repository hosted at http://scm.dspace.org/svn/repo; This requires an administrator to add you to the svn repository permissions via the TRAC user group.
- Write access to the org.dspace groupId in the snapshot and staging repositories hosted at oss.sonatype.org. If you don't already have this, you will need to:
- Sign up for a Sonatype JIRA account. This account will also serve as your login to the Sonatype OSS system
- Ask the previous release manager to request authorization for this account via the Sonatype JIRA system in the Open Source Project Repository Hosting project. Once Sonatype gives you the proper authorization, you should be able to login to the Sonatype OSS system using the same login/password you setup in Sonatype JIRA.
- The full details of signing up and getting access to Sonatype are also posted online here: Sonatype Maven Repository Usage Guide
- You must generate and publish your own personal Code Signing Key (required by Sonatype). Here are two sites that give hints on how to do that:
- Creating a Code Signing Key
- How to Generate PGP Signatures with Maven (required for all Sonatype releases)
- Make sure to publish your Key file to
hkp://pgp.mit.edu
, as this is the Key Server Sonatype uses for verification:(e.g.)
gpg --keyserver hkp://pgp.mit.edu --send-keys [yourKeyID]
- You can see if your key is already on that Key Server by visiting http://pgp.mit.edu and searching on your name
- Write access to projects.dspace.org (which is where the DSpace Projects website is hosted)
- Ask the previous release manager (or someone else with access) to be given access to this server.
- Include your proposed username
- Include a local SSH Public Key (which will be used for authentication).
Setting up a new person with proper access to projects.dspace.org
Here's notes from Mark Diggory on how to give someone else access to the OSUOSL server (projects.dspace.org):
- adduser -m <user-name>
- Add authorized key to
~/.ssh/authorizedkeys
(make sure permissions are correct on file) - Add user to /etc/groups
maven:x:4002:peterdietz,esm,mdiggory,tdonohue,ben,kim,apache
- Make sure
umask 002
is in the users~/.bash_profile
so maven permissions are written correctly.
Update Maven settings.xml
DSpace's root pom.xml already has the correct staging and snapshot repositories listed in the OSS parent's '<distributionManagement>' section. In order to deploy, you will need to add your Sonatype OSS username and password to your local ~/.m2/settings.xml
file:
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"> <servers> <!--Login info for Sonatype SnapShot repository--> <server> <id>sonatype-nexus-snapshots</id> <username>YourSonatypeUsername</username> <password>YourSonatypePassword</password> </server> <!--Login info for Sonatype Staging/Release repository--> <server> <id>sonatype-nexus-staging</id> <username>YourSonatypeUsername</username> <password>YourSonatypePassword</password> </server> <!--Login info for DSpace Projects (projects.dspace.org) website @OSUOSL--> <server> <id>website</id> <username>YourOSUOSLUserName</username> <privateKey>[Full-path-to]\.ssh\id_rsa</privateKey> <passphrase>YourKeyPassphrase (if necessary)</passphrase> </server> </servers> </settings>
If you don't yet have a ~/.m2/settings.xml
file, you should create one, and copy the full contents above (obviously make sure to put in your username and password).
Avoid Using Maven 2.1.0 or 2.2.0
Make sure you're using a recent version of Maven. As of this writing, the latest was 2.2.1, and it worked fine. In particular, avoid version 2.2.0: it has a serious bug that affects deployments: MNG-4235. Maven 2.1.0 also is problematic, as it produces improper GPG signatures.
For more information see the Prerequisites section of the Sonatype Maven Repository Usage Guide
Making a Snapshot Release (e.g. 'dspace-x.y.z-SNAPSHOT')
One Step Process
From a clean, up-to-date copy of trunk/branch, run the following command:
mvn clean javadoc:jar source:jar deploy
You will have to enter in your GPG passphrase (which you established when you created your Code Signing Key).
The snapshot will be immediately available in the public Sonatype repository: http://oss.sonatype.org/content/groups/public
Making an Official Release (e.g. 'dspace-x.y.z' or 'dspace-x.y.z-rc1')
For More Information
These same steps are also covered in the Sonatype Maven Repository Usage Guide
Release DSpace Language Packs (I18N)
If possible, you should release the DSpace Language Packs (i18n modules) before the main release. Oftentimes, it's best to release these one or two days prior to the DSpace release (that way they've already propagated out to the Maven repository).
At the moment the i18n modules are maintained in SVN under the modules
folder:
http://scm.dspace.org/svn/repo/modules/
There are currently two i18n modules you will need to release:
dspace-api-lang
dspace-xmlui-lang
Version Numbering Convention for Language Packs
Note that the version numbering convention for Language Packs is always the same as the current DSpace release, with an additional .<sequence-number> (e.g. the i18n modules for the 1.7.0 release are numbered as follows: 1.7.0.0, 1.7.0.1, etc.)
For each module, perform the full release steps that follow. To save space, the steps are only listed for one of the modules (but don't forget to run it for both language packs):
- Checkout Language Pack Module:
svn co https://scm.dspace.org/svn/repo/modules/dspace-api-lang/trunk dspace-api-lang
- Do a Dry Run:
mvn release:prepare -DdryRun=true
- Tag and Increment Version:
mvn release:prepare -Dresume=false
- Make sure to assign a version number of the format: major.minor.subminor.sequence-number (e.g. 1.7.0.0, 1.7.0.1, etc for 1.7.0 releases of language packs)
- Deploy Artifacts to Staging in Sonatype:
mvn release:perform
- Verify and Release Staged Artifacts in Sonatype (see instructions at link)
Final Commits & Preparation
Double Check Language Packs' Version Ranges
Once the Language Packs are released, you may need to modify the DSpace Parent pom.xml (http://scm.dspace.org/svn/repo/dspace/trunk/pom.xml) to reference the new version of the Language Packs. This should be similar to the following:
If possible, you'd only want to commit this after the i18n modules are available in the Maven Repository. But, if you are in a rush, you can commit this change earlier (though be warned that this will break the build process for anyone who hasn't manually installed the i18n modules to his/her local ~/.m2/
directory).
In the main pom.xml, provide the proper version range for each language pack. In the below example, we are saying to use any language pack version which is at least version 1.7.0.0, but is less than version 1.8.0.0:
<dependency> <groupId>org.dspace</groupId> <artifactId>dspace-api-lang</artifactId> <version>[1.7.0.0,1.8.0.0)</version> </dependency> <dependency> <groupId>org.dspace</groupId> <artifactId>dspace-xmlui-lang</artifactId> <version>[1.7.0.0,1.8.0.0)</version> <type>war</type> </dependency>
Ensure Documentation is Updated Appropriately
Hopefully, you've already been talking with others about getting Documentation updated!
You should also double check that the following "main pages" are updated in the Documentation:
- Preface - Should contain a very basic overview of the Release. Make sure the Release number is updated here!
- NOTE: For Subminor releases (bug-fix-only releases), you may want to leave all information about the previous major release, and just enhance the content to state that this was a bug-fix release, and list any new contributors, etc.
- Installation - Obviously make sure the Installation Documentation is updated for this Release
- Upgrading a DSpace Installation - Same for the Upgrade Documentation, make sure it's up to date
- History - Make sure the History for this latest Release is included. You should be able to just edit the page, copy the fancy code that generated the history for another release, and update the version numbers. For example, copy the previous release's History section and change the release numbers as follows:
- You'll notice all the release History is generated via the
jiraissue
plugin. In theurl
argument for that plugin, you should find the DSpace version number embedded in the querystring like: "... AND+fixVersion+%3D+%221.7.0%22 ..." If you look closely, you'll see the 'fixVersion' is set to "1.7.0" in that search string. All you should need to do is update that version number! - Also make sure to update the
title
argument for thatjiraissue
plugin to list the proper version number information
- You'll notice all the release History is generated via the
Obviously, this is just a brief reminder of important areas of Documentation which always require updates. There's surely other areas, like Configuration, which will require some updates for your release.
Ensure HTML & PDF versions of Wiki Documentation is in SVN
Make sure the latest Wiki-based Documentation has been exported as HTML and PDF and committed to [dspace-src]/dspace/docs/ in SVN.
How to Generate PDF Documentation
To generate the PDF document, use the "Scroll Wiki Exporter" option (Tools -> Scroll Wiki Exporter) from the splash page of the Wiki Documentation.
- On "Document Information" Tab
- Title: "DSpace Documentation"
- Authors: "DSpace Developers"
Version: [DSpace version number]
- On "Formatting" Tab:
- Format: "PDF"
- Theme: "DSpace"
- Make sure to select the checkbox next to all of the following options:
- Create Table of Contents - generates a table of contents page at beginning of PDF
- Ignore
toc
macros - ignores all Table of Contents on individual pages - Ignore
children
macros - ignores any child page listings on individual pages
- Finally, click the "Export>" button
How to Generate HTML Documentation
To generate the HTML document, just use the normal HTML export:
- Go to Browse -> Advanced, Click on "HTML Export"
- Make sure to deselect the "DSpace Documentation" Homepage (top page), as this is not officially part of the DSpace Documentation (it's just a splash page). Instead, select the "DSpace System Documentation" page as the main page (this should also auto-select all other pages below it).
- Make sure to also deselect the "Include comments" option, as they are not officially part of the DSpace Documentation
- Finally, click the "Export" button at the bottom.
- After generating the HTML Documentation, we'll want to do some minor HTML cleanup to make it look nicer.
- Edit the 'index.html' page. You'll want to clean up the following text to make it easier to understand:
- Near the top, replace the text "Space Details:" with "DSpace x.y.z Documentation"
- Remove the entire "<table>" at the top of the page which includes last modified & creation info. That table is not as useful outside of a Wiki context.
- Just after the <table>, replace the text "Available Pages:" with "Index:"
- The end result should look something like the HTML version of the DSpace 1.7.0 Documentation
- Edit the 'index.html' page. You'll want to clean up the following text to make it easier to understand:
Watch for conflicts when updating HTML Documentation in SVN
It's often easier to completely remove all current HTML content before committing the updated HTML content. Because of the HTML directory structure exported by Confluence, it can be very difficult to determine which files need removing (especially old attachments). So, you may want to completely remove the old HTML directory, before committing the updated content. An example follows:
- Delete old HTML docs: e.g.
svn delete http://scm.dspace.org/svn/repo/dspace/trunk/dspace/docs/html
(Or delete from branch, as appropriate) - Update your checked-out copy of Trunk/Branch:
svn up
Locally, recreate the
[dspace-source]/dspace/docs/html/
in your checked out copy of Trunk/BranchCopy new HTML docs to
[dspace-source]/dspace/docs/html/
, so that theindex.html
file is athtml/index.html
- Commit new docs back to SVN
Double Check Contents of all README (and similar) files in SVN
Make sure that the contents of all README, LICENSE, NOTICE files are up-to-date in SVN. Most of these files exist in one of two main locations:
- [dspace-src]
- includes LICENSE, NOTICE and README files
- [dspace-src]/dspace/
- includes CHANGES, KNOWN_BUGS, LICENSE, NOTICE and README files
If anything is out-of-date, make sure to update it and commit the proper changes before continuing.
Checkout Trunk or Branch to Release
Checkout a copy of the to-be-release version either from a branch or trunk.
svn co https://scm.dspace.org/svn/repo/dspace/trunk dspace-release
Do a Dry Run
This step is not required, but performs a useful sanity check without committing any changes. From your clean, up-to-date copy of trunk/branch, run the following command (from [dspace-src]
):
mvn release:prepare -DdryRun=true
You will have to enter in your GPG passphrase (which you established when you created your Code Signing Key).
If you notice an issue or an error occurs, you can re-run the Dry Run using the following command:
mvn release:prepare -DdryRun=true -Dresume=false
Tag and Increment Version
This step will set the version declared in the project's pom.xml files, commit the changes to trunk/branch, tag the release, and finally, check in the trunk/branch change that increments the next development version (e.g. x.y.z-SNAPSHOT) in the pom.xml files.
mvn release:prepare -Dresume=false
(Optionally, you may also include the parameters -Dusername=YourSVNUsername -Dpassword=YourSVNPassword
at the end of the above command, though I've not found these to be necessary)
The above command will ask you three basic questions. Here are sample answers for DSpace 1.7.0:
"What is the release version for: XXX" 1.7.0 "What is SCM release tag or label for: XXXX" dspace-1.7.0 "What is the new development version for: XXXX" 1.7.1-SNAPSHOT
You will also have to enter in your GPG passphrase (which you established when you created your Code Signing Key).
If you receive a project dependency error
This may fail to compile part way through the process, complaining that an internal project dependency is not met. If this occurs, don't worry. Just run the following:
mvn install
mvn release:prepare
Backing out of changes
If backing out of this step is needed for any reason, the following will restore the subversion repository and your working copy to the state it was previously in:
mvn release:rollback
svn rm https://scm.dspace.org/svn/repo/dspace/tags/dspace-x.y
Deploy Artifacts to Staging in Sonatype
This step will sign, checksum, and push all release artifacts (including javadocs and sources) to the Sonatype staging repository (http://oss.sonatype.org/). Run the following:
mvn release:perform
You should be prompted by Maven to specify your GPG passphrase (which you established when you created your Code Signing Key). If you run into any issues, it's possible to specify your GPG key and passphrase as arguments to the above command (e.g. -Darguments="-Dgpg.keyname=YourKeyId -Dgpg.passphrase=YourKeyPassword"
)
If you need to re-deploy
If any errors or problems occur during the deploy, you can re-run mvn release:perform
safely after fixing those issues (re-running it will just overwrite existing staged contents).
Verify and Release Staged Artifacts in Sonatype
For screenshots and more details on this step, visit the Sonatype Repository Usage Guide's section on Releasing your artifacts
- Login to http://oss.sonatype.org/
- Click "Staging Repositories" in the left column, then select the checkbox next to the staged repository on the right. The contents of it will open up at the bottom of the page.
- With the staged repository still selected, click the "Close" button at the top.
- Download and test that the artifacts in staging are exactly as they should be once deployed to central.
If You Need to Revert Back before Releasing
If anything is incorrect, select the staged repository and select "Drop". After the problem is resolved, you can re-deploy the artifacts to staging and verify them again. To re-deploy an already-tagged release:
mvn release:perform -Dtag=dspace-x.y -DconnectionUrl=scm:svn:
https://scm.dspace.org/svn/repo/dspace
-Darguments="-Dgpg.keyname=YourKeyId -Dgpg.passphrase=YourKeyPassword"
- If everything looks good, select the repository and select "Release". The artifacts should be synced to Maven central (http://repo2.maven.org/maven2/org/dspace/) within an hour.
Once Released, There is No "Undo" Option
Once you select "Release", there is no way to "undo" the release. If any major issues are found, you'll have to increment the version number and perform a new bug-fix release.
Create the Distribution Zips for SourceForge
The previous actions will have checked out the release tag into the target directory under [dspace-src]/target/checkout
. Navigate to that directory and execute the creation of the distributions using the following command. This will create two zip, bzip and gzipped files in the target directory. One set of files is the "binary" release, and the other set is the source release.
(Note: If you've already removed the target/checkout
directory, you can also checkout a fresh copy of the newly tagged version and run this command from the DSpace parent directory.)
localhost$ cd target/checkout localhost$ mvn package -Pdistributions [INFO] Scanning for projects... [INFO] ---------------------------------------------------------------------------- [INFO] Building DSpace Parent Project [INFO] task-segment: [package] [INFO] ---------------------------------------------------------------------------- [INFO] [site:attach-descriptor] [INFO] [assembly:single -(execution. default-)] [INFO] Building zip: .../target/dspace-1.5.0-beta1-release.zip [INFO] Building tar: .../target/dspace-1.5.0-beta1-release.tar.gz [INFO] Building tar: .../target/dspace-1.5.0-beta1-release.tar.bz2 [INFO] Building zip: .../target/dspace-1.5.0-beta1-src-release.zip [INFO] Building tar: .../target/dspace-1.5.0-beta1-src-release.tar.gz [INFO] Building tar: .../target/dspace-1.5.0-beta1-src-release.tar.bz2 [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESSFUL [INFO] ------------------------------------------------------------------------
Upload to SourceForge
Upload both the source and binary releases to Sourceforge.net. You can either upload them via the web interface, or copy them over via scp
or other command line tools. If you want to copy the files from command line, follow the directions found here: http://apps.sourceforge.net/trac/sourceforge/wiki/File%20management%20service
Using scp
to copy to the "DSpace Stable" file directory: (example for 1.7.0 final)
(NOTE: You will need to first create the 'DSpace Stable/1.7.0' directory via SourceForge's Admin UI)
scp <files> <username>,dspace@frs.sourceforge.net:"/home/frs/project/d/ds/dspace/DSpace\\ Stable/1.7.0/"
Using scp
to copy to the "DSpace Release Candidate" file directory: (example for 1.7.0-rc2)
(NOTE: You will need to first create the 'DSpace Release Candidate/1.7.0-rc2' directory via SourceForge's Admin UI)
scp <files> <username>,dspace@frs.sourceforge.net:"/home/frs/project/d/ds/dspace/DSpace\\ Release\\ Candidate/1.7.0-rc2/"
After the Release is Finished
Don't Announce Until Maven Packages Have Propagated
You must wait for all the packages to be available at http://repo2.maven.org/maven2/org/dspace/ before you announce the release. Until the DSpace packages are available in the Maven repository, no one else will be able to build DSpace using Maven.
- Add the new contributors to the list: DSpaceContributors
- Coordinate Announcements with DuraSpace Staff:
- Announcement on dspace.org, duraspace.org, twitter
- Ensure that the Latest Release page on dspace.org is updated.
- Plus, ask dspace.org admins to upload latest documentation in PDF/HTML format
- Announce on all DSpace mailing lists
- Link announcement on Home of DSpace Wiki, change any version numbers listed on that page.
- Update Wiki pages, particularly these pages which refer to the Current and Next Releases:
- CurrentRelease
- Next Release Status
- RoadMap
- NOTE: See DSpace Wiki Style Guide for notes on how to actually edit the above Redirect pages
- For major releases, create a new branch in SVN for any upcoming sub-minor releases:
- E.g., after 1.6.0 release, we created a 1.6.x branch for the subsequent 1.6.1 and 1.6.2 releases
- To automatically create a branch, you may be able to use the release:branch command (NOTE: untested, but it should work! once we test it out, this may be the best practice way of creating a branch).
- To manually create a branch, run a command similar to:
svn copy http://scm.dspace.org/svn/repo/dspace/trunk \ http://scm.dspace.org/svn/repo/dspace/branches/dspace-1_6_x \ -m "Creating a branch for 1.6.x bug-fix releases."
- Then, go back to your Trunk checkout, and make sure to update it's version numbers in the pom.xml files by running the following:
(Remember to enter in the next appropriate major version number. E.g. After releasing 1.7.0, Trunk should be updated to "1.8.0-SNAPSHOT", while the new 1_7_x branch should be at "1.7.1-SNAPSHOT")
mvn release:update-versions
- NOTE: the
update-versions
command doesn't always work perfectly. You will want to try a complete rebuild of DSpace before committing anything, as it sometimes misses updating a few version numbers.
- NOTE: the
- You'll also need to ensure that all version numbers and the
<scm>
section is appropriate in the pom.xml files of your new Branch. Remember, the<scm>
configurations should point at the branch, rather than back at Trunk.
- Then, go back to your Trunk checkout, and make sure to update it's version numbers in the pom.xml files by running the following:
- For major releases, make sure to create a new DuraSpace Bamboo Project to auto-build the new branch you created in SVN.
- Usually, it's easiest to just 'clone' the existing Trunk project, rather than starting from scratch.
- You'll want to name it something similar to "17BRANCH" (for 1.7.x branch).
- Updates to JIRA:
- Move any uncompleted issues to the next DSpace version tag in JIRA.
- Ask a JIRA Administrator to close out the release in JIRA (this will ensure no new issues can be added to that release).
Possible Errors you may Encounter
"Could not find model file" error (with language packs)
If you encounter one of these errors when building/packaging DSpace:
FATAL ERROR: "Reason: Could not find the model file '../dspace-xmlui-lang'. for project unknown"
OR
FATAL ERROR: "Reason: Could not find the model file '../dspace-api-lang'. for project unknown"
This is a known bug in Maven. The problem is that you likely have a 'dspace-xmlui-lang' or 'dspace-api-lang' folder at the same level as your [dspace-source] parent folder. Essentially, Maven located them and tried to add them into the build process (which it shouldn't have). The fix is to completely delete the 'dspace-xmlui-lang' and 'dspace-api-lang' folders, and try to rebuild DSpace.