Page History
...
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).
Maven settings to release DSpace < 6
With DSpace 6 we changed the maven plugin that pushes our releases to Sonatype. The configuration above is correct beginning with DSpace 6. In case you release a previous DSpace version, you'll need to add copy the server section two times and change the id to sonatype-nexus-snapshots
and sonatype-nexus-stagging
. A settings file that allows you to release all versions of DSpace would look like the following example:
Code Block |
---|
<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>ossrh</id>
<username>YourSonatypeUsername</username>
<password>YourSonatypePassword</password>
</server>
<!--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> </servers>
</settings>
|
While it may look surprisingly that you have to add the same credentials three times, DSpace < 6 will be looking for these server IDs and the upload to sonatype will fail as unauthorized if they are missing.
Use Maven 3 or above
Make sure you're using a recent version of Maven. As of this writing, Maven 3.0.5 is known to work.
...