Hi,
I’ve been working on the Nexus Repository Composer Format community plugin (sonatype-nexus-community/nexus-repository-composer on GitHub) recently including major refactoring for compatibility with Nexus 3.71+ datastore format.
In 3.75 official Composer Proxy support arrived as a Pro feature and now with 3.77 it’s available in the Community edition as well. So far, so great
But … my problem now is: The community plugin competes with the official plugin, e.g. using the same format id composer
- not really surprising.
Didn’t inspect what’s really going on under the hood, i.e. which implementation wins for existing composer-proxy
repos, but before the login the security module already fails
Failed to get state from com.google.inject.internal.InjectorImpl$1 (ignored)
java.lang.IllegalStateException: nx-repository-view-composer-*-delete already exists
Removing the community plugin results in startup error
Missing recipe: composer-hosted`
… well, obviously.
Database has already been upgraded, so the only way to fix this instance without restoring a backup is removing the feature from nexus-community-feature-3.77.0-08-features.xml (simple setting the feature flat nexus.format.composer.enabled=false
does not help in this case)
For instanced with only proxy repos, we can just delete the community repos, upgrade without the plugin. re-create them and we are good to go. Hosted or group repos require the above workaround.
Sources for the official plugin don’t seem to be anywhere available in nexus-public or similar repos (or I just didn’t find them yet), so we can just guess or reverse-engineer stuff to make it compatible again. Rewriting the community plugin to support groups of mixed types is also far from trivial on that basis.
(not really relevant for the actual question, just had to leave this note somewhere)
Overall, I’m little frustrated about the lack of communication regarding community plugins. Pinging people on the repo to approve changes works kinda okay, but no feedback whatsoever about effectively breaking a community project without any hint to the contributors… Absolutely OK to move stuff to the official codebase and that these get prioritized, but the way it has been done here doesn’t really encourage to spend time and resources on such projects
So what I’d like to know is:
Are there plans to extend Composer support to Hosted and Group repositories? (so the Community plugin can be deprecated and replaced within a reasonable timespan)
And are there any developer guidelines to avoid such clashes in future development?