Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: more deletion of dspace-lni

...

Code Block
mvn install -Dmirage2.on=true -P dspace-lni

Updating your local maven cache will help to ensure that the release process goes more smoothly, and should help you to avoid any errors having to do with Maven being unable to locate any particular dependencies. That being said, this step actually may not be necessary, if our release process is working correctly.

...

Code Block
mvn release:prepare -DdryRun=true -Dmirage2.on=true -P dspace-lni

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 -P dspace-lni

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 -P dspace-lni

Tag and Increment Version

...

Code Block
mvn release:prepare -Dresume=false -Dmirage2.on=true -P dspace-lni

(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)

...

Note
titleIf you receive a project dependency error

The mvn release:prepare command may fail to compile part way through the process, complaining that an internal project dependency is not met. If this occurs, don't worry. You just may need to ensure those dependencies get installed to your local cache.  To fix this, you should be able to run the following:

  1. mvn release:clean   (clean out any files created by the previous "mvn release:prepare")
  2. mvn install -Dmirage2.on=true -P dspace-lni
  3. mvn release:prepare -Dmirage2.on=true -P dspace-lni
Note
titleBacking out of changes

If backing out of this step is needed for any reason, the following will restore the github repository and your working copy to the state it was previously in:

  1. mvn release:rollback
    • Warning: running a "mvn release:rollback" will perform an immediate, automatic push to GitHub master, rolling back any previously committed POM version changes.
    • If you want to avoid the immediate, automatic push to GitHub master, you may be able to use "mvn release:clean" to just clean up the locally made release preparations.
  2. Now delete the tag in GitHub (local & remote)
    • git tag -d dspace-x.y
    • git push origin :refs/tags/dspace-x.y

...

Code Block
mvn release:perform -Dmirage2.on=true -P dspace-lni

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 mvn release:perform -Dmirage2.on=true -P dspace-lnisafely 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.
  3. With the staged repository still selected, click the "Close" button at the top.
  4. Download and test that the artifacts in staging are exactly as they should be once deployed to central.

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

  5. 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 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.

...

Code Block
localhost$ cd target/checkout/dspace/
localhost$ mvn package -Pdistributions -Dmirage2.on=true -P dspace-lni
 [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] ------------------------------------------------------------------------

...