Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [paho-dev] plan for java client?

Hi Ian,

On 5/2/2014 4:03 PM, Ian Craggs wrote:
Hi Scott,

I'm working on the packaging of the Java client for 0.9.0.  Creating an OSGi bundle, proper name, p2 repo etc.  It's the first time I've done this for a while (say 5 or 6 years) and I've never created a p2 repo, so I'm learning it all as I go (I'm following the Tycho tutorial/examples).  I imagine that it's going to take me a few days of next week (1.5 days so far, and there is a public holiday for us on Monday).

1) Bundle-Version as I have it is

That looks great to me.

You are moving the version from 0.4.1 to 0.9.0?   I have no objections if that numbering fits the needs of project...I just wanted to make sure it was intentional.   You generally *don't* want to have the bundle level versioning track the feature-or-release-level versioning (if you do, it can/will become a maintenance burden in my you want to have the bundle-level versioning be based as much as possible on OSGi semantic versioning [1]...for each of your bundle APIs separately.  But you are obviously all pre-version-1.0.0 right now it's not really that big a deal...until you reach 1.0.0. for the version attributes associated with the Export-Package...I would recommend *not* including the qualifier in those attributes, but rather just the major.minor.micro...e.g:

Export-Package: org.eclipse.paho.client.mqttv3;version="0.4.1";

rather than

Export-Package: org.eclipse.paho.client.mqttv3;version="0.4.1.SNAPSHOT";

2) singleton is currently still set to true because the Eclipse IDE advised me to do so (I can't remember the reason offhand, but if I remove it I'm sure it'll let me know)

Well, one reason it would have to be singleton is if you had a plugin.xml in was an eclipse plugin...and were using the extension registry (in Eclipse).  But I don't see any plugin.xml in your bundle...there's no bundle activator...and I don't obviously see any other code that requires it to be a you might be able to remove the singleton attribute.

3) Bundle-SymbolicName as I have it is currently org.eclipse.paho.client.mqttv3

4) yep, working on it.  Got to the stage of working out how to "create" a p2 repo, as the Maven build was complaining.

I have the Maven Grioup Id as org.eclipse.paho.client and the Artifact id as mqttv3, as the Tycho tutorial says "Note: Tycho requires that the artifactId in the POM is the same as the Bundle-SymbolicName in the OSGi manifest, and that the versions match (with .qualifier replaced by -SNAPSHOT) "

Any advice to make this quicker for me is welcome :-)

Well, there are plenty of Maven/Tycho gurus around EF projects, but I'm not one of them ;-).   I would personally be inclined to ask for assistance on cross-projects mailing list...and/or David Williams directly (don't tell him I said that).

I'm also working on packaging the MQTT client Eclipse view (will also be in the p2 repo)

That's great...thanks much.

and Swing sample GUI application (which may not be as it is meant to be run standalone).

I'm also working on the builds of the C client and packaging of the _javascript_ client for 0.9.0, so they'll be ready as soon as I can complete them.

Sounds great!  If I can help further, please let me know.



Back to the top