Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Updates for 7.0 release

...

Release Numbering Convention

As of 2012 (starting with DSpace 3.0), DSpace has moved to a new release numbering scheme/format. Release numbers will now only consist of two numbers.

...

For more information see DSpace Release Numbering Scheme and the initial DSpace 3.0 Announcement

Note
titleSmall Exception for Language Packs Releases

The one exception is that the Language Packs (dspace-api-lang and dspace-xmlui-lang) use the numbering convention [major].[minor].[sequence-number] (e.g. 3.0.0, 3.0.1, 3.1.0, etc.). This allows us to release new versions of the language packs more frequently than normal DSpace releases, as needed.

...

On each maven run it may ask you once about your password which is a big improvement.

Java Version

For DSpace 7.x, you must use Java 11.

For DSpace 6.x or above, you can use Java 8.
For DSpace 4.x or 5.x, you should be using Java 7. Unfortunately even disabling `doclint` on these branches seems to not be enough (See 

Jira
serverDuraSpace JIRA
serverIdc815ca92-fd23-34c2-8fe3-956808caf8c5
keyDS-3154
), so you really do need to find an old version of Java 7 around somewhere.

...

For more information see the Prerequisites section of the Sonatype Maven Repository Usage Guide

For DSpace 7.x, you must use Maven 3.3 or above.  However, Maven 3.5.4 or above is highly recommended, as it's necessary to regenerate the LICENSES_THIRD_PARTY file (see notes below)

Unset MAVEN_OPTS, if you use it

...

The snapshot will be immediately available in the public Sonatype repository: httphttps://oss.sonatype.org/content/groups/public/repositories/releases/org/dspace/

Releasing a Single Module/Project

...

Regenerate the LICENSES_THIRD_PARTY file

Note

The latest version (v2.0.0) of license-maven-plugin requires Maven v3.5.4 or above to run these commands.

...

Info
titleVersion 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]. For example, the i18n modules for 3.0 were numbered as follows: 3.0.0, 3.0.1, etc.

...

Code Block
mvn {target} {-option} -Dmirage2.on=true

# NOTE: for DSpace 57.x, you MUST use the "-Drelease" flag in all commands.  It will automatically release all modules.
# NOTE: for DSpace 5.x, the LNI module must be manually specified (-Pdspace-lni)
# NOTE: for DSpace 4.x no need to add profile

Checkout

...

Main or Branch to Release

Checkout a fresh copy of the to-be-released version either from a branch or mastermain. For example:

Code Block
git clone git@github.com:DSpace/DSpace.git ~/dspace-release
cd ~/dspace-release
git checkout mastermain

Note: do not just re-use an old working copy of the DSpace Master Main branch, for obvious reasons, you don't want your own work in progress sneaking into the release. It's also important to use the SSH repository path as noted above (NOT the https URL), otherwise you will be prompted for your GitHub credentials during the release process. More than once. Save yourself some time, be sure to use the SSH path.

Note: if you are doing a maintenance release, you will need to check out the maintenance branch, and not the master main branch. In this case, the example above would instead read:

...

Code Block
mvn test -Dmaven.test.skip=false -DskipITs=false

You can also choose to simply verify the tests succeed in our automated CI processes after the latest commit.

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 master/branch, run the following command (from [dspace-src]):

Code Block
# For DSpace 6.x or below
mvn release:prepare -DdryRun=true -Dmirage2.on=true
# NOTE: for DSpace 5.x, the LNI module must be manually specified (-Pdspace-lni) to ensure it is also released
# NOTE: for DSpace 4.x no need to add profile

# For DSpace 7.x or above (the "-Drelease" flag is required and it selects all modules to release)
mvn release:prepare -DdryRun=true -Drelease

You will have to enter in You will have to enter in your GPG passphrase (which you established when you created your Code Signing Key).

Info
If you need to re-run the Dry Run
If you need to re-run the Dry Run

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 -Dmirage2.on=true(add required extra flags)

You can also clean up any of the release files that the Dry Run created, and just re-run it.

  • mvn release:clean
  • mvn release:prepare -DdryRun=true -Dmirage2.on=true(add required extra flags)

Tag and Increment Version

This step will set the version declared in the project's pom.xml files, commit the changes to master/branch, tag the release, and finally, check in the master/branch change that increments the next development version (e.g. x.y-SNAPSHOT) in the pom.xml files. Run the following (from [dspace-src]):

Code Block
# For DSpace 6.x or below
mvn release:prepare -Dresume=false -Dmirage2.on=true
# NOTE: for DSpace 5.x, the LNI module must be manually specified (-Pdspace-lni) to ensure it is also released
# NOTE: for DSpace 4.x no need to add profile

# For DSpace 7.x or above (the "-Drelease" flag is required and it selects all modules to release)
mvn release:prepare -Dresume=false -Drelease

(Optionally, you may also (Optionally, you may also include the parameters -Dusername=YourGitHubUsername -Dpassword=YourGitHubPassword at the end of the above command, though I've not found these to be necessary)

...

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 (from [dspace-src]):

Code Block
# For DSpace 6.x or below
mvn release:perform -Dmirage2.on=true
# NOTE: for DSpace 5.x, the LNI module must be manually specified (-Pdspace-lni) to ensure it is also released
# NOTE: for DSpace 4.x no need to add profile

# For DSpace 7.x or above (the "-Drelease" flag is required and it selects all modules to release)
mvn release:perform -Drelease

You should be prompted by Maven to specify your GPG passphrase (which you established when you created your 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")

...

Info
titleIf you need to re-deploy

If any errors or problems occur during the deploy, you can re-run the same mvn release:perform -Dmirage2.on=true safely after fixing those issues (re-running it will just overwrite existing staged contents).

...

  1. Login to http://oss.sonatype.org/
  2. 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.
    1. The staged repository should begin in the "Closed" state, which means some automated verifications on the POM structure etc. have already been run. If it is not yet closed, select it and click the "Close" button.
  3. Ensure that the artifacts in staging are exactly as they should be once deployed to Maven Central.  Here's a few things to watch out for...

    1. Download one (or more) of the POMs, and make sure the <version> tag is correct (e.g. 6.0 and not a SNAPSHOT version or similar)

    2. Compare it against a past release in Maven Central (httphttps://repo2search.maven.org/maven2/org/dspace/search?q=org.dspace), making sure it has the same JARs or WARs, etc

    3. Check if the file sizes looks reasonable (0 Bytes is probably not reasonable ;-)). You can also compare those to previous releases.
    4. You can also verify the checksums of one or more of the JARs/WARs in Sonatype versus those that were installed into your .m2 directory. They should be the same.

      Info
      titleIf 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 -Dmirage2.on=true -Dtag=dspace-x.y -DconnectionUrl=scm:git:git@github.com:DSpace/DSpace.git -Darguments="-Dgpg.keyname=YourKeyId -Dgpg.passphrase=YourKeyPassword"


  4. If everything looks good, select the repository and select "Release". The artifacts should be synced to Maven central (httphttps://repo2search.maven.org/maven2/org/dspace/search?q=org.dspace) within 2 hours.

    Warning
    titleOnce 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


    1. Keep in mind however, that the release should become almost immediately available in the public Sonatype repository: https://oss.sonatype.org/content/repositories/releases/org/dspace/

Create the Distribution Zips

Note

Not required for DSpace 7.x.  The Zip Assets created automatically by GitHub during the release process are good enough.

The previous actions will have checked out the release tag The previous actions will have checked out the release tag into the target directory under [dspace-src]/target/checkout/dspace/. Navigate to that directory and execute the creation of the distributions using the following command. This will create two zip, two bzip and two gzipped files in the target directory. One set of files is the "binary" release, and the other set is the source release.

...

Code Block
# NOTE: for DSpace 5.x, the LNI module must be manually specified (-Pdspace-lni) to ensure it is also distributed
# NOTE: for DSpace 4.x no need to add profile

localhost$ cd target/checkout/dspace/
localhost$ mvn package -Pdistributions -Dmirage2.on=true
 [INFO] Scanning for projects...
 [INFO]
 [INFO] ----------------------------------------------------------------------------
 [INFO] Building DSpace Assembly and Configuration 3.0
 [INFO] ----------------------------------------------------------------------------
 ....
 [INFO] --- maven-assembly-plugin:2.2.1:single (default) @ dspace ---
 [INFO] Reading assembly descriptor: src/main/assembly/release.xml
 [INFO] Reading assembly descriptor: src/main/assembly/src-release.xml
 [INFO] Building zip: [full-path-to-dspace-src]/dspace/target/dspace-3.0-release.zip
 [INFO] Building tar: [full-path-to-dspace-src]/dspace/target/dspace-3.0-release.tar.gz
 [INFO] Building tar: [full-path-to-dspace-src]/dspace/target/dspace-3.0-release.tar.bz2
 [INFO] Building zip: [full-path-to-dspace-src]/dspace/target/dspace-3.0-src-release.zip
 [INFO] Building tar: [full-path-to-dspace-src]/dspace/target/dspace-3.0-src-release.tar.gz
 [INFO] Building tar: [full-path-to-dspace-src]/dspace/target/dspace-3.0-src-release.tar.bz2
 [INFO] ------------------------------------------------------------------------
 [INFO] BUILD SUCCESS
 [INFO] ------------------------------------------------------------------------

Create the PDF version of Wiki Documentation

Export the latest Wiki-based Documentation as PDF.

Info
titleHow to Generate PDF Documentation

See this DSpace documentation management guide: How To Export Downloadable Docs from Wiki

Create a new GitHub release & upload distribution files

  • From the GitHub UI, visit: https://github.com/DSpace/DSpace/tags
  • Find the newly tagged release & click on "Add Release Notes"
  • Add in some basic release notes (refer to prior versions for some standard text).  Please be sure to provide the following information:
    • A link to the Wiki Release Notes (in the DSDOC area)
    • A link to the general documentation for this release (again in the DSDOC area)
  • Upload the distribution files and a PDF export of the documentation. There should be 7 total files attached:
    • dspace-[version]-release.tar.gz
    • dspace-[version]-release.tar.bz2
    • dspace-[version]-release.zip
    • dspace-[version]-src-release.tar.gz
    • dspace-[version]-src-release.tar.bz2
    • dspace-[version]-src-release.zip
    • DSpace-Manual.pdf
  • When you are satisfied, publish the new release!

Update demo.dspace.org

...

Release the Frontend (UI) via a GitHub Release Tag

Note

Only required for DSpace 7.x and above.  In 6.x and below, the UIs are in the same repository as the backend

  1. Create a new Release & Tag in GitHub.  See https://help.github.com/en/github/administering-a-repository/managing-releases-in-a-repository for full instructions
    • Note: Alternatively, you can choose to tag the release from command-line (via git tag), but GitHub allows you to create a new tag when creating a new release.
    • Just create a new tag (e.g. "dspace-7.0") off the current "main" branch.
  2. Make sure the GitHub Release description links to the Release Notes  It should also link to the Backend's GitHub Release (and visa versa).  Look at past 7.x releases for examples.

Create the PDF version of Wiki Documentation

Export the latest Wiki-based Documentation as PDF.

Info
titleHow to Generate PDF Documentation

See this DSpace documentation management guide: How To Export Downloadable Docs from Wiki

Create a new GitHub release & upload distribution files

  • From the GitHub UI, visit: https://github.com/DSpace/DSpace/releases
  • Find the newly tagged release & click on "Add Release Notes"
  • Add in some basic release notes (refer to prior versions for some standard text).  Please be sure to provide the following information:
    • A link to the Wiki Release Notes (in the DSDOC area)
    • A link to the general documentation for this release (again in the DSDOC area)
  • Upload the distribution files and a PDF export of the documentation. There should be 7 total files attached:
    • dspace-[version]-release.tar.gz
    • dspace-[version]-release.tar.bz2
    • dspace-[version]-release.zip
    • dspace-[version]-src-release.tar.gz
    • dspace-[version]-src-release.tar.bz2
    • dspace-[version]-src-release.zip
    • DSpace-Manual.pdf
  • When you are satisfied, publish the new release!

Update demo.dspace.org

Build Docker Images for Tagged Releases

Note

Only necessary for 7.x and above

Images can be built & pushed from command-line to DockerHub.  Again, use the same tag name (e.g. "dspace-7.0") as above.

Tim, Kim & Pascal currently have Push access.  Request it from one of them if you don't have it yet.

Code Block
titleBuild docker image
cd <DSPACE-SRC>
--checkout tag--
docker build -t dspace/dspace:<tag> .
docker push dspace/dspace:<tag>

cd <ANGULAR-SRC>
--checkout tag--
docker build -t dspace/dspace-angular:<tag> .
docker push dspace/dspace-angular:<tag>


After the Release is Finished

Warning
titleDon't Announce Until Maven Packages Have Propagated

You must wait for all the packages to be available at httphttps://repo2search.maven.org/maven2/org/dspace/ before search?q=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 LYRASIS Staff:
    • You might post draft announcements to a service such as https://gist.github.com/ and send out a call to committers for review.  When finalized, DSpace releases should be announced on the dspace-community, dspace-devel and dspace-tech lists/groups.
    • Announcement on dspace.org, duraspace.org, twitter
    • (As necessary) 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:
  • Also, update the Documentation Wiki area! Specifically:
  • For major releases, create a new branch in GitHub for any upcoming bug-fix releases:
    • E.g., after the 3.0 release, we created a 3.x branch for any subsequent bug fix 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 commands similar to:

      Code Block
      languagebash
      git clone git@github.com:DSpace/DSpace.git branchit
      cd branchit
      git checkout -b dspace-3_x dspace-3.0
      git push --set-upstream origin dspace-3_x


    • Then, go back to your master checkout, and make sure to update its version numbers in the pom.xml files by running the following:

      Code Block
      git checkout master
      mvn release:update-versions -Dmirage2.on

      (Remember to enter in the next appropriate major version number. E.g. After releasing 3.0, master should be updated to "4.0-SNAPSHOT", while the new 3_x branch should be at "3.1-SNAPSHOT")

    • 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.
    • Push your verified changes back to GitHub.
    • 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 master.
  • 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).
  • Updates to GitHub: 
    • Move any uncompleted PRs to
    the next DSpace version tag.
    • the next DSpace version tag / project board
    • Close the release milestone (adding date of the release)
  • Find the contributors (helpful data for the announcement, you are drafting an announcement, right?): 
    • For bugfix releases

      Code Block
      # This example is to find the list of contributors to 6.3 
      # It lists contributors to 6.x branch since the 6.2 tag
      git shortlog -ns dspace-6_x ^dspace-6.2


    • For major releases (or from main branch), you can use GitHub contributors pages with a date range.  

Possible Errors you may Encounter

...