This small tutorial contains necessary steps required to perform a release of Slice to newer version.
Generating PGP Signatures
Synchronization Slice artifacts with Maven central requires to provide pgp signatures. For that purpose you need to generate a key pair. If you don't generated and propagated public key yet, see Generating a PGP Signatures.
Configuring settings.xml file
To stage release, you we'll need to enable connection with Sonatype OSSRH.
Add server section below to your settings.xml file:
Code Block | ||
---|---|---|
| ||
<settings>
...
<servers>
<server>
<id>sonatype-nexus-staging</id>
<username>your-jira-id</username>
<password>your-jira-pwd</password>
</server>
</servers>
...
</settings> |
In case you don't already have Sonatype JIRA account and publish rights to Slice, firstly you'll need to create an account on https://issues.sonatype.org/.
After that to get write permission to Slice, you will need to ask for it using comment by creating a JIRA ticket (you can take a looks at comments on this ticket).
The information about public key and scm username are also required and will need to add to chosen profile a path to the public key and scm.username file, e.g.:
Code Block | ||
---|---|---|
| ||
<settings> ... <profile> <id>slice-author</id> <activation> <activeByDefault>false</activeByDefault> </activation> <properties> <privateKey>C:\Users\kamil.ciecierski\.ssh\id_dsa.pub</privateKey> <scm.username>git</scm.username> </properties> </servers>profile> ... </settings> |
...
See also Sonatype Maven Repository Usage Guide
...
- you are switched to a proper git branch.
- your git user settings are correct and local repository is synchronized with the remote one - otherwise do proper git-push or git-pull operation.
- you generated and propagated GPG PGP key - see see Generating a PGP Signatures.
...
Code Block | ||||
---|---|---|---|---|
| ||||
mvn release:prepare:release |
You will be prompted for the version number for each module of the project, tag name, and next SNAPSHOT versions. You will need also type the passphrase for the key, which you generated during Generating a PGP Signatures step. When this command finish successfully, the version section of each module's pom.xml file will be updated.
...