You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by Marshall Schor <ms...@schor.com> on 2010/05/03 16:47:19 UTC

eclipse plugin version names with dash

For our builds, we have been doing extra stuff to have 2 kinds of versions:

Maven conventions: 2.3.1-SNAPSHOT and
Eclipse plugin conventions: 2.3.1.SNAPSHOT

Eclipse appears to have been updated to allow the dash: see
https://bugs.eclipse.org/bugs/show_bug.cgi?id=197503

So I'll presume this works and as part of my maven alignment work,
remove the special treatment of versions for eclipse & osgi plugins,
going forward.

-Marshall


Re: eclipse plugin version names with dash

Posted by Adam Lally <al...@alum.rpi.edu>.
On Mon, May 3, 2010 at 11:30 AM, Marshall Schor <ms...@schor.com> wrote:

> On 5/3/2010 10:59 AM, Thilo Goetz wrote:
> > Marshall,
> >
> > 2.3.1-SNAPSHOT is not a valid OSGi version number.
>
> I read on the internet (makes it true :-) )   in the reference link
> below that
> "
>
> According to OSGi spec 4.1 section 3.5.2 Bundle-SymbolicName has syntax:
> Bundle-SymbolicName ::= symbolic-name ( ';' parameter ) *
> and in 1.3.2 we see the following:
> symbolic-name ::= token('.'token)*
> token ::= ( alphanum | '_' | '-')+
>
> so '-' is a legal character and therefor eclipse should not warn us
>
> Is this incorrect?  Or is this an OSGi spec back-level compliance issue?
>
>
I think the problem is with the Bundle-Version, not the Bundle-SymbolicName.
 -Adam

Re: eclipse plugin version names with dash

Posted by Tommaso Teofili <to...@gmail.com>.
2010/5/4 Marshall Schor <ms...@schor.com>

> Thanks, Thilo (and Adam), for explaining this.
>
> I've discovered that the maven builder-helper plugin can parse the
> version and create a bunch of properties, including osgiVersion - which
> replaces the first "-" with a ".".
>
> So here's the strategy I'm hoping will work:
>
> 1) have the maven version number for the project be x.y.z-SNAPSHOT for
> instance, with the dash.
>
> 2) Have the POM set the final build artifact name to be x.y.z.SNAPSHOT
> for instance, using the osgiVersion property.
>
>
I tried playing with version numbers a little bit for the OSGi annotators to
see if anything broke out but could not find visible issues, even if I was
able to test it only inside Felix.
This solution sounds good to me :-)
Cheers.
Tommaso

Re: eclipse plugin version names with dash

Posted by Thilo Götz <tw...@gmx.de>.
+1, that should make every system happy.

--Thilo

On 5/4/2010 15:33, Marshall Schor wrote:
> Thanks, Thilo (and Adam), for explaining this.
> 
> I've discovered that the maven builder-helper plugin can parse the
> version and create a bunch of properties, including osgiVersion - which
> replaces the first "-" with a ".". 
> 
> So here's the strategy I'm hoping will work:
> 
> 1) have the maven version number for the project be x.y.z-SNAPSHOT for
> instance, with the dash.
> 
> 2) Have the POM set the final build artifact name to be x.y.z.SNAPSHOT
> for instance, using the osgiVersion property.
> 
> -Marshall
> 
> On 5/3/2010 11:41 AM, Thilo Goetz wrote:
>> That's a bundle identifier, such as org.apache.uima.core.
>> I thought we were talking about version numbers.  This is
>> from the the OSGi javadocs:
>>
>> version ::= major('.'minor('.'micro('.'qualifier)?)?)?
>>  major ::= digit+
>>  minor ::= digit+
>>  micro ::= digit+
>>  qualifier ::= (alpha|digit|'_'|'-')+
>>  digit ::= [0..9]
>>  alpha ::= [a..zA..Z]
>>
>> So you could have 2.3.1.0-SNAPSHOT, but not 2.3.1-SNAPSHOT,
>> if I'm reading this right.  (Where OSGi would treat 0-SNAPSHOT
>> as a single, unanalyzed token).
>>
>> I have no problem with the maven convention, and I totally
>> agree we should use the same version string wherever possible.
>> It's just that for OSGi modules other than Eclipse, we may
>> have to do something special after all.
>>
>> --Thilo
>>
>> On 5/3/2010 17:30, Marshall Schor wrote:
>>   
>>>
>>> On 5/3/2010 10:59 AM, Thilo Goetz wrote:
>>>     
>>>> Marshall,
>>>>
>>>> 2.3.1-SNAPSHOT is not a valid OSGi version number.  
>>>>       
>>> I read on the internet (makes it true :-) )   in the reference link
>>> below that
>>> "
>>>
>>> According to OSGi spec 4.1 section 3.5.2 Bundle-SymbolicName has syntax:
>>> Bundle-SymbolicName ::= symbolic-name ( ';' parameter ) *
>>> and in 1.3.2 we see the following:
>>> symbolic-name ::= token('.'token)*
>>> token ::= ( alphanum | '_' | '-')+
>>>
>>> so '-' is a legal character and therefor eclipse should not warn us 
>>>
>>> Is this incorrect?  Or is this an OSGi spec back-level compliance issue?
>>>
>>> -Marshall
>>>
>>>     
>>>> Eclipse
>>>> may be doing funny stuff to get around this, but it's not
>>>> going to work for other OSGi runtimes.  Not sure if that
>>>> affects Tommaso's work?
>>>>
>>>> --Thilo
>>>>
>>>> On 5/3/2010 16:47, Marshall Schor wrote:
>>>>   
>>>>       
>>>>> For our builds, we have been doing extra stuff to have 2 kinds of versions:
>>>>>
>>>>> Maven conventions: 2.3.1-SNAPSHOT and
>>>>> Eclipse plugin conventions: 2.3.1.SNAPSHOT
>>>>>
>>>>> Eclipse appears to have been updated to allow the dash: see
>>>>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=197503
>>>>>
>>>>> So I'll presume this works and as part of my maven alignment work,
>>>>> remove the special treatment of versions for eclipse & osgi plugins,
>>>>> going forward.
>>>>>
>>>>> -Marshall
>>>>>     
>>>>>         
>>>>   
>>>>       
>>
>>   

Re: eclipse plugin version names with dash

Posted by Marshall Schor <ms...@schor.com>.
Thanks, Thilo (and Adam), for explaining this.

I've discovered that the maven builder-helper plugin can parse the
version and create a bunch of properties, including osgiVersion - which
replaces the first "-" with a ".". 

So here's the strategy I'm hoping will work:

1) have the maven version number for the project be x.y.z-SNAPSHOT for
instance, with the dash.

2) Have the POM set the final build artifact name to be x.y.z.SNAPSHOT
for instance, using the osgiVersion property.

-Marshall

On 5/3/2010 11:41 AM, Thilo Goetz wrote:
> That's a bundle identifier, such as org.apache.uima.core.
> I thought we were talking about version numbers.  This is
> from the the OSGi javadocs:
>
> version ::= major('.'minor('.'micro('.'qualifier)?)?)?
>  major ::= digit+
>  minor ::= digit+
>  micro ::= digit+
>  qualifier ::= (alpha|digit|'_'|'-')+
>  digit ::= [0..9]
>  alpha ::= [a..zA..Z]
>
> So you could have 2.3.1.0-SNAPSHOT, but not 2.3.1-SNAPSHOT,
> if I'm reading this right.  (Where OSGi would treat 0-SNAPSHOT
> as a single, unanalyzed token).
>
> I have no problem with the maven convention, and I totally
> agree we should use the same version string wherever possible.
> It's just that for OSGi modules other than Eclipse, we may
> have to do something special after all.
>
> --Thilo
>
> On 5/3/2010 17:30, Marshall Schor wrote:
>   
>>
>> On 5/3/2010 10:59 AM, Thilo Goetz wrote:
>>     
>>> Marshall,
>>>
>>> 2.3.1-SNAPSHOT is not a valid OSGi version number.  
>>>       
>> I read on the internet (makes it true :-) )   in the reference link
>> below that
>> "
>>
>> According to OSGi spec 4.1 section 3.5.2 Bundle-SymbolicName has syntax:
>> Bundle-SymbolicName ::= symbolic-name ( ';' parameter ) *
>> and in 1.3.2 we see the following:
>> symbolic-name ::= token('.'token)*
>> token ::= ( alphanum | '_' | '-')+
>>
>> so '-' is a legal character and therefor eclipse should not warn us 
>>
>> Is this incorrect?  Or is this an OSGi spec back-level compliance issue?
>>
>> -Marshall
>>
>>     
>>> Eclipse
>>> may be doing funny stuff to get around this, but it's not
>>> going to work for other OSGi runtimes.  Not sure if that
>>> affects Tommaso's work?
>>>
>>> --Thilo
>>>
>>> On 5/3/2010 16:47, Marshall Schor wrote:
>>>   
>>>       
>>>> For our builds, we have been doing extra stuff to have 2 kinds of versions:
>>>>
>>>> Maven conventions: 2.3.1-SNAPSHOT and
>>>> Eclipse plugin conventions: 2.3.1.SNAPSHOT
>>>>
>>>> Eclipse appears to have been updated to allow the dash: see
>>>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=197503
>>>>
>>>> So I'll presume this works and as part of my maven alignment work,
>>>> remove the special treatment of versions for eclipse & osgi plugins,
>>>> going forward.
>>>>
>>>> -Marshall
>>>>     
>>>>         
>>>   
>>>       
>
>   

Re: eclipse plugin version names with dash

Posted by Thilo Goetz <tw...@gmx.de>.
That's a bundle identifier, such as org.apache.uima.core.
I thought we were talking about version numbers.  This is
from the the OSGi javadocs:

version ::= major('.'minor('.'micro('.'qualifier)?)?)?
 major ::= digit+
 minor ::= digit+
 micro ::= digit+
 qualifier ::= (alpha|digit|'_'|'-')+
 digit ::= [0..9]
 alpha ::= [a..zA..Z]

So you could have 2.3.1.0-SNAPSHOT, but not 2.3.1-SNAPSHOT,
if I'm reading this right.  (Where OSGi would treat 0-SNAPSHOT
as a single, unanalyzed token).

I have no problem with the maven convention, and I totally
agree we should use the same version string wherever possible.
It's just that for OSGi modules other than Eclipse, we may
have to do something special after all.

--Thilo

On 5/3/2010 17:30, Marshall Schor wrote:
> 
> 
> On 5/3/2010 10:59 AM, Thilo Goetz wrote:
>> Marshall,
>>
>> 2.3.1-SNAPSHOT is not a valid OSGi version number.  
> 
> I read on the internet (makes it true :-) )   in the reference link
> below that
> "
> 
> According to OSGi spec 4.1 section 3.5.2 Bundle-SymbolicName has syntax:
> Bundle-SymbolicName ::= symbolic-name ( ';' parameter ) *
> and in 1.3.2 we see the following:
> symbolic-name ::= token('.'token)*
> token ::= ( alphanum | '_' | '-')+
> 
> so '-' is a legal character and therefor eclipse should not warn us 
> 
> Is this incorrect?  Or is this an OSGi spec back-level compliance issue?
> 
> -Marshall
> 
>> Eclipse
>> may be doing funny stuff to get around this, but it's not
>> going to work for other OSGi runtimes.  Not sure if that
>> affects Tommaso's work?
>>
>> --Thilo
>>
>> On 5/3/2010 16:47, Marshall Schor wrote:
>>   
>>> For our builds, we have been doing extra stuff to have 2 kinds of versions:
>>>
>>> Maven conventions: 2.3.1-SNAPSHOT and
>>> Eclipse plugin conventions: 2.3.1.SNAPSHOT
>>>
>>> Eclipse appears to have been updated to allow the dash: see
>>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=197503
>>>
>>> So I'll presume this works and as part of my maven alignment work,
>>> remove the special treatment of versions for eclipse & osgi plugins,
>>> going forward.
>>>
>>> -Marshall
>>>     
>>
>>   

Re: eclipse plugin version names with dash

Posted by Marshall Schor <ms...@schor.com>.

On 5/3/2010 10:59 AM, Thilo Goetz wrote:
> Marshall,
>
> 2.3.1-SNAPSHOT is not a valid OSGi version number.  

I read on the internet (makes it true :-) )   in the reference link
below that
"

According to OSGi spec 4.1 section 3.5.2 Bundle-SymbolicName has syntax:
Bundle-SymbolicName ::= symbolic-name ( ';' parameter ) *
and in 1.3.2 we see the following:
symbolic-name ::= token('.'token)*
token ::= ( alphanum | '_' | '-')+

so '-' is a legal character and therefor eclipse should not warn us 

Is this incorrect?  Or is this an OSGi spec back-level compliance issue?

-Marshall

> Eclipse
> may be doing funny stuff to get around this, but it's not
> going to work for other OSGi runtimes.  Not sure if that
> affects Tommaso's work?
>
> --Thilo
>
> On 5/3/2010 16:47, Marshall Schor wrote:
>   
>> For our builds, we have been doing extra stuff to have 2 kinds of versions:
>>
>> Maven conventions: 2.3.1-SNAPSHOT and
>> Eclipse plugin conventions: 2.3.1.SNAPSHOT
>>
>> Eclipse appears to have been updated to allow the dash: see
>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=197503
>>
>> So I'll presume this works and as part of my maven alignment work,
>> remove the special treatment of versions for eclipse & osgi plugins,
>> going forward.
>>
>> -Marshall
>>     
>
>   

Re: eclipse plugin version names with dash

Posted by Thilo Goetz <tw...@gmx.de>.
Marshall,

2.3.1-SNAPSHOT is not a valid OSGi version number.  Eclipse
may be doing funny stuff to get around this, but it's not
going to work for other OSGi runtimes.  Not sure if that
affects Tommaso's work?

--Thilo

On 5/3/2010 16:47, Marshall Schor wrote:
> For our builds, we have been doing extra stuff to have 2 kinds of versions:
> 
> Maven conventions: 2.3.1-SNAPSHOT and
> Eclipse plugin conventions: 2.3.1.SNAPSHOT
> 
> Eclipse appears to have been updated to allow the dash: see
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=197503
> 
> So I'll presume this works and as part of my maven alignment work,
> remove the special treatment of versions for eclipse & osgi plugins,
> going forward.
> 
> -Marshall