opentelemetry-java-instrumentation icon indicating copy to clipboard operation
opentelemetry-java-instrumentation copied to clipboard

Add OSGi manifest headers to JARs

Open bdhoine opened this issue 6 months ago • 2 comments

Is your feature request related to a problem? Please describe.

The current build of the opentelemetry-java-instrumentation project lacks the necessary OSGi manifest headers in its generated JAR files. This omission prevents the JARs from being used directly as OSGi bundles. To ensure compatibility and ease of integration with OSGi environments, it is important to include the appropriate OSGi headers in the manifest files of these JARs.

Describe the solution you'd like

Modify the build configuration to automatically include the necessary OSGi headers in the manifest files of all JARs produced by this project.

The following headers should be included in the manifest:

  • Bundle-Name: A human-readable name for the bundle.
  • Bundle-SymbolicName: A unique identifier for the bundle.
  • Bundle-Version: The version of the bundle.
  • Export-Package: The packages to be exported for use by other bundles.
  • Import-Package: The packages required by this bundle from other bundles.

Describe alternatives you've considered

No response

Additional context

Adding these headers would significantly enhance the usability of this library in OSGi-based projects, allowing for seamless integration into environments that rely on modularity and dynamic loading of components. It would also align this project with best practices for Java library distribution in modular systems.

bdhoine avatar Aug 23 '24 20:08 bdhoine