Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
gpg -ab {your-project-path}/pom.xml
gpg -ab {your-project-path}/target/{artifactId}-{version}.jar
gpg -ab {your-project-path}/target/{artifactId}-{version}-sources.jar
gpg -ab {your-project-path}/target/{artifactId}-{version}-javadoc.jar
  • deploy
Code Block
# deploy bundle with javadoc and sources
mvn gpg:sign-and-deplay-file \
    -DpomFile={your-project-path}/pom.xml \
    -Dfile={your-project-path}/target/{artifactId}-{version}.jar \
    -Dsources={your-project-path}/target/{artifactId}-{version}-sources.jar \
    -Djavadoc={your-project-path}/target/{artifactId}-{version}-javadoc.jar \
    -Durl=https://oss.sonatype.org/service/local/staging/deploy/maven2 \
    -DrepositoryId={your server id of maven settings file}
# deploy jar
mvn gpg:sign-and-deploy-file \
      -Dfile={your-project-path}/target/{artifactId}-{version}.jar \
      -Durl=https://oss.sonatype.org/service/local/staging/deploy/maven2 \
      -DrepositoryId={your server id of maven settings file} \
      -DgroupId={groupId} \
      -DartifactId={artifactId} \
      -Dversion={version} \
      -DgeneratePom=false
  • go to oss.sonatype.org and login
  • go to Staging Repositories

...