Page History
...
Make sure you're using a recent version of Maven. As of this writing, Maven 3.0.3 or 3.0.4 5 is known to work.
For more information see the Prerequisites section of the Sonatype Maven Repository Usage Guide
...
Double Check Language Packs' Version Ranges
Once the Language Packs are released, you may need to modify the DSpace root pom.xml (https://github.com/DSpace/DSpace/blob/master/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).
Info |
---|
NOTE: if you're skimming these instructions, you may be tempted to think you've already handled this step, because you have already released new language packs, as detailed above. If you think so, you probably have NOT yet completed the steps below. The steps below tell DSpace what version of language packs to use. The language packs you've released following the steps above won't ever get used if you don't do the steps below. This is an easy thing to miss. Don't. Just check, to be sure. |
Once the Language Packs are released, you will probably need to modify the DSpace root pom.xml (https://github.com/DSpace/DSpace/blob/master/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 3.0.0, 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 3.0.0, but is less than version 4.0.0:
...
Pay close attention to the "LICENSES_THIRD_PARTY" file. You should attempt to determine if any third-party dependencies were added or removed and update their licensing information in this file. Information on the Maven commands that may come in handy when updating this file can be found in the Notes at the end of the "LICENSES_THIRD_PARTY" file.LICENSES_THIRD_PARTY" file.
Warning: optional profiles need to be specified at compile time
Just including a little warning about this up front. The following optional modules need to be specified with every mvn command below. We will make an effort to keep this list up to date, but you should verify it before you cut a new release. Things change. Forgetting an optional module means you'll have to cut another release.
Code Block |
---|
mvn {target} {-option} -Dmirage2.on=true -P dspace-lni |
Checkout Master or Branch to Release
...
Before starting the release, you may wish to ensure your local maven cache (~/.m2/repository
) is completely up-to-date by running (from [dspace-src]
):
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 notice an issue or an error occurs, you can re-run the Dry Run using the following command:
You can also clean up any of the release files that the Dry Run created, and just re-run it.
|
Tag and Increment Version
...
Code Block |
---|
mvn release:prepare -Dresume=false -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)
...
Info | ||
---|---|---|
| ||
As the release process scrolls by, you likely will see a LOT of "WARNING" messages. Don't worry, these should be just Javadocs warnings, and can be safely ignored. Just be patient, and see if it all succeeds in the end. We know it's nerve-wracking, but it will all be OK. |
What do successful tagging results look like?
...
Note | ||
---|---|---|
| ||
The
|
Note | ||
---|---|---|
| ||
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:
|
...
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 | ||
---|---|---|
| ||
If any errors or problems occur during the deploy, you can re-run |
...
- 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.
Info title 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 -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"
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 title 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.
...
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] ------------------------------------------------------------------------
|
...