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

jakarta.mail fails to resolve due to required org.glassfish.hk2.osgiresourcelocator dependency #87

Closed
paulsp opened this issue Mar 21, 2023 · 2 comments · Fixed by #90
Closed

Comments

@paulsp
Copy link

paulsp commented Mar 21, 2023

Describe the bug
org.eclipse.angus/jakarta.mail/2.0.1 has a required dependency on org.glassfish.hk2.osgiresourcelocator which according to several discussion, the dependency should be optional or removed as it is used by jakarta.mail/jakarta.mail-api/2.1.1

To Reproduce
In a clean OSGi 8 environment, Install and start the following bundles:

  • jakarta.activation/jakarta.activation-api/2.1.1
  • jakarta.mail/jakarta.mail-api/2.1.1
  • org.eclipse.angus/angus-activation/2.0.0
  • org.eclipse.angus/jakarta-mail/2.0.1

Using Karaf, the feature scr is also required.

Expected behavior
If osgiresourcelocator is used by angus-mail, then then the import dependency should be marked as optional.
org.glassfish.hk2.osgiresourcelocator;resolution:=optional
Otherwise the entry should be removed

Desktop (please complete the following information):

  • OSGi 8, using the Apache Karaf 4.4.3
@mnlipp
Copy link
Contributor

mnlipp commented Apr 26, 2023

All this renaming makes things difficult and I'm not sure if I'm right, but...

I think you shouldn't use org.eclipse.angus/jakarta-mail/2.0.1. To be honest, I don't know what it is good for.

I have just successfully tested this combination:

So I had the latest specification (jakarta) bundles and the work-in-progress implementation (angus) bundles. Worked and didn't require org.glassfish.hk2.osgiresourcelocator any more.

lukasj added a commit to lukasj/angus-mail that referenced this issue Apr 26, 2023
…assfish.hk2.osgiresourcelocator dependency

Signed-off-by: Lukas Jungmann <lukas.jungmann@oracle.com>
@lukasj
Copy link
Member

lukasj commented Apr 26, 2023

org.eclipse.angus/jakarta-mail/${angus-mail.version} is there for the case one prefers to have less jars on the cp/mp, less dependencies and/or those who prefer having an API with some default (ie for the provider availability in tests without the need for adding additional runtime/test dependencies)

lukasj added a commit that referenced this issue Apr 26, 2023
…osgiresourcelocator dependency

Signed-off-by: Lukas Jungmann <lukas.jungmann@oracle.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants