Provide OSGI support #16

Added OSGi entries to `MANIFEST.MF`:

```
Bundle-ManifestVersion: 2
Bundle-Name: ulid-creator
Bundle-SymbolicName: com.github.f4b6a3.ulid
Bundle-Version: 4.1.0
Export-Package: com.github.f4b6a3.ulid
Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=1.8))"
```

The OSGi symbolic name is the same as the root package name:
`com.github.f4b6a3.ulid`
This commit is contained in:
Fabio Lima 2021-09-04 01:49:53 -03:00
parent 564c0401c6
commit 132ab99b77
3 changed files with 27 additions and 5 deletions

View File

@ -6,6 +6,14 @@ All notable changes to this project will be documented in this file.
Nothing unreleased.
## [4.1.0] - 2021-09-04
Add OSGi entries to Manifest.MF #16
Module and bundle names are the same as the root package name.
The OSGi symbolic name is the same as the JPMS module name: `com.github.f4b6a3.ulid`.
## [4.0.0] - 2021-08-08
Now you call `UlidFactory.newInstance()` and it's variants to get a new `UlidFactory`.
@ -262,7 +270,8 @@ Project created as an alternative Java implementation of [ULID spec](https://git
- Added `LICENSE`
- Added test cases
[unreleased]: https://github.com/f4b6a3/ulid-creator/compare/ulid-creator-4.0.0...HEAD
[unreleased]: https://github.com/f4b6a3/ulid-creator/compare/ulid-creator-4.1.0...HEAD
[4.1.0]: https://github.com/f4b6a3/ulid-creator/compare/ulid-creator-4.0.0...ulid-creator-4.1.0
[4.0.0]: https://github.com/f4b6a3/ulid-creator/compare/ulid-creator-3.2.0...ulid-creator-4.0.0
[3.2.0]: https://github.com/f4b6a3/ulid-creator/compare/ulid-creator-3.1.1...ulid-creator-3.2.0
[3.1.1]: https://github.com/f4b6a3/ulid-creator/compare/ulid-creator-3.1.0...ulid-creator-3.1.1

View File

@ -35,12 +35,17 @@ Add these lines to your `pom.xml`.
<dependency>
<groupId>com.github.f4b6a3</groupId>
<artifactId>ulid-creator</artifactId>
<version>4.0.0</version>
<version>4.1.0</version>
</dependency>
```
See more options in [maven.org](https://search.maven.org/artifact/com.github.f4b6a3/ulid-creator).
Module name: `com.github.f4b6a3.ulid`.
### Modularity
Module and bundle names are the same as the root package name.
- JPMS module name: `com.github.f4b6a3.ulid`
- OSGi symbolic name: `com.github.f4b6a3.ulid`
### ULID

12
pom.xml
View File

@ -26,7 +26,7 @@
<properties>
<jdk.version>8</jdk.version>
<module.name>com.github.f4b6a3.ulid</module.name>
<package.name>com.github.f4b6a3.ulid</package.name>
<maven.compiler.source>${jdk.version}</maven.compiler.source>
<maven.compiler.target>${jdk.version}</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@ -68,7 +68,15 @@
<configuration>
<archive>
<manifestEntries>
<Automatic-Module-Name>${module.name}</Automatic-Module-Name>
<!-- Java Modularity -->
<Automatic-Module-Name>${package.name}</Automatic-Module-Name>
<!-- OSGi Modularity -->
<Bundle-ManifestVersion>2</Bundle-ManifestVersion>
<Bundle-Name>${project.artifactId}</Bundle-Name>
<Bundle-SymbolicName>${package.name}</Bundle-SymbolicName>
<Bundle-Version>${project.version}</Bundle-Version>
<Export-Package>${package.name}</Export-Package>
<Require-Capability>osgi.ee;filter:="(&amp;(osgi.ee=JavaSE)(version=1.8))"</Require-Capability>
</manifestEntries>
</archive>
</configuration>