- Import the keys:
gpg2 --list-keys
- Observe that there are no keys imported.
gpg2 --import private-keys
andgpg2 --import pub-keys
gpg2 --list-keys
- Observe that the keys are imported.
- Create a new
servers/server
entry in the.m2/settings.xml
file withnexus-releases
as an id. The specify theusername
andpassword
for theoss.sonatype.org
Nexus user.
- Bump version.
- Build everything:
- Run
mvn clean install
in the root of the project. - Run
./gradlew build
on thescott-gradle-plugin
.
- Run
- Deploy Maven Artifacts:
- For
scott/scott
andscott/scott-maven-plugin
do the following: (with the appropriate version numbers):mvn gpg:sign-and-deploy-file -Durl=https://oss.sonatype.org/service/local/staging/deploy/maven2/ -DrepositoryId=nexus-releases -DpomFile=pom.xml -Dfile=target/scott-1.0.0.jar
mvn gpg:sign-and-deploy-file -Durl=https://oss.sonatype.org/service/local/staging/deploy/maven2/ -DrepositoryId=nexus-releases -DpomFile=pom.xml -Dfile=target/scott-1.0.0-sources.jar -Dclassifier=sources
mvn gpg:sign-and-deploy-file -Durl=https://oss.sonatype.org/service/local/staging/deploy/maven2/ -DrepositoryId=nexus-releases -DpomFile=pom.xml -Dfile=target/scott-1.0.0-javadoc.jar -Dclassifier=javadoc
- Sign in to https://oss.sonatype.org. Find the new repo under "Staging repositories". Make sure that the contents are OK, then hit Close, then Release.
- For
- Deploy
scott/scott-gradle-plugin
:./gradlew publishPlugins
The Gradle plugin will be released after manual approval. The Maven artifacts will be available in Maven Central after a few hours.