Java interfaces defining OSGi services used across projects

Steinar Bang a9718cc88b Remove declaration of exception that can't be thrown from method 2 semanas atrás
.github bfc0f89442 Replace java 11 with java 17 in github actions CI build 1 ano atrás
jacoco-coverage-report ef77be68ff [maven-release-plugin] prepare for next development iteration 6 meses atrás
osgiservice a9718cc88b Remove declaration of exception that can't be thrown from method 2 semanas atrás
osgiservice-bom ef77be68ff [maven-release-plugin] prepare for next development iteration 6 meses atrás
.editorconfig 1ed8d54b4b Add DatabaseService OSGi service definition. 6 anos atrás
.gitignore 1ed8d54b4b Add DatabaseService OSGi service definition. 6 anos atrás
LICENSE 1ed8d54b4b Add DatabaseService OSGi service definition. 6 anos atrás
README.org 86e11e63bb Add version 2.0.0 to the release history of the README and update the version in the examples in the README 6 meses atrás
pom.xml e313ed408b Upgrade parent to get maven-bundle-plugin 6.0.0, junit jupiter 5.11.3, mockito 5.14.2 2 semanas atrás

README.org

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

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

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

file:https://sonarcloud.io/api/project_badges/measure?project=steinarb_osgi-service&metric=sqale_index#.svg file:https://sonarcloud.io/api/project_badges/measure?project=steinarb_osgi-service&metric=coverage#.svg file:https://sonarcloud.io/api/project_badges/measure?project=steinarb_osgi-service&metric=ncloc#.svg file:https://sonarcloud.io/api/project_badges/measure?project=steinarb_osgi-service&metric=code_smells#.svg file:https://sonarcloud.io/api/project_badges/measure?project=steinarb_osgi-service&metric=sqale_rating#.svg file:https://sonarcloud.io/api/project_badges/measure?project=steinarb_osgi-service&metric=security_rating#.svg file:https://sonarcloud.io/api/project_badges/measure?project=steinarb_osgi-service&metric=bugs#.svg file:https://sonarcloud.io/api/project_badges/measure?project=steinarb_osgi-service&metric=vulnerabilities#.svg file:https://sonarcloud.io/api/project_badges/measure?project=steinarb_osgi-service&metric=duplicated_lines_density#.svg file: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

License

Version Date Description
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

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