-
Notifications
You must be signed in to change notification settings - Fork 305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add osgi headers via maven-bundle-plugin #359
base: main
Are you sure you want to change the base?
Conversation
<artifactId>maven-bundle-plugin</artifactId> | ||
</plugin> | ||
</plugins> | ||
</build> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to only put this into the <build><plugins>
of the parent pom instead of every child pom (I'm not sure if that works or not)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was the only way I could get it working, been a few months since I put this together, so I can't exactly remember variations I tried.
I'll revisit it and let you know what I find
</Import-Package> | ||
<Export-Package> | ||
{local-packages} | ||
</Export-Package> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this export internal
packages? If yes, can we prevent them from being exported?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is the file MANIFEST is produces
Manifest-Version: 1.0
Bnd-LastModified: 1737245630605
Build-Jdk-Spec: 21
Bundle-Description: Core of commonmark-java (a library for parsing Mar
kdown to an AST, modifying the AST and rendering it to HTML or Markdo
wn)
Bundle-License: https://opensource.org/licenses/BSD-2-Clause
Bundle-ManifestVersion: 2
Bundle-Name: commonmark-java core
Bundle-SymbolicName: org.commonmark
Bundle-Version: 0.24.1.SNAPSHOT
Created-By: Apache Maven Bundle Plugin 6.0.0
Export-Package: org.commonmark;version="0.24.1",org.commonmark.node;ve
rsion="0.24.1",org.commonmark.parser;version="0.24.1";uses:="org.comm
onmark,org.commonmark.node,org.commonmark.parser.beta,org.commonmark.
parser.block,org.commonmark.parser.delimiter",org.commonmark.parser.b
eta;version="0.24.1";uses:="org.commonmark.node,org.commonmark.parser
,org.commonmark.text",org.commonmark.parser.block;version="0.24.1";us
es:="org.commonmark.node,org.commonmark.parser",org.commonmark.parser
.delimiter;version="0.24.1";uses:="org.commonmark.node",org.commonmar
k.renderer;version="0.24.1";uses:="org.commonmark.node",org.commonmar
k.renderer.html;version="0.24.1";uses:="org.commonmark,org.commonmark
.node,org.commonmark.renderer",org.commonmark.renderer.markdown;versi
on="0.24.1";uses:="org.commonmark,org.commonmark.node,org.commonmark.
renderer,org.commonmark.text",org.commonmark.renderer.text;version="0
.24.1";uses:="org.commonmark,org.commonmark.node,org.commonmark.rende
rer",org.commonmark.text;version="0.24.1"
Import-Package: org.commonmark;version="[0.24,1)",org.commonmark.parse
r.delimiter;version="[0.24,1)",org.commonmark.renderer;version="[0.24
,1)",org.commonmark.text;version="[0.24,1)"
Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=11))"
Tool: Bnd-7.0.0.202310060912
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, so looks like there's no internal
packages there.
Why does it have an Import-Package
?
following up on #128
this PR adds the maven-bundle-plugin and config
I am doing this, as we use Commonmark in Lucee, for the initial version, we wrapped the jar ourselves with OSGI metadata, but now I'd like to add some extensions and I'd rather just use commonmark jars
lucee/Lucee#2473
I have tested this locally and the OSGI Export-Package / Import-Package headers look good
But there are some warnings be thrown for each extension
In addition, the autolink dependancy also needs OSGI metadata