Skip to content

Latest commit

 

History

History
60 lines (50 loc) · 1.91 KB

nodes.md

File metadata and controls

60 lines (50 loc) · 1.91 KB

web3j-maven-plugin nodes

How to release

The release was done based on this tutorial: Distribute Project Artifacts in Maven Central with Nexus OSS

The official guide is located here and for signing the jar, this was very helpfully

Preparation

Unix

Following the tutorial above

Windows

  • Install gpg Gpg4win
  • Install git git for windows
  • Install Maven Binary zip Add the binaries to the PATH variables. Hint: The gpg installation only add the path ```...\GnuPG\pub```` to the Environment variables.

Configuration

Add following to the maven settings file (.m2/settings.xml):

  <servers>
    <server>
      <id>ossrh</id>
      <username>jira_id</username>
      <password>jira_pwd</password>
    </server>
  </servers>
  <profiles>
    <profile>
      <id>ossrh</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <properties>
        <gpg.executable>gpg2</gpg.executable>
        <gpg.passphrase>the_pass_phrase</gpg.passphrase>
      </properties>
    </profile>
  </profiles>

Releasing

On Windows I could not managed it connect with ssh to github (upload with git and ssh worked, but not with the maven release plugin). So the https connection is used inside the pom.xml

<scm>
  <url>https://github.com/web3j/${project.artifactId}.git</url>
</scm>  

with that in place, the release can be done as follow

mvn clean deploy
mvn release:clean release:prepare -Dusername=github_user_id -Dpassword=gitbub_passwird
mvn release:perform