You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Sahoo <Sa...@Sun.COM> on 2008/07/24 16:50:55 UTC

Maven version to OSGi version conversion for SNAPSHOTs

AFAIK, Maven considers x-SNAPSHOT to be earlier than x, where as the 
corresponding OSGi versions as generated by [1], which is used by 
maven-bundle-plugin, behave just the opposite. This does not seem right 
to me.

Thanks,
Sahoo

[1] 
http://svn.apache.org/repos/asf/maven/shared/tags/maven-osgi-0.2.0/src/main/java/org/apache/maven/shared/osgi/DefaultMaven2OsgiConverter.java

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Maven version to OSGi version conversion for SNAPSHOTs

Posted by Felix Meschberger <fm...@gmail.com>.
Hi Sahoo,

As a workaround for this started using a special version numbering 
scheme to come around this problem: Bundles are released with an even 
micro number (e.g. 1.0.0 or 1.0.2 or 1.2.6) and SNAPSHOT versions have 
an odd micro number (e.g. 1.0.1-SNAPSHOT, 1.2.5-SNAPSHOT).

This guarantees that the snapshot of the next release always comes 
before the next release and that the snapshot after a release always 
comes after a release.

Look for example at the Apache Felix scr, configadmin and metatype 
bundles (there is an exception for configadmin, which has a 1.0.1 
release. This will be fixed for the next release).

Hope this helps.

Regards
Felix

Sahoo schrieb:
> I do understand the two systems were developed independently, and I am 
> not expecting any of the two systems to change, but what I am hoping to 
> find out is that if there is a scope for maven-bundle-plugin to address 
> this issue.
> 
> Thanks,
> Sahoo
> 
> Richard S. Hall wrote:
>> I would guess this is just a general OSGi vs Maven version numbering 
>> scheme mismatch. The qualifier portion of a version in OSGi is just 
>> sorted lexical order, if I recall, so it is not possible to make no 
>> qualifier come after one with a qualifier, since an empty string 
>> always comes before a non-empty string.
>>
>> So, in short, it isn't right, but there isn't much we can do about it, 
>> I guess. The two systems were developed independently.
>>
>> -> richard
>>
>> Sahoo wrote:
>>> AFAIK, Maven considers x-SNAPSHOT to be earlier than x, where as the 
>>> corresponding OSGi versions as generated by [1], which is used by 
>>> maven-bundle-plugin, behave just the opposite. This does not seem 
>>> right to me.
>>>
>>> Thanks,
>>> Sahoo
>>>
>>> [1] 
>>> http://svn.apache.org/repos/asf/maven/shared/tags/maven-osgi-0.2.0/src/main/java/org/apache/maven/shared/osgi/DefaultMaven2OsgiConverter.java 
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>> For additional commands, e-mail: users-help@felix.apache.org
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Maven version to OSGi version conversion for SNAPSHOTs

Posted by "Richard S. Hall" <he...@ungoverned.org>.
Sahoo wrote:
> I do understand the two systems were developed independently, and I am 
> not expecting any of the two systems to change, but what I am hoping 
> to find out is that if there is a scope for maven-bundle-plugin to 
> address this issue.

Hmm. Off the top of my head, I don't see how.

Recently, there was some discussion within CPEG about treating a version 
with no qualifier as being higher than a version with a qualifier. 
However, it would cause too much confusion with version ranges. For 
example, [1.0.0, 2.0.0) would not include 1.0.0-SNAPSHOT in its range.

As a result, the proposal was dropped.

-> richard
>
> Thanks,
> Sahoo
>
> Richard S. Hall wrote:
>> I would guess this is just a general OSGi vs Maven version numbering 
>> scheme mismatch. The qualifier portion of a version in OSGi is just 
>> sorted lexical order, if I recall, so it is not possible to make no 
>> qualifier come after one with a qualifier, since an empty string 
>> always comes before a non-empty string.
>>
>> So, in short, it isn't right, but there isn't much we can do about 
>> it, I guess. The two systems were developed independently.
>>
>> -> richard
>>
>> Sahoo wrote:
>>> AFAIK, Maven considers x-SNAPSHOT to be earlier than x, where as the 
>>> corresponding OSGi versions as generated by [1], which is used by 
>>> maven-bundle-plugin, behave just the opposite. This does not seem 
>>> right to me.
>>>
>>> Thanks,
>>> Sahoo
>>>
>>> [1] 
>>> http://svn.apache.org/repos/asf/maven/shared/tags/maven-osgi-0.2.0/src/main/java/org/apache/maven/shared/osgi/DefaultMaven2OsgiConverter.java 
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>> For additional commands, e-mail: users-help@felix.apache.org
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Maven version to OSGi version conversion for SNAPSHOTs

Posted by Sahoo <Sa...@Sun.COM>.
I do understand the two systems were developed independently, and I am 
not expecting any of the two systems to change, but what I am hoping to 
find out is that if there is a scope for maven-bundle-plugin to address 
this issue.

Thanks,
Sahoo

Richard S. Hall wrote:
> I would guess this is just a general OSGi vs Maven version numbering 
> scheme mismatch. The qualifier portion of a version in OSGi is just 
> sorted lexical order, if I recall, so it is not possible to make no 
> qualifier come after one with a qualifier, since an empty string 
> always comes before a non-empty string.
>
> So, in short, it isn't right, but there isn't much we can do about it, 
> I guess. The two systems were developed independently.
>
> -> richard
>
> Sahoo wrote:
>> AFAIK, Maven considers x-SNAPSHOT to be earlier than x, where as the 
>> corresponding OSGi versions as generated by [1], which is used by 
>> maven-bundle-plugin, behave just the opposite. This does not seem 
>> right to me.
>>
>> Thanks,
>> Sahoo
>>
>> [1] 
>> http://svn.apache.org/repos/asf/maven/shared/tags/maven-osgi-0.2.0/src/main/java/org/apache/maven/shared/osgi/DefaultMaven2OsgiConverter.java 
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Maven version to OSGi version conversion for SNAPSHOTs

Posted by "Richard S. Hall" <he...@ungoverned.org>.
I would guess this is just a general OSGi vs Maven version numbering 
scheme mismatch. The qualifier portion of a version in OSGi is just 
sorted lexical order, if I recall, so it is not possible to make no 
qualifier come after one with a qualifier, since an empty string always 
comes before a non-empty string.

So, in short, it isn't right, but there isn't much we can do about it, I 
guess. The two systems were developed independently.

-> richard

Sahoo wrote:
> AFAIK, Maven considers x-SNAPSHOT to be earlier than x, where as the 
> corresponding OSGi versions as generated by [1], which is used by 
> maven-bundle-plugin, behave just the opposite. This does not seem 
> right to me.
>
> Thanks,
> Sahoo
>
> [1] 
> http://svn.apache.org/repos/asf/maven/shared/tags/maven-osgi-0.2.0/src/main/java/org/apache/maven/shared/osgi/DefaultMaven2OsgiConverter.java 
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org