version format

2 views
Skip to first unread message

William la Forge

unread,
May 24, 2013, 1:32:54 AM5/24/13
to AgileWikiDevelopers
In Karaft, when we use a method like BundleContext.installBundle, the version must be in the form 0.0.1-SNAPSHOT. On the other hand, a call to Version.toString returns the version in the form 0.0.1.SNAPSHOT. So I've added the static method, niceVersion(Version) to MailboxFactoryActivator. I've also changed OsgiFactoryLocator to use niceVersion in the service properties when registering a factory locator service.

I've been saying all along that OSGi is easy to use. But I would add that it is not always very nice.

monster

unread,
May 24, 2013, 6:07:18 AM5/24/13
to agilewiki...@googlegroups.com
"0.0.1.SNAPSHOT" looks rather strange/unusual. Where does the class Version come from?

William la Forge

unread,
May 24, 2013, 6:42:56 AM5/24/13
to AgileWikiDevelopers
org.osgi.framework.Bundle.getVersion() returns an org.osgi.framework.Version object.

Now it turns out there is a good reason why Version returns that strange format. There are apparently a number of places where '-' is not allowed. For example, if you enter the command "config:edit jactor-test-service", everything after the '-' is replaced by a generated id, though you will only see this when you enter a config:list command.

It is those little things that make such a difference, yes?


On Fri, May 24, 2013 at 3:37 PM, monster <skunki...@googlemail.com> wrote:
"0.0.1.SNAPSHOT" looks rather strange/unusual. Where does the class Version come from?

--
You received this message because you are subscribed to the Google Groups "AgileWikiDevelopers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to agilewikidevelo...@googlegroups.com.
To post to this group, send email to agilewiki...@googlegroups.com.
Visit this group at http://groups.google.com/group/agilewikidevelopers?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages