f4b6a3 / uuid-creator

UUID Creator is a Java library for generating Universally Unique Identifiers.
MIT License
431 stars 44 forks source link

Provide OSGI support #46

Closed bjmi closed 3 years ago

bjmi commented 3 years ago

UUID creator could also be used in OSGI environments if MANIFEST.MF would have bundle entries like e.g.

Bundle-ManifestVersion: 2
Bundle-Name: UUID Creator
Bundle-SymbolicName: com.github.f4b6a3.uuid-creator
Bundle-Version: 4.0.0
Export-Package: com.github.f4b6a3.uuid,
  ...

Please provide a solution and UUID creator could be used out of the box.

fabiolimace commented 3 years ago

Released version 4.0.1.

Added these entries to MANIFEST.MF:

Bundle-ManifestVersion: 2
Bundle-Name: uuid-creator
Bundle-SymbolicName: com.github.f4b6a3.uuid-creator
Bundle-Version: 4.0.1
Export-Package: com.github.f4b6a3.uuid;uses:="com.github.f4b6a3.uuid.enu
 ms",com.github.f4b6a3.uuid.codec,com.github.f4b6a3.uuid.codec.base;uses
 :="com.github.f4b6a3.uuid.codec,com.github.f4b6a3.uuid.codec.base.funct
 ion,com.github.f4b6a3.uuid.util.immutable",com.github.f4b6a3.uuid.codec
 .base.function;uses:="com.github.f4b6a3.uuid.codec.base,com.github.f4b6
 a3.uuid.util.immutable",com.github.f4b6a3.uuid.codec.other;uses:="com.g
 ithub.f4b6a3.uuid.codec,com.github.f4b6a3.uuid.codec.base",com.github.f
 4b6a3.uuid.enums,com.github.f4b6a3.uuid.exception,com.github.f4b6a3.uui
 d.factory;uses:="com.github.f4b6a3.uuid.enums,com.github.f4b6a3.uuid.fa
 ctory.function",com.github.f4b6a3.uuid.factory.function,com.github.f4b6
 a3.uuid.factory.function.impl;uses:="com.github.f4b6a3.uuid.factory.fun
 ction",com.github.f4b6a3.uuid.factory.nonstandard;uses:="com.github.f4b
 6a3.uuid.factory,com.github.f4b6a3.uuid.factory.function",com.github.f4
 b6a3.uuid.factory.rfc4122;uses:="com.github.f4b6a3.uuid.enums,com.githu
 b.f4b6a3.uuid.factory,com.github.f4b6a3.uuid.factory.function",com.gith
 ub.f4b6a3.uuid.util;uses:="com.github.f4b6a3.uuid.enums",com.github.f4b
 6a3.uuid.util.immutable

Let me know if you can use it in OSGi environments out of the box.

bjmi commented 3 years ago

Thank you for implementing this feature request. It works out of the box in our Eclipse applications.

I have a little refinement to add - bundle requires at least Java 8 to run: Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=1.8))"

fabiolimace commented 3 years ago

Released version 4.0.2.

Thank you for your request!

fabiolimace commented 3 years ago

@bjmi

I changed my mind. Now the OSGi symbolic name is the same as the root package name: com.github.f4b6a3.uuid.

Released version 4.1.0.

Thanks for your help!