[ 
https://issues.apache.org/jira/browse/MRESOLVER-157?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17346457#comment-17346457
 ] 

Łukasz Dywicki commented on MRESOLVER-157:
------------------------------------------

I come across this issue since I would like to embed resolver under OSGi 
without necessity to bring sisu and other things. Even if resolver now publish 
valid OSGi metadata it is polluted by mentioned libraries making it really hard 
to use artifacts without re-packaging.

Since I have no opinion about use of resolver within Maven I can't really 
comment how above are playing with it. From wiring point of view 
{{ServiceLocator}} represents an useful joint point for delivering IoC 
capabilities without requiring specific IoC technology (sisu or guice).

I made an successful attempt to separate sisu stuff from 
{{maven-resolver-impl}} (see 
https://github.com/ConnectorIO/maven-resolver/tree/MRESOLVER-157), yet it fails 
at static calls in 
{{org.apache.maven.repository.internal.MavenRepositorySystemUtils#newServiceLocator}}
 coming from {{org.apache.maven:maven-resolver-provider}} module. Is this is 
taken into account with this issue?

> Get rid of ServiceLocator in Resolver
> -------------------------------------
>
>                 Key: MRESOLVER-157
>                 URL: https://issues.apache.org/jira/browse/MRESOLVER-157
>             Project: Maven Resolver
>          Issue Type: Task
>          Components: Resolver
>            Reporter: Tamás Cservenák
>            Priority: Major
>
> maven-resolver currently supports:
>  * ServiceLocator
>  * "vanilla" Guice (provides a module)
>  * DI using Sisu, as used in Maven
> IMO, it makes not much sense to support 3 vastly different "DI"s (in quotes 
> as ServiceLocator is really just a dumb factory pattern).
> Not only just complicates the code base, makes changes error prone at least, 
> yields for "exceptions" (this or that will never work with it, as seen with 
> SyncContext), and, for me most importantly, prevents proper constructor 
> initialization and validation of components.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to