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

Provide an uberjar with mail impl relocated #282

Open
rmannibucau opened this issue Jul 30, 2019 · 9 comments
Open

Provide an uberjar with mail impl relocated #282

rmannibucau opened this issue Jul 30, 2019 · 9 comments

Comments

@rmannibucau
Copy link

Hi,

when using another impl than javax.mail, greenmail fails because it finds the wrong stores.

Is it possible to deliver an uber jar relocating config+classes in 1.6 to ensure it becomes compatible?

Thanks,
Romain

@marcelmay
Copy link
Member

Hi @rmannibucau !

Which other impl?

@rmannibucau
Copy link
Author

I use geronimo-javamail.

@marcelmay
Copy link
Member

marcelmay commented Jul 30, 2019

GreenMail will go for JavaMail 1.6.x with next GreenMail 1.6 release.

This might be a problem, as geronimo-java seems to implement only up to JavaMail 1.5.x releases, and also does not show much of recent activity.... ?

@rmannibucau
Copy link
Author

@marcelmay there are two points:

  1. is greenmail an option for alternative impl?
  2. several users want to test with their actual impl and they dont always choose it (if you have an app server typically)

It also does not cost much to greenmail to not depend hard on an impl thanks shadowing and would make it a generic product.
Same applies for new javamail API like setAddress(String) (vs setAddress(InternetAddress)) which used in utilities. It does not bring anything to end users since it is internal details but can prevent the usage/upgrade in several environments. So long story short, this request is to make greenmail usage of javax.mail stable when possible and encapsulated at least.

Side note/bonus: if a jakarta API arrives it will also support it transparently ;).

@rmannibucau
Copy link
Author

FYI https://issues.apache.org/jira/browse/TOMEE-2606 and geronimo-javamail 1.5 will likely be released in the coming days

@marcelmay
Copy link
Member

@rmannibucau , sorry for the delay.

To summarize (please correct me):

Make GreenMail independent of SUN/Oracle specific classes, so that GreenMail only uses JavaMail-API and therefore can use different JavaMail-API implementations.

Examples:

  • TomEE-provided JavaMail (must be of same minor version)
  • Apache Geronimo

I'd prefer this approach, instead of re-packing/-locating JavaMail (which is also a licensing issue, with the internal vendor extension of com.sun.* alias Oracle packages).

@rmannibucau
Copy link
Author

@marcelmay sounds perfect to me, just thought relocation was a 15mn work vs supporting other stores but I like your proposal better

@rmannibucau
Copy link
Author

Up, any news on this one? I'm hitting this again and with this jakarta renaming thing it gets more and more complicated to manage the dependencies overrides/exclusions so would be awesome to have greenmail + greenmail- deps.

@marcelmay
Copy link
Member

@rmannibucau , I'll try to look into this over xmas vacation. I am curious about separating out the mail implementation.

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

No branches or pull requests

2 participants