users@jersey.java.net

[Jersey] Re: metainf-services duplicate classes

From: Eugen Cepoi <cepoi.eugen_at_gmail.com>
Date: Mon, 13 Oct 2014 23:31:33 +0200

Any news on that?

2014-09-24 0:31 GMT+02:00 Eugen Cepoi <cepoi.eugen_at_gmail.com>:

> Hi Marek,
>
> All classes from /org/glassfish/jersey/message/internal/ are duplicated, I
> don't know if the code inside has some changes (and in fact it is part of
> my question), basically we can find them in both jersey-common and
> jersey-metainf-services.
>
> I just double checked by downloading manually the jars from
> http://mvnrepository.com/artifact/org.glassfish.jersey.ext/jersey-metainf-services/2.12
> and
> http://mvnrepository.com/artifact/org.glassfish.jersey.core/jersey-common/2.12
> and confirm it.
>
> Concerning my other question (pluging in components that are detected with
> no action from the user) I found the interface AutoDiscoverable. So it
> looks like the service loader mechanism still works (by default) for this
> one, is it the preferred way to register components?
>
> Thanks,
> Eugen
>
> 2014-09-23 21:31 GMT+02:00 Marek Potociar <marek.potociar_at_oracle.com>:
>
>> Hi Eugen,
>>
>> Do you have example of which classes are duplicate? Can you verify the
>> classes are actually duplicate in the jar (just to make sure the problem is
>> not in your maven config)?
>>
>> Thanks,
>> Marek
>>
>> On 22 Sep 2014, at 15:27, Eugen Cepoi <cepoi.eugen_at_gmail.com> wrote:
>>
>> > Hi,
>> >
>> > When using maven shade plugin with metainf-services there are warnings
>> about duplicate classes with jersey-common.
>> > I am wondering why those classes have been copied? Are they exactly the
>> same?
>> >
>> > Also, is metainf-services just a way to support backwards compatibility
>> with libs that relied on the service loader mechanism but is not anymore
>> the preferred way to provide implementations? In that case what is the
>> preferred way to provide "out of the box integration" with jersey now
>> (similar to what is being done with moxy)?
>> >
>> > Thanks,
>> >
>> > Eugen
>>
>>
>