Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Issue 298 in protobuf: protobuf jar's manifest should include OSGi metadata
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  Messages 1 - 25 of 37 - Collapse all  -  Translate all to Translated (View all originals)   Newer >
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
proto...@googlecode.com  
View profile  
 More options May 27 2011, 11:41 am
From: proto...@googlecode.com
Date: Fri, 27 May 2011 15:41:17 +0000
Local: Fri, May 27 2011 11:41 am
Subject: Issue 298 in protobuf: protobuf jar's manifest should include OSGi metadata
Status: New
Owner: liuj...@google.com
Labels: Type-Defect Priority-Medium

New issue 298 by neverov....@gmail.com: protobuf jar's manifest should  
include OSGi metadata
http://code.google.com/p/protobuf/issues/detail?id=298

What steps will reproduce the problem?
1. build the jar
2. open it and look at META-INF/MANIFEST.MF

What is the expected output? What do you see instead?
- There should be OSGi R4.2 metadata present

What version of the product are you using? On what operating system?
- reproes on all

Please provide any additional information below.
- This is needed in order to be able to install and use protobuf jar inside  
OSGi container


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ben Wright  
View profile  
 More options May 27 2011, 12:07 pm
From: Ben Wright <compuware...@gmail.com>
Date: Fri, 27 May 2011 09:07:53 -0700 (PDT)
Local: Fri, May 27 2011 12:07 pm
Subject: Re: Issue 298 in protobuf: protobuf jar's manifest should include OSGi metadata
This would be helpful for a number of user's I would presume.  We
manually build and bundle the protobuf jar as an OSGi library jar.

On May 27, 11:41 am, proto...@googlecode.com wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
proto...@googlecode.com  
View profile  
 More options May 30 2011, 1:31 am
From: proto...@googlecode.com
Date: Mon, 30 May 2011 05:31:00 +0000
Subject: Re: Issue 298 in protobuf: protobuf jar's manifest should include OSGi metadata
Updates:
        Status: NeedPatchFromUser

Comment #1 on issue 298 by liuj...@google.com: protobuf jar's manifest  
should include OSGi metadata
http://code.google.com/p/protobuf/issues/detail?id=298

Hmm, I'm not familiar with OSGi. Would you please provide a patch for this?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
proto...@googlecode.com  
View profile  
 More options May 30 2011, 4:28 am
From: proto...@googlecode.com
Date: Mon, 30 May 2011 08:28:20 +0000
Local: Mon, May 30 2011 4:28 am
Subject: Re: Issue 298 in protobuf: protobuf jar's manifest should include OSGi metadata

Comment #2 on issue 298 by neverov....@gmail.com: protobuf jar's manifest  
should include OSGi metadata
http://code.google.com/p/protobuf/issues/detail?id=298

Ok. I'll try to look into it later this week (probably over the weekend).

First, I'll try to identify what exactly this metadata should be to make it  
work with my project. Then, I'll try to figure out how to make Maven  
generate it properly.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
proto...@googlecode.com  
View profile  
 More options May 30 2011, 10:31 am
From: proto...@googlecode.com
Date: Mon, 30 May 2011 14:31:28 +0000
Local: Mon, May 30 2011 10:31 am
Subject: Re: Issue 298 in protobuf: protobuf jar's manifest should include OSGi metadata

Comment #3 on issue 298 by neverov....@gmail.com: protobuf jar's manifest  
should include OSGi metadata
http://code.google.com/p/protobuf/issues/detail?id=298

Couldn't hold myself from looking into this :) Please find the first  
version of the patch attached (sorry if it's not in accepted format - this  
is the first time I try to contribute).

There is one concern though. I've noticed that you use "2.4.2-pre" as an  
intermediate version number. As far as I know, OSGi spec requires all  
components to be separated by dots, so "2.4.2.pre" would be correct.  
Without this change, installing such a bundle (jar) into OSGi container  
will fail. So, I can see two approaches we can take:
1) Name intermediate versions as OSGi requires (using dots)
2) Create a separate property like "osgi.version"

I would vote for the approach 1), since it avoids duplication.

To my best knowledge, the generated manifest should look like this (feel  
free to suggest if something looks wrong):

Manifest-Version: 1.0
Archiver-Version: Plexus Archiver
Created-By: Apache Maven
Built-By: ann
Build-Jdk: 1.6.0_21
Bundle-ManifestVersion: 2
Bundle-SymbolicName: com.google.protobuf
Bundle-Version: 2.4.2.pre
Bundle-Name: Protocol Buffer Java API
Bundle-Description: Protocol Buffers are a way of encoding structured
  data in an efficient yet   extensible format.
Bundle-Vendor: googlecode.com
Bundle-DocURL: http://code.google.com/p/protobuf
Bundle-Category: newtwork, library
Bundle-License: http://www.opensource.org/licenses/bsd-license.php
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Export-Package: com.google.protobuf;version="2.4.2.pre"

Attachments:
        osgi.patch  2.0 KB


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
proto...@googlecode.com  
View profile  
 More options May 30 2011, 2:59 pm
From: proto...@googlecode.com
Date: Mon, 30 May 2011 18:59:59 +0000
Local: Mon, May 30 2011 2:59 pm
Subject: Re: Issue 298 in protobuf: protobuf jar's manifest should include OSGi metadata

Comment #4 on issue 298 by sam.hend...@gmail.com: protobuf jar's manifest  
should include OSGi metadata
http://code.google.com/p/protobuf/issues/detail?id=298

My team has been creating and using snapshot bundles in karaf/Felix OSGi  
containers for a few months so I don't think it's a hard requirement that  
bundles have only 3 dot version #s.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
proto...@googlecode.com  
View profile  
 More options May 30 2011, 3:17 pm
From: proto...@googlecode.com
Date: Mon, 30 May 2011 19:17:03 +0000
Local: Mon, May 30 2011 3:17 pm
Subject: Re: Issue 298 in protobuf: protobuf jar's manifest should include OSGi metadata

Comment #5 on issue 298 by neverov....@gmail.com: protobuf jar's manifest  
should include OSGi metadata
http://code.google.com/p/protobuf/issues/detail?id=298

Well, in my project I also use Felix and I believe I got an error  
with "2.4.2-pre".

I saw that recommendation in the book called OSGi in Action. Also at  
http://www.osgi.org/javadoc/r4v43/org/osgi/framework/Version.html I can see:

"public Version(java.lang.String version)

Created a version identifier from the specified string.
Here is the grammar for version strings.

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

There must be no whitespace in version."

So, I guess "2.4.2.-pre" would qualify as well. But IMHO it looks  
strange. :)


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
proto...@googlecode.com  
View profile  
 More options May 31 2011, 5:13 pm
From: proto...@googlecode.com
Date: Tue, 31 May 2011 21:13:19 +0000
Local: Tues, May 31 2011 5:13 pm
Subject: Re: Issue 298 in protobuf: protobuf jar's manifest should include OSGi metadata

Comment #6 on issue 298 by compuwar...@gmail.com: protobuf jar's manifest  
should include OSGi metadata
http://code.google.com/p/protobuf/issues/detail?id=298

As a check against what other are doing... we use the following data in  
meta-inf

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Protocol Buffers Library
Bundle-SymbolicName: com.google.protobuf
Bundle-Version: 2.4.1
Bundle-Vendor: Google
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Export-Package: com.google.protobuf


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
proto...@googlecode.com  
View profile  
 More options Aug 30 2011, 9:04 am
From: proto...@googlecode.com
Date: Tue, 30 Aug 2011 13:04:17 +0000
Local: Tues, Aug 30 2011 9:04 am
Subject: Re: Issue 298 in protobuf: protobuf jar's manifest should include OSGi metadata

Comment #7 on issue 298 by thomas.k...@googlemail.com: protobuf jar's  
manifest should include OSGi metadata
http://code.google.com/p/protobuf/issues/detail?id=298

To create an OSGI bundle apply the following changes to the pom.xml:
(Line 14):
   <packaging>bundle</packaging>
instead of
   <packaging>jar</packaging>

in <build><plugins> add
       <plugin>
         <groupId>org.apache.felix</groupId>
         <artifactId>maven-bundle-plugin</artifactId>
         <extensions>true</extensions>
         <configuration>
           <instructions>
             <Export-Package>*</Export-Package>
           </instructions>
         </configuration>
       </plugin>

That's about it.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
proto...@googlecode.com  
View profile  
 More options May 17 2012, 11:56 am
From: proto...@googlecode.com
Date: Thu, 17 May 2012 15:56:45 +0000
Local: Thurs, May 17 2012 11:56 am
Subject: Re: Issue 298 in protobuf: protobuf jar's manifest should include OSGi metadata

Comment #8 on issue 298 by cjdo...@gmail.com: protobuf jar's manifest  
should include OSGi metadata
http://code.google.com/p/protobuf/issues/detail?id=298

The advantage of comment #7's approach is that OSGi vs. Maven version  
number syntax is automatically handled by the plugin. I strongly endorse  
that approach. But the patch from comment #3 is pretty good too.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
proto...@googlecode.com  
View profile  
 More options Aug 8 2012, 8:15 pm
From: proto...@googlecode.com
Date: Thu, 09 Aug 2012 00:15:18 +0000
Local: Wed, Aug 8 2012 8:15 pm
Subject: Re: Issue 298 in protobuf: protobuf jar's manifest should include OSGi metadata

Comment #9 on issue 298 by cgruberatg...@gmail.com: protobuf jar's manifest  
should include OSGi metadata
http://code.google.com/p/protobuf/issues/detail?id=298

Here's a patch to the pom, adapted from Guice's info, that doesn't require  
a packaging type change, and includes appropriate copyright info, is  
compatible with the M2E (maven eclipse integration).

It also fixes the maven version number, setting it to the recommended  
2.4.2-SNAPSHOT (-pre is treated as a final release version called -pre,  
whereas SNAPSHOT is treated as a volatile in-development version).  As  
mentioned above in comment #7, felix will take care of all the important  
metadata translations.

Attachments:
        fixpom.diff  3.3 KB


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
proto...@googlecode.com  
View profile  
 More options Aug 8 2012, 11:34 pm
From: proto...@googlecode.com
Date: Thu, 09 Aug 2012 03:34:57 +0000
Local: Wed, Aug 8 2012 11:34 pm
Subject: Re: Issue 298 in protobuf: protobuf jar's manifest should include OSGi metadata
Updates:
        Owner: xiaof...@google.com

Comment #10 on issue 298 by liuj...@google.com: protobuf jar's manifest  
should include OSGi metadata
http://code.google.com/p/protobuf/issues/detail?id=298

(No comment was entered for this change.)


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
proto...@googlecode.com  
View profile  
 More options Aug 9 2012, 3:05 pm
From: proto...@googlecode.com
Date: Thu, 09 Aug 2012 19:05:21 +0000
Local: Thurs, Aug 9 2012 3:05 pm
Subject: Re: Issue 298 in protobuf: protobuf jar's manifest should include OSGi metadata

Comment #11 on issue 298 by cgruberatg...@gmail.com: protobuf jar's  
manifest should include OSGi metadata
http://code.google.com/p/protobuf/issues/detail?id=298

Woops - better - updated plugin version for osgi generation.

Attachments:
        osgi.patch  3.3 KB


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
proto...@googlecode.com  
View profile  
 More options Aug 9 2012, 3:06 pm
From: proto...@googlecode.com
Date: Thu, 09 Aug 2012 19:06:31 +0000
Local: Thurs, Aug 9 2012 3:06 pm
Subject: Re: Issue 298 in protobuf: protobuf jar's manifest should include OSGi metadata

Comment #12 on issue 298 by cgruberatg...@gmail.com: protobuf jar's  
manifest should include OSGi metadata
http://code.google.com/p/protobuf/issues/detail?id=298

Craaaap.  Fixed typo in project url.

Attachments:
        osgi.patch  3.3 KB


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
proto...@googlecode.com  
View profile  
 More options Oct 3 2012, 4:42 pm
From: proto...@googlecode.com
Date: Wed, 03 Oct 2012 20:42:25 +0000
Local: Wed, Oct 3 2012 4:42 pm
Subject: Re: Issue 298 in protobuf: protobuf jar's manifest should include OSGi metadata

Comment #13 on issue 298 by m...@thebishops.org: protobuf jar's manifest  
should include OSGi metadata
http://code.google.com/p/protobuf/issues/detail?id=298

Any status on this issue?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
proto...@googlecode.com  
View profile  
 More options Oct 22 2012, 5:32 am
From: proto...@googlecode.com
Date: Mon, 22 Oct 2012 09:32:33 +0000
Local: Mon, Oct 22 2012 5:32 am
Subject: Re: Issue 298 in protobuf: protobuf jar's manifest should include OSGi metadata

Comment #14 on issue 298 by matteo.c...@gmail.com: protobuf jar's manifest  
should include OSGi metadata
http://code.google.com/p/protobuf/issues/detail?id=298

It shouldn't be this difficult. maven-bundle-plugin can generate a proper  
OSGi manifest, any reason why this is taking so long? :)
Thanks


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
proto...@googlecode.com  
View profile  
 More options Oct 22 2012, 6:34 am
From: proto...@googlecode.com
Date: Mon, 22 Oct 2012 10:34:11 +0000
Local: Mon, Oct 22 2012 6:34 am
Subject: Re: Issue 298 in protobuf: protobuf jar's manifest should include OSGi metadata

Comment #15 on issue 298 by xiaof...@google.com: protobuf jar's manifest  
should include OSGi metadata
http://code.google.com/p/protobuf/issues/detail?id=298

Sorry, I didn't have enough time to work on protobuf opensource release for  
the last few weeks.
As to the OSGi manifest, the change seems to be trivial, but it doesn't  
seem right to me that we should change protobuf to make it conform to the  
specification of a certain container.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
proto...@googlecode.com  
View profile  
 More options Oct 22 2012, 6:39 am
From: proto...@googlecode.com
Date: Mon, 22 Oct 2012 10:39:43 +0000
Local: Mon, Oct 22 2012 6:39 am
Subject: Re: Issue 298 in protobuf: protobuf jar's manifest should include OSGi metadata

Comment #16 on issue 298 by matteo.c...@gmail.com: protobuf jar's manifest  
should include OSGi metadata
http://code.google.com/p/protobuf/issues/detail?id=298

OSGi is the defacto standard to build modular java applications. Many  
groups have done the wrapping themselves (see  
http://mvnrepository.com/artifact/org.apache.servicemix.bundles/org.a...  
for instance)  and there are now different osgfied snapshot of protobuf all  
over the place, which is very confusing and not right in any way.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
proto...@googlecode.com  
View profile  
 More options Oct 22 2012, 8:25 am
From: proto...@googlecode.com
Date: Mon, 22 Oct 2012 12:25:29 +0000
Local: Mon, Oct 22 2012 8:25 am
Subject: Re: Issue 298 in protobuf: protobuf jar's manifest should include OSGi metadata

Comment #17 on issue 298 by cjdo...@gmail.com: protobuf jar's manifest  
should include OSGi metadata
http://code.google.com/p/protobuf/issues/detail?id=298

Re: "it doesn't seem right to me that we should change protobuf to make it  
conform to the specification of a certain container." All Apache jars and  
many, many other popular jars (Spring, Guice, etc) have added OSGi headers,  
It's a trivial way to be a good citizen in the open source community.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
proto...@googlecode.com  
View profile  
 More options Oct 22 2012, 9:15 am
From: proto...@googlecode.com
Date: Mon, 22 Oct 2012 13:15:39 +0000
Local: Mon, Oct 22 2012 9:15 am
Subject: Re: Issue 298 in protobuf: protobuf jar's manifest should include OSGi metadata

Comment #18 on issue 298 by rocketra...@gmail.com: protobuf jar's manifest  
should include OSGi metadata
http://code.google.com/p/protobuf/issues/detail?id=298

"it doesn't seem right to me that we should change protobuf to make it  
conform to the specification of a certain container." --> In addition to  
the other comments, I might also note that, to be completey accurate, you  
aren't really *changing* protobuf as such. Rather you are *adding* support  
for many containers and applications that use OSGi meta-data. And the good  
part is that this addition is trivial and completely compatible with  
non-OSGi containers and applications.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
proto...@googlecode.com  
View profile  
 More options Oct 22 2012, 9:54 am
From: proto...@googlecode.com
Date: Mon, 22 Oct 2012 13:54:27 +0000
Local: Mon, Oct 22 2012 9:54 am
Subject: Re: Issue 298 in protobuf: protobuf jar's manifest should include OSGi metadata

Comment #19 on issue 298 by cvgav...@gmail.com: protobuf jar's manifest  
should include OSGi metadata
http://code.google.com/p/protobuf/issues/detail?id=298

I would like to use protobuf (in its latest version) in my equinox project  
too... Today I had to use a old version that was wrapped by spring source :(


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
proto...@googlecode.com  
View profile  
 More options Oct 22 2012, 11:07 am
From: proto...@googlecode.com
Date: Mon, 22 Oct 2012 15:07:46 +0000
Local: Mon, Oct 22 2012 11:07 am
Subject: Re: Issue 298 in protobuf: protobuf jar's manifest should include OSGi metadata

Comment #20 on issue 298 by m...@thebishops.org: protobuf jar's manifest  
should include OSGi metadata
http://code.google.com/p/protobuf/issues/detail?id=298

Protobuf is about enabling optimal data transfer between devices and  
servers. OSGi is about java software on mobile devices as well as other  
platforms. Seems only natural that the java version of protobuf has these  
headers in its manifest.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
proto...@googlecode.com  
View profile  
 More options Oct 22 2012, 11:49 am
From: proto...@googlecode.com
Date: Mon, 22 Oct 2012 15:49:49 +0000
Local: Mon, Oct 22 2012 11:49 am
Subject: Re: Issue 298 in protobuf: protobuf jar's manifest should include OSGi metadata

Comment #21 on issue 298 by xiaof...@google.com: protobuf jar's manifest  
should include OSGi metadata
http://code.google.com/p/protobuf/issues/detail?id=298

I have no idea of how widely OSGi is used in the open source community. Is  
it the suggested way to add OSGi meta data to every Java jar?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
proto...@googlecode.com  
View profile  
 More options Oct 22 2012, 11:52 am
From: proto...@googlecode.com
Date: Mon, 22 Oct 2012 15:52:56 +0000
Local: Mon, Oct 22 2012 11:52 am
Subject: Re: Issue 298 in protobuf: protobuf jar's manifest should include OSGi metadata

Comment #22 on issue 298 by matteo.c...@gmail.com: protobuf jar's manifest  
should include OSGi metadata
http://code.google.com/p/protobuf/issues/detail?id=298

This is the best way to add suport in my opinion since the manifest file  
gets generated and there's no room for mistakes there ->  
http://code.google.com/p/protobuf/issues/detail?id=298#c7
Thanks for looking into it.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
proto...@googlecode.com  
View profile  
 More options Oct 22 2012, 11:55 am
From: proto...@googlecode.com
Date: Mon, 22 Oct 2012 15:54:58 +0000
Local: Mon, Oct 22 2012 11:54 am
Subject: Re: Issue 298 in protobuf: protobuf jar's manifest should include OSGi metadata

Comment #23 on issue 298 by cjdo...@gmail.com: protobuf jar's manifest  
should include OSGi metadata
http://code.google.com/p/protobuf/issues/detail?id=298

Re: "Is it the suggested way to add OSGi meta data to every Java jar?" Yes.  
Increased modularity is Java's future, and OSGi is the dominant mechanism  
for modularity today. It's trivial to support it and it's very popular.  
Adding these few header values can increase protobuf's reach with almost no  
work.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Messages 1 - 25 of 37   Newer >
« Back to Discussions « Newer topic     Older topic »