-
Notifications
You must be signed in to change notification settings - Fork 57
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
Provide way to customize some of resolver SPI providers #397
Comments
Thanks for heads up @splatch Hmm, this sounds a bit dangerous. When I was playing with maven (aether) resolve I found the DI model nice and elegant, but not 100% suitable for embedded use, where you simply create few objects/services and tie them together. Switching to DI mode only would require pax-url-ather to really start a full plexus container first and obtain a resolver from it. To make it proper, we'd have to open pax-url-ather to extensions provided by sisu/guice/maven modules discoverable via OSGi and I can't imagine (yet) how to do it in simple way... Mind that we're NOT forced to switch to maven-resolver without service locator at any time (unless the previous versions disappear from Maven Central ;)). I'll think more about it. BTW, I'm thinking about pax-url-war improvements to adjust to my Pax Web 8 changes - although it works without any changes, I could make it more flexible in terms of which web packages are imported by the webified bundle... |
Don't forget that DI (Sisu/Guice) is still not a MUST for maven-resolver (there are no class dependencies on it)... you can still introduce some (your own) helper class like |
For the record, Camel is already using custom DI registry based on JSR330, which can configure entire Maven Resolver without service locator. See apache/camel#8501. |
Thanks @cstamas - I'll have a look. |
The upcoming release of Maven Resolver will drop support for
ServiceLocator
: https://issues.apache.org/jira/browse/MRESOLVER-157 which is extensively used in pax-url-aether module.There is an PR which addresses that: apache/maven-resolver#88, so changes can be cross checked already.
This means that some kind of IoC handling will be necessary in this project, unless it is switched to ie. guice which probably will remain. Pax never really had any support for IoC and customization of created resolver (which I found few years ago while working on version range handling), so I would like to bring this topic once again.
There are actually two use cases I would like to bring:
I know that none of above is currently possible because pax-url does shading of Maven and Aether packages. But, even if above extensions would be compiled against pax'ed packages there will be no way to get them dynamically included by the resolver.
Hence this issue is made with an "epic" label to see if such customization will be ever possible.
The text was updated successfully, but these errors were encountered: