Skip to content

Commit fe697bc

Browse files
xerialclaude
andauthored
Update README.md publishing instructions for Sonatype Central (#900)
- Remove references to deprecated sbt-sonatype plugin - Update credentials setup to use new Sonatype Central format - Replace sonatypeBundleRelease with sonaRelease command - Add environment variable alternative for credentials - Update host from oss.sonatype.org to central.sonatype.com 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Claude <[email protected]>
1 parent 2bb4834 commit fe697bc

File tree

1 file changed

+20
-9
lines changed

1 file changed

+20
-9
lines changed

README.md

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -108,27 +108,38 @@ A new release note will be generated automatically at the [GitHub Releases](http
108108

109109
#### Publishing to Sonatype from Local Machine
110110

111-
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.
112112

113-
___$HOME/.sbt/(sbt-version)/sonatype.sbt___
113+
___$HOME/.sbt/1.0/credentials.sbt___
114114

115115
```
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
```
121132

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

124-
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
```
130141

131-
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.
132143

133144
### Project Structure
134145

0 commit comments

Comments
 (0)