webjars / jquery

22 stars 26 forks source link

Provided intial OSGi support for WebJars #58

Open Sandared opened 6 years ago

Sandared commented 6 years ago

I've added the bnd-maven-plugin to generate the necessary Manifest content, like

WebJars-Resource can be used in an OSGi environment to find WebJar bundles with a BundleTracker and register their resources at a HttpService.

Require-Capability is redeclaring the dependencies that are also used by maven, but in a format that the OSGi resolver can use to automatically resolve those dependencies.

The Bundle-Version has to be set manually if the ${project.version} is not OSGi compatible, e.g. a version like this: 1.2.3-2-SNAPSHOT. Bnd would ignore the "-2-" part and create the version like this: 1.2.3.SNAPSHOT, where probably something like 1.2.3.2-SNAPSHOT would be preferred. Therefore I had to create a new property bnd.bundle.version that is set to 1.2.3.2-SNAPSHOT to achieve this.