Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More than 1 matching staging profile found: Can we choose the longest prefix? #890

Open
autonomousapps opened this issue Jan 6, 2025 · 1 comment · May be fixed by #896
Open

More than 1 matching staging profile found: Can we choose the longest prefix? #890

autonomousapps opened this issue Jan 6, 2025 · 1 comment · May be fixed by #896
Labels

Comments

@autonomousapps
Copy link
Contributor

I have the following build error:

Caused by: java.lang.IllegalArgumentException: More than 1 matching staging profile found in account ***. Available profiles are: com.squareup, com.squareup.misk

...

Caused by: java.lang.IllegalArgumentException: More than 1 matching staging profile found in account ***. Available profiles are: com.squareup, com.squareup.misk
	at com.vanniktech.maven.publish.nexus.Nexus.findStagingProfile(Nexus.kt:70)
	at com.vanniktech.maven.publish.nexus.Nexus.createRepositoryForGroup(Nexus.kt:95)
	at com.vanniktech.maven.publish.sonatype.SonatypeRepositoryBuildService.createStagingRepository(SonatypeRepositoryBuildService.kt:125)
	at com.vanniktech.maven.publish.sonatype.CreateSonatypeRepositoryTask$CreateStagingRepository.execute(CreateSonatypeRepositoryTask.kt:46)
	at org.gradle.workers.internal.DefaultWorkerServer.execute(DefaultWorkerServer.java:63)

I think it would be useful if this plugin would attempt to find the longest prefix when searching for staging profiles, in order to resolve ambiguities like the above. We tried to set a group of com.squareup.misk.root, and this led to the ambiguity between com.squareup and com.squareup.misk.

@gabrielittner
Copy link
Collaborator

The only reason why I didn't add this before was because I wasn't sure if anyone actually will have an issue like this. I will adjust the logic for the next release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants