Skip to content

Commit 0b11169

Browse files
docs: remove legacy Java publishing instructions (#46)
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: ash@speakeasyapi.dev <ash@speakeasyapi.dev>
1 parent 215dffe commit 0b11169

File tree

3 files changed

+4
-60
lines changed

3 files changed

+4
-60
lines changed

docs/publish-sdk.mdx

Lines changed: 1 addition & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,6 @@ Java and C# require additional setup after running `speakeasy configure publishi
107107

108108
#### Java Maven: Sonatype Central Portal (recommended)
109109

110-
For legacy OSSRH publishing support, see the next section.
111-
112110
1. Create a [Sonatype Central Portal account](https://central.sonatype.org/register/central-portal/) (if needed).
113111
2. Generate a [Sonatype username and password for authentication](https://central.sonatype.org/publish/generate-portal-token/). Save these for step 5.
114112
3. Create a [Sonatype namespace](https://central.sonatype.org/register/central-portal/#choosing-a-namespace).
@@ -137,55 +135,8 @@ For legacy OSSRH publishing support, see the next section.
137135
companyEmail: info@mycompany.com
138136
```
139137
140-
#### Java Maven: Sonatype legacy OSSRH
141138
142-
1. Create an [OSSRH staging repository](https://central.sonatype.org/publish/publish-guide/).
143-
2. Create a GPG key to [sign the artifacts](https://central.sonatype.org/publish/requirements/gpg/). Save these for step 3.
144-
- Install GnuPG: `brew install gnupg`
145-
- Generate a key: `gpg --gen-key`. Note the key ID (e.g., `CA925CD6C9E8D064FF05B4728190C4130ABA0F98`) and short ID (e.g., `0ABA0F98`).
146-
- Send the key: `gpg --keyserver keys.openpgp.org --send-keys <keyId>`
147-
- Note: The following key servers can also be used: `keyserver.ubuntu.com`, `keys.openpgp.org`, or `pgp.mit.edu`
148-
- Export the secret key: `gpg --export-secret-keys --armor <shortId> > secret_key.asc`
149-
- The file `secret_key.asc` will contain the GPG secret key.
150-
3. Store the following secrets Github actions secrets:
151-
- `OSSRH_USERNAME`
152-
- `OSSRH_PASSWORD`
153-
- `JAVA_GPG_SECRET_KEY`
154-
- `JAVA_GPG_PASSPHRASE`
155-
4. In the [Speakeasy workflow file](/docs/workflow-file-reference), add `useSonatypeLegacy: true`:
156-
```yaml
157-
workflowVersion: 1.0.0
158-
speakeasyVersion: latest
159-
sources:
160-
my_source.yaml:
161-
inputs:
162-
- location: my_source.yaml
163-
targets:
164-
java:
165-
target: java
166-
source: my_source.yaml
167-
publish:
168-
java:
169-
#add useSonatypeLegacy: true
170-
useSonatypeLegacy: true
171-
ossrhUsername: test
172-
ossrhPassword: $ossrh_password
173-
gpgSecretKey: $java_gpg_secret_key
174-
gpgPassPhrase: $java_gpg_passphrase
175-
```
176-
5. In the java section of `gen.yaml`, provide the additional configuration required for publishing to Sonatype legacy:
177-
```yaml
178-
java:
179-
#ensure the `groupID` matches the OSSRH org
180-
groupID: com.example
181-
#ensure the `artificatID` matches the artifact name:
182-
artifactID: example-sdk
183-
ossrhURL: https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/
184-
githubURL: github.com/org/repo
185-
companyName: My Company
186-
companyURL: https://www.mycompany.com
187-
companyEmail: info@mycompany.com
188-
```
139+
189140
190141
#### C# NuGet
191142

docs/speakeasy-reference/generation/ci-cd-pipeline.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,12 +169,12 @@ secrets:
169169
{
170170
name: "ossrh_username",
171171
description:
172-
"Username for publishing the Java package to the OSSRH repository.",
172+
"Username for publishing the Java package to Sonatype Central Portal.",
173173
},
174174
{
175175
name: "ossrh_password",
176176
description:
177-
"Password for publishing the Java package to the OSSRH repository.",
177+
"Password for publishing the Java package to Sonatype Central Portal.",
178178
},
179179
{
180180
name: "java_gpg_secret_key",

docs/speakeasy-reference/generation/java-config.mdx

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ java:
4242
java:
4343
groupID: "com.mycompany"
4444
artifactID: "my-sdk"
45-
ossrhURL: "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
4645
githubURL: "https://github.com/mycompany/my-sdk"
4746
companyName: "My Company"
4847
companyURL: "https://www.mycompany.com"
@@ -65,13 +64,7 @@ java:
6564
description:
6665
"The artifact ID used for namespacing the package, usually the name of the project.",
6766
},
68-
{
69-
name: "ossrhURL",
70-
required: "false",
71-
default: "N/A",
72-
description:
73-
"The URL of the staging repository to publish the SDK artifact to.",
74-
},
67+
7568
{
7669
name: "githubURL",
7770
required: "for publishing",

0 commit comments

Comments
 (0)