Closed rtyley closed 10 months ago
i just noticed this PR. Will take a look
i just noticed this PR. Will take a look
Thanks @xerial! How does it look to you? I'm happy to make changes if required?
Merged with some fixes for code cosmetics
Thank you!
This updates the error message given when a profile is not found on a host (note Sonatype currently has 2 OSS hosts -
oss.sonatype.org
&s01.oss.sonatype.org
- and any profile will only exist on one of the hosts).(example here)
There can be two possible causes when a profile is not found on a host:
The original error message really only indicated the possibility of the 1st problem, but the 2nd issue is increasingly likely - since February 2021 new profiles have only been registered on the new host
s01.oss.sonatype.org
, andsbt-sonatype
defaults to using the older host,oss.sonatype.org
.The new error message aims to make the user aware of the 2 possible causes of the 'missing profile' problem, and offer advice on how the 2nd problem could be corrected.
Before:
After:
Sonatype host is determined by-profile (not by-user)
Note that in the past, there's been a bit of confusion (ok, I've been a bit confused!) about whether hosts are assigned on a by-user or by-profile basis (many users can be granted access by Sonatype to upload to one profile, eg we at the Guardian have that for our com.gu profile). It's definitely per-profile though - so
sonatypeProfileName
dictates whichsonatypeCredentialHost
you want to be using.As a user (eg, for me, with my Sonatype user account 'roberto') working on a variety of projects with different profiles (eg, for me, working on projects under
com.gu
,com.madgag
&org.scanamo
) when I'm performing a release I'll be uploading to eitheross.sonatype.org
, ors01.oss.sonatype.org
, depending on which profile/groupId that particular project lives under.