-
Notifications
You must be signed in to change notification settings - Fork 182
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
Depend on angus-mail, not jakarta.mail #553
Comments
Angus org.eclipse.angus:angus-mail:2.0.1 also depends on jakarta.mail:jakarta.mail-api . Jakarta.Mail is the essential interface and should be what you program (compile) against, So, transitively you always have the dependency on jakarta.mail ? |
That's not a problem because it depends on Meanwhile,
|
I think GreenMail should add a dependency on
org.eclipse.angus:angus-mail
and remove its dependency onorg.eclipse.angus:jakarta.mail
.When I upgraded GreenMail from 2.0.0-alpha-3 to 2.0.1-alpha-1, I had to exclude the dependency on
org.eclipse.angus:jakarta.mail
in order to resolve duplicate class errors reported by the Maven Enforcer Plugin. Thatjakarta.mail
artifact bundles the classes from two other artifacts:org.eclipse.angus:angus-mail
andjakarta.mail:jakarta.mail-api
. If either of those other artifacts show up in your dependency tree, you'll have duplicate classes. In particular, GreenMail also depends onjakarta.mail-api
, so you will have duplicate classes if you depend on GreenMail 2.0.1-alpha-1.The release notes for Angus Mail confirm that my suggested approach is the "preferred" way:
whereas
jakarta.mail
can be used if you're trying to limit the number of dependencies for some reason. Personally, I feel like artifacts that bundle other artifacts don't play well with Maven-managed dependencies, and they're meant to be used on projects with more manual dependency management.The text was updated successfully, but these errors were encountered: