You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Michal Hlavac <mi...@hlavki.eu> on 2017/11/06 11:06:38 UTC

version resolving

Hi,

I would like to ask about version resolving in repository element of feature file.
I am asking because of line 21 in https://github.com/apache/cxf/blob/cxf-3.2.1/osgi/karaf/features/src/main/resources/features.xml

<repository>mvn:org.ops4j.pax.cdi/pax-cdi-features/[1.0.0.RC1,2)/xml/features</repository>

When I download karaf 4.1.3 and start it, then execute command: feature:list | grep pax-cdi
output show version 1.0.0.RC2

But after feature:repo-add cxf 3.2.0, then re-run feature:list | grep pax-cdi
it shows additional 1.0.0-SNAPSHOT

I suspect that karaf cannot resolve RCx version sufix

thanks, m.


Re: version resolving

Posted by Michal Hlavac <mi...@hlavki.eu>.
hi Guillaume,

it starts with:
Caused by: shaded.org.eclipse.aether.resolution.VersionRangeResolutionException: No highest version found for org.ops4j.pax.cdi:pax-cdi-features:xml:features:[1.0.0.RC1,2)

but then it works!

thank you for your help... m.

On pondelok, 6. novembra 2017 14:26:28 CET Guillaume Nodet wrote:


In particular, change the etc/org.ops4j.pax.url.mvn.cfg with
  org.ops4j.pax.url.mvn.repositories= \
    http://repo1.maven.org/maven2@id=central[1]


Also, remove your local ~/.m2/repository/org/ops4j/pax/cdi/pax-cdi-features


It should do the trick.


2017-11-06 14:12 GMT+01:00 Guillaume Nodet <gnodet@apache.org[2]>:


This is not really a bug imho, but there's no way to specify better the version range in maven.
In order to work around this behavior, you need to remove maven snapshot repositories containing pax-cdi.  This way, it should not be resolved.


2017-11-06 13:53 GMT+01:00 Michal Hlavac <miso@hlavki.eu[3]>:


it means that there is bug in CXF, right?
 
Because I can't build offline karaf distribution with cxf-3.2.0
It searches for 1.0.0-SNAPSHOT on first start 
 
m.


Those version resolution are done by pax-url-aether which uses the aether library (the same one used by maven).
I think the behavior is correct, see
   https://cwiki.apache.org/confluence/display/MAVENOLD/Dependency+Mediation+and+Conflict+Resolution[4]



2017-11-06 12:06 GMT+01:00 Michal Hlavac <miso@hlavki.eu[3]>:


Hi,

I would like to ask about version resolving in repository element of feature file.I am asking because of line 21 in https://github.com/apache/cxf/blob/cxf-3.2.1/osgi/karaf/features/src/main/resources/features.xml[5]





------------------------Guillaume Nodet









-- 


------------------------Guillaume Nodet








------------------------Guillaume Nodet







--------
[1] http://repo1.maven.org/maven2@id=central
[2] mailto:gnodet@apache.org
[3] mailto:miso@hlavki.eu
[4] https://cwiki.apache.org/confluence/display/MAVENOLD/Dependency+Mediation+and+Conflict+Resolution
[5] https://github.com/apache/cxf/blob/cxf-3.2.1/osgi/karaf/features/src/main/resources/features.xml

Re: version resolving

Posted by Guillaume Nodet <gn...@apache.org>.
In particular, change the etc/org.ops4j.pax.url.mvn.cfg with
  org.ops4j.pax.url.mvn.repositories= \
    http://repo1.maven.org/maven2@id=central

Also, remove your local ~/.m2/repository/org/ops4j/pax/cdi/pax-cdi-features

It should do the trick.

2017-11-06 14:12 GMT+01:00 Guillaume Nodet <gn...@apache.org>:

> This is not really a bug imho, but there's no way to specify better the
> version range in maven.
> In order to work around this behavior, you need to remove maven snapshot
> repositories containing pax-cdi.  This way, it should not be resolved.
>
> 2017-11-06 13:53 GMT+01:00 Michal Hlavac <mi...@hlavki.eu>:
>
>> it means that there is bug in CXF, right?
>>
>>
>>
>> Because I can't build offline karaf distribution with cxf-3.2.0
>>
>> It searches for 1.0.0-SNAPSHOT on first start
>>
>>
>>
>> m.
>>
>>
>> On pondelok, 6. novembra 2017 13:11:28 CET Guillaume Nodet wrote:
>>
>> Those version resolution are done by pax-url-aether which uses the aether
>> library (the same one used by maven).
>>
>> I think the behavior is correct, see
>>
>>    https://cwiki.apache.org/confluence/display/MAVENOLD/Depend
>> ency+Mediation+and+Conflict+Resolution
>>
>>
>> 2017-11-06 12:06 GMT+01:00 Michal Hlavac <mi...@hlavki.eu>:
>>
>> Hi,
>>
>> I would like to ask about version resolving in repository element of
>> feature file.
>> I am asking because of line 21 in https://github.com/apache/cxf/
>> blob/cxf-3.2.1/osgi/karaf/features/src/main/resources/features.xml
>>
>> <repository>mvn:org.ops4j.pax.cdi/pax-cdi-features/[1.0.0.RC
>> 1,2)/xml/features</repository>
>>
>> When I download karaf 4.1.3 and start it, then execute command:
>> feature:list | grep pax-cdi
>> output show version 1.0.0.RC2
>>
>> But after feature:repo-add cxf 3.2.0, then re-run feature:list | grep
>> pax-cdi
>> it shows additional 1.0.0-SNAPSHOT
>>
>> I suspect that karaf cannot resolve RCx version sufix
>>
>> thanks, m.
>>
>>
>>
>>
>> --
>>
>> ------------------------
>> Guillaume Nodet
>>
>>
>>
>>
>
>
> --
> ------------------------
> Guillaume Nodet
>
>


-- 
------------------------
Guillaume Nodet

Re: version resolving

Posted by Guillaume Nodet <gn...@apache.org>.
This is not really a bug imho, but there's no way to specify better the
version range in maven.
In order to work around this behavior, you need to remove maven snapshot
repositories containing pax-cdi.  This way, it should not be resolved.

2017-11-06 13:53 GMT+01:00 Michal Hlavac <mi...@hlavki.eu>:

> it means that there is bug in CXF, right?
>
>
>
> Because I can't build offline karaf distribution with cxf-3.2.0
>
> It searches for 1.0.0-SNAPSHOT on first start
>
>
>
> m.
>
>
> On pondelok, 6. novembra 2017 13:11:28 CET Guillaume Nodet wrote:
>
> Those version resolution are done by pax-url-aether which uses the aether
> library (the same one used by maven).
>
> I think the behavior is correct, see
>
>    https://cwiki.apache.org/confluence/display/MAVENOLD/
> Dependency+Mediation+and+Conflict+Resolution
>
>
> 2017-11-06 12:06 GMT+01:00 Michal Hlavac <mi...@hlavki.eu>:
>
> Hi,
>
> I would like to ask about version resolving in repository element of
> feature file.
> I am asking because of line 21 in https://github.com/apache/cxf/
> blob/cxf-3.2.1/osgi/karaf/features/src/main/resources/features.xml
>
> <repository>mvn:org.ops4j.pax.cdi/pax-cdi-features/[1.0.0.
> RC1,2)/xml/features</repository>
>
> When I download karaf 4.1.3 and start it, then execute command:
> feature:list | grep pax-cdi
> output show version 1.0.0.RC2
>
> But after feature:repo-add cxf 3.2.0, then re-run feature:list | grep
> pax-cdi
> it shows additional 1.0.0-SNAPSHOT
>
> I suspect that karaf cannot resolve RCx version sufix
>
> thanks, m.
>
>
>
>
> --
>
> ------------------------
> Guillaume Nodet
>
>
>
>


-- 
------------------------
Guillaume Nodet

Re: version resolving

Posted by Michal Hlavac <mi...@hlavki.eu>.
it means that there is bug in CXF, right?

Because I can't build offline karaf distribution with cxf-3.2.0
It searches for 1.0.0-SNAPSHOT on first start

m.

On pondelok, 6. novembra 2017 13:11:28 CET Guillaume Nodet wrote:


Those version resolution are done by pax-url-aether which uses the aether library (the same one used by maven).
I think the behavior is correct, see
   https://cwiki.apache.org/confluence/display/MAVENOLD/Dependency+Mediation+and+Conflict+Resolution[1]



2017-11-06 12:06 GMT+01:00 Michal Hlavac <miso@hlavki.eu[2]>:


Hi,

I would like to ask about version resolving in repository element of feature file.I am asking because of line 21 in https://github.com/apache/cxf/blob/cxf-3.2.1/osgi/karaf/features/src/main/resources/features.xml[3]





------------------------Guillaume Nodet







--------
[1] https://cwiki.apache.org/confluence/display/MAVENOLD/Dependency+Mediation+and+Conflict+Resolution
[2] mailto:miso@hlavki.eu
[3] https://github.com/apache/cxf/blob/cxf-3.2.1/osgi/karaf/features/src/main/resources/features.xml

Re: version resolving

Posted by Guillaume Nodet <gn...@apache.org>.
Those version resolution are done by pax-url-aether which uses the aether
library (the same one used by maven).
I think the behavior is correct, see

https://cwiki.apache.org/confluence/display/MAVENOLD/Dependency+Mediation+and+Conflict+Resolution

2017-11-06 12:06 GMT+01:00 Michal Hlavac <mi...@hlavki.eu>:

> Hi,
>
> I would like to ask about version resolving in repository element of
> feature file.
> I am asking because of line 21 in https://github.com/apache/cxf/
> blob/cxf-3.2.1/osgi/karaf/features/src/main/resources/features.xml
>
> <repository>mvn:org.ops4j.pax.cdi/pax-cdi-features/[1.0.0.
> RC1,2)/xml/features</repository>
>
> When I download karaf 4.1.3 and start it, then execute command:
> feature:list | grep pax-cdi
> output show version 1.0.0.RC2
>
> But after feature:repo-add cxf 3.2.0, then re-run feature:list | grep
> pax-cdi
> it shows additional 1.0.0-SNAPSHOT
>
> I suspect that karaf cannot resolve RCx version sufix
>
> thanks, m.
>
>


-- 
------------------------
Guillaume Nodet