Update README.md publishing instructions for Sonatype Central (#900) · msgpack/msgpack-java@fe697bc

@@ -108,27 +108,38 @@ A new release note will be generated automatically at the [GitHub Releases](http

108108109109

#### Publishing to Sonatype from Local Machine

110110111-

If you need to publish to Maven central using a local machine, you need to configure [sbt-sonatype](https://github.com/xerial/sbt-sonatype) plugin. First set Sonatype account information (user name and password) in the global sbt settings. To protect your password, never include this file in your project.

111+

If you need to publish to Maven central using a local machine, you need to configure credentials for Sonatype Central. First set Sonatype account information (user name and password) in the global sbt settings. To protect your password, never include this file in your project.

112112113-

___$HOME/.sbt/(sbt-version)/sonatype.sbt___

113+

___$HOME/.sbt/1.0/credentials.sbt___

114114115115

```

116-

credentials += Credentials("Sonatype Nexus Repository Manager",

117-

"oss.sonatype.org",

118-

"(Sonatype user name)",

119-

"(Sonatype password)")

116+

credentials += Credentials(Path.userHome / ".sbt" / "sonatype_central_credentials")

117+

```

118+119+

Then create a credentials file at `~/.sbt/sonatype_central_credentials`:

120+121+

```

122+

host=central.sonatype.com

123+

user=<your username>

124+

password=<your password>

125+

```

126+127+

Alternatively, you can use environment variables:

128+

```bash

129+

export SONATYPE_USERNAME=<your username>

130+

export SONATYPE_PASSWORD=<your password>

120131

```

121132122133

You may also need to configure GPG. See the instruction in [sbt-pgp](https://github.com/sbt/sbt-pgp).

123134124-

Then, run `publishedSigned` followed by `sonatypeBundleRelease`:

135+

Then, run `publishSigned` followed by `sonaRelease`:

125136

```

126137

# [optional] When you need to perform the individual release steps manually, use the following commands:

127138

> publishSigned # Publish GPG signed artifacts to the Sonatype repository

128-

> sonatypeBundleRelease # Publish to the Maven Central (It will be synched within less than 4 hours)

139+

> sonaRelease # Publish to the Maven Central (It will be synched within less than 4 hours)

129140

```

130141131-

If some sporadic error happens (e.g., Sonatype timeout), rerun `sonatypeBundleRelease` again.

142+

If some sporadic error happens (e.g., Sonatype timeout), rerun `sonaRelease` again.

132143133144

### Project Structure

134145