Skip to content
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

Bundle net.thisptr.jackson-jq-extra requires internal packages from net.thisptr.jackson-jq #54

Closed
andreasherkner opened this issue Feb 17, 2020 · 6 comments · Fixed by #106

Comments

@andreasherkner
Copy link

The extra bundle net.thisptr.jackson-jq-extra imports the packages net.thisptr.jackson.jq.internal.misc and net.thisptr.jackson.jq.internal but they are not exported by the main bundle net.thisptr.jackson-jq. It cannot be used/installed in an OSGi environment.

@eiiches
Copy link
Owner

eiiches commented Aug 7, 2021

I don't use OSGi and can't be of any help here. If someone can fix this issue, I'd happy to review and accept a PR to support OSGi environment.

@andreasherkner
Copy link
Author

It's the default behavior of the maven-bundle-plugin: https://felix.apache.org/documentation/subprojects/apache-felix-maven-bundle-plugin-bnd.html#_default_behavior

You can add the packages to the -instruction:
<Export-Package>net.thisptr.jackson.jq.*,net.thisptr.jackson.jq.internal.*</Export-Package>

@eiiches
Copy link
Owner

eiiches commented Aug 9, 2021

Thanks for the suggestion. I see. Let me think a bit if we can move/rename some classes so that jackson-jq-extra (or others) doesn't have to depend on the internal package to auto-load a custom function.

@eiiches
Copy link
Owner

eiiches commented Aug 9, 2021

Is there any easy way to make sure this kind of issue never happens again? I was looking for an option that automatically fails a build if unexported package from other bundle is used, but maven-bundle-plugin doesn't seem to have one.

@andreasherkner
Copy link
Author

I don't think, there is an easy way ;)

@eiiches
Copy link
Owner

eiiches commented Aug 10, 2021

Oh, okay... I'll merge #106 which makes jackson-jq-extra no longer depend on the internal package. Hopefully it should fix the issue :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants