My questions are: Is this doable and, if so, how would one go about it?
I’m trying to cobble together a plugin/extension that will either get an auth token for resolving an artifact before the artifact is resolved, or will get an auth token if the resolution returns a 401. The plugin route happens too late in the execution, but I’ve found that with an AbstractMavenLifecycleParticipant at least afterProjectsRead gets called before artifact resolution. However, I can’t seem to affect the server password in a way that allows artifact resolution to succeed. I’ve also tried overriding some default implementations, but I don’t see the extension getting invoked (I see that Maven is aware of the extension, but it doesn’t get used AFAICT).