Skip to content

Commit

Permalink
Provide OSGI support #8
Browse files Browse the repository at this point in the history
Added OSGi entries to `MANIFEST.MF`:

```
Bundle-ManifestVersion: 2
Bundle-Name: ksuid-creator
Bundle-SymbolicName: com.github.f4b6a3.ksuid
Bundle-Version: 2.1.0
Export-Package: com.github.f4b6a3.ksuid
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.ksuid`
  • Loading branch information
fabiolimace committed Sep 4, 2021
1 parent 779c361 commit 68f3779
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 5 deletions.
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ All notable changes to this project will be documented in this file.

Nothing unreleaded.

## [2.1.0] - 2021-09-04

Add OSGi entries to Manifest.MF #8

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.ksuid`.

## [2.0.0] - 2021-08-08

Now you call `KsuidFactory.newInstance()` and it's variants to get a new `KsuidFactory`.
Expand Down Expand Up @@ -88,7 +96,8 @@ Project created as an alternative Java implementation of [K-Sortable Unique IDen
- Added `DefaultRandomGenerator`
- Added test cases

[unreleased]: https://github.com/f4b6a3/ksuid-creator/compare/ksuid-creator-2.0.0...HEAD
[unreleased]: https://github.com/f4b6a3/ksuid-creator/compare/ksuid-creator-2.1.0...HEAD
[2.1.0]: https://github.com/f4b6a3/ksuid-creator/compare/ksuid-creator-2.0.0...ksuid-creator-2.1.0
[2.0.0]: https://github.com/f4b6a3/ksuid-creator/compare/ksuid-creator-1.1.2...ksuid-creator-2.0.0
[1.1.2]: https://github.com/f4b6a3/ksuid-creator/compare/ksuid-creator-1.1.1...ksuid-creator-1.1.2
[1.1.1]: https://github.com/f4b6a3/ksuid-creator/compare/ksuid-creator-1.1.0...ksuid-creator-1.1.1
Expand Down
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,18 @@ Add these lines to your `pom.xml`.
<dependency>
<groupId>com.github.f4b6a3</groupId>
<artifactId>ksuid-creator</artifactId>
<version>2.0.0</version>
<version>2.1.0</version>
</dependency>
```

See more options in [maven.org](https://search.maven.org/artifact/com.github.f4b6a3/ksuid-creator).

Module name: `com.github.f4b6a3.ksuid`.
### Modularity

Module and bundle names are the same as the root package name.

- JPMS module name: `com.github.f4b6a3.ksuid`
- OSGi symbolic name: `com.github.f4b6a3.ksuid`

### KSUID

Expand Down
12 changes: 10 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

<properties>
<jdk.version>8</jdk.version>
<module.name>com.github.f4b6a3.ksuid</module.name>
<package.name>com.github.f4b6a3.ksuid</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>
Expand Down Expand Up @@ -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>
Expand Down

0 comments on commit 68f3779

Please sign in to comment.