The OSSRH Guide workflow in short:
- if you have no account sign up
- create a project ticket
- follow the maven deployment example
Add orssh server tag to servers to your settings.xml:
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<servers>
<server>
<id>ossrh</id>
<username>your-jira-id</username>
<password>your-jira-pwd</password>
</server>
</servers>
</settings>
your-jira-id and your-jira-pwd can be obtained as follows:
- log in to https://oss.sonatype.org
- profile => user token => access user token
-
perform a snapshot deloyment
-
increment verion number in pom.xml
-
build and commit snapshot
mvn clean deploy -DskipTests
-
watch snapshots at oss.sonatype.org
-
-
perform a release deplyoment
-
increment verion number in pom.xml
-
commit pom.xml
git add pom.xml && git commit -m "pre release deployment commit" && git push
-
build and commit snapshot and release:
mvn release:clean release:prepare -Darguments="-DskipTests" mvn release:perform -Darguments="-DskipTests"
-
commit newly changed pom.xml
git add pom.xml && git commit -m "post release deployment commit" && git push
-
watch staging profiles and snapshots at oss.sonatype.org
-
-
deploy to local repository
mvn clean install -DskipTests