Skip to content

Commit f062820

Browse files
authored
fix(publib-maven): MAVEN_STAGING_PROFILE_ID is no longer required (#1679)
We can put any value in this field, at least for the backwards compatibility API. Let's not make it a required part of the interface. This change is safe to make: users can still supply the value, it will just be ignored.
1 parent 8328c2f commit f062820

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,12 @@ Publishes all Maven modules in the `DIR` to [Maven Central](https://search.maven
8484
> [!IMPORTANT]
8585
> Starting July 2025 you must switch over to the new Maven Central Publisher. Follow these steps:
8686
>
87+
> * Log in to <https://central.sonatype.com/> with your existing username and password.
88+
> * Under your account, click **View Namespaces**, then click **Migrate Namespace** for your target namespaces.
89+
> * Generate a new username and password on the new publisher using the **Generate User Token** feature.
8790
> * Configure `MAVEN_SERVER_ID=central-ossrh`.
8891
> * Unset any `MAVEN_ENDPOINT`.
89-
> * Log in to <https://central.sonatype.com/>
90-
> * Generate a new username and password on the new publisher using the **Generate User Token** feature.
91-
> * Configure `MAVEN_STAGING_PROFILE_ID` with your package namespace (register it first if necessary)
92+
> * Configure the new `MAVEN_USERNAME` and `MAVEN_PASSWORD`.
9293
9394
If you are still on Nexus and you signed up at SonaType after February 2021, you
9495
need to use this URL: `https://s01.oss.sonatype.org`
@@ -118,7 +119,6 @@ The server type is selected using the `MAVEN_SERVER_ID` variable.
118119
| (all) | `MAVEN_DRYRUN` | No | Set to "true" for a dry run |
119120
| (all) | `MAVEN_VERBOSE` | No | Make Maven print debug output if set to `true` |
120121
| `central-ossrh` | `MAVEN_GPG_PRIVATE_KEY[_FILE]` and `MAVEN_GPG_PRIVATE_KEY_PASSPHRASE` | Yes | GPG private key or file that includes it. This is used to sign your Maven packages. See instructions below |
121-
| `central-ossrh` | `MAVEN_STAGING_PROFILE_ID` | Yes | Maven Central (sonatype) staging profile ID (e.g. 68a05363083174). Staging profile ID can be found **in the URL** of the "Releases" staging profile under "Staging Profiles" in <https://oss.sonatype.org> or <https://s01.oss.sonatype.org> if you are logged in (e.g. `https://oss.sonatype.org/#stagingProfiles;68a05363083174`). |
122122
| `central-ossrh` | `MAVEN_ENDPOINT` | No | URL of Nexus repository. Defaults to `https://ossrh-staging-api.central.sonatype.com/`. |
123123
| `<custom>` | `MAVEN_REPOSITORY_URL` | No | Deployment repository when not deploying to Maven Central |
124124
| `ossrh` (deprecated) | `MAVEN_GPG_PRIVATE_KEY[_FILE]` and `MAVEN_GPG_PRIVATE_KEY_PASSPHRASE` | Yes | GPG private key or file that includes it. This is used to sign your Maven packages. See instructions below |

src/bin/publib-maven.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ async function main() {
7070
options = {
7171
type: 'compat-ossrh',
7272
...sharedOptions,
73-
stagingProfileId: envVar('MAVEN_STAGING_PROFILE_ID'),
73+
// Not required by the new endpoint: can be any value (maybe never was required to begin with?)
74+
stagingProfileId: 'publib',
7475
endpoint: process.env.MAVEN_ENDPOINT,
7576
privateKey: parsePrivateKeyFromEnv(),
7677
};

0 commit comments

Comments
 (0)