Skip to content

Java interfaces defining OSGi services used across projects

License

Notifications You must be signed in to change notification settings

steinarb/osgi-service

Repository files navigation

OSGi service definitions

This repository defines OSGi services I have found useful, and where I have defined similar services in more than once project.

There are no applications in this project, only service definitions.

The service definitions have been deployed to maven central.

Status of the project

https://github.com/steinarb/osgi-service/actions/workflows/osgi-service-maven-ci-build.yml/badge.svg https://coveralls.io/repos/github/steinarb/osgi-service/badge.svg https://sonarcloud.io/api/project_badges/measure?project=steinarb_osgi-service&metric=alert_status#.svg https://maven-badges.herokuapp.com/maven-central/no.priv.bang.osgiservice/osgiservice/badge.svg https://www.javadoc.io/badge/no.priv.bang.osgiservice/osgiservice.svg

https://sonarcloud.io/images/project_badges/sonarcloud-white.svg

https://sonarcloud.io/api/project_badges/measure?project=steinarb_osgi-service&metric=sqale_index#.svg https://sonarcloud.io/api/project_badges/measure?project=steinarb_osgi-service&metric=coverage#.svg https://sonarcloud.io/api/project_badges/measure?project=steinarb_osgi-service&metric=ncloc#.svg https://sonarcloud.io/api/project_badges/measure?project=steinarb_osgi-service&metric=code_smells#.svg https://sonarcloud.io/api/project_badges/measure?project=steinarb_osgi-service&metric=sqale_rating#.svg https://sonarcloud.io/api/project_badges/measure?project=steinarb_osgi-service&metric=security_rating#.svg https://sonarcloud.io/api/project_badges/measure?project=steinarb_osgi-service&metric=bugs#.svg https://sonarcloud.io/api/project_badges/measure?project=steinarb_osgi-service&metric=vulnerabilities#.svg https://sonarcloud.io/api/project_badges/measure?project=steinarb_osgi-service&metric=duplicated_lines_density#.svg https://sonarcloud.io/api/project_badges/measure?project=steinarb_osgi-service&metric=reliability_rating#.svg

Services defined in this project

no.priv.bang.osgiservice.users.UserManagementService

The UserManagementService provides access to management of users, roles and permissions.

To compile code using this OSGi service, add the following dependency to your maven POM:

<dependency>
    <groupId>no.priv.bang.osgiservice</groupId>
    <artifactId>osgiservice.users</artifactId>
    <version>2.0.0</version>
    <scope>provided</scope>
</dependency>

To get runtime access to this OSGi service in apache karaf, add the following to the karaf feature definition of the OSGi bundle(s) using the interface:

<repository>mvn:no.priv.bang.osgiservice/osgiservice/2.0.0/xml/features</repository>
<feature name="myfeature">
    <feature>sb-database-osgi-service</feature>
</feature>

Alternatively, when using the karaf-maven-plugin it’s possible to add a karaf runtime feature dependency when generating a feature for your own bundle:

<dependency>
    <groupId>no.priv.bang.osgiservice</groupId>
    <artifactId>osgiservice.users</artifactId>
    <version>2.0.0</version>
    <type>xml</type>
    <classifier>features</classifier>
</dependency>

Release history

VersionDateDescription
2.0.0[2024-05-26]Replace immutable beans with records, remove the unused DatabaseService
1.8.0[2022-05-31]Built with karaf 4.4.0 and OSGi 8, use immutable beans 1.2.0
1.7.3[2021-06-10]Stop dependencyManagemen from the parent leaking into the BoM
1.7.2[2021-04-18]Add a “Bill of Materials” (BoM)
1.7.1[2021-04-15]Get maven dependencies and maven plugin config from a parent POM
1.7.0[2021-04-12]Built with karaf 4.3.0 and OSGi 7
1.6.1[2021-03-13]Fixes to the UserManagementService bean builders. Should have tested better before releasing
1.6.0[2021-03-10]Use builders to create the beans used in the UserManagementService interface
1.5.0[2019-12-31]Let Immutable provide hashCode() and equals() implementation to user management beans
1.4.0[2019-10-27]Add abstract class DatabaseServiceBase implementing getConnection() and method for creating JDBC connection properties
1.3.0[2019-10-14]Update plugins and dependencies and fix issue #1
1.2.0[2019-03-30]Add methods to UserManagementService
1.1.0[2019-02-17]Working javadoc, first version of the UserManagementService
1.0.0[2018-12-19]First version of the DatabaseService

License

This code is licensed under the Apache license v. 2. See the LICENSE file for details.

About

Java interfaces defining OSGi services used across projects

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages