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

Dependency on old unmaintained version of javamail 1.6.2 should be updated to use jakarta.mail #43

Open
debanshu opened this issue May 9, 2023 · 1 comment

Comments

@debanshu
Copy link

debanshu commented May 9, 2023

The current pom depends on the older unmaintained javax.mail namespace

(Even though the README says this project does not depend on javax.mail)

<dependency>
    <groupId>com.sun.mail</groupId>
    <artifactId>javax.mail</artifactId>
    <version>${version.javamail}</version>
</dependency>
        
<version.javamail>1.6.2</version.javamail>

I think we should either remove this dependency (to stay true to the README) or update to use the currently maintained jakarta.mail namespace

<dependency>
  <artifactId>jakarta.mail</artifactId>
  <groupId>com.sun.mail</groupId>
</dependency>
@AndreasALoew
Copy link

AndreasALoew commented Sep 16, 2024

@stevehu, I fully second this request:

We are in the process of migrating our application from Java EE 8 to Jakarta EE 10, and cannot remove the old "javax.mail" dependency from our build due to the compile-time use of the following "old" javax-style imports:

import javax.mail.internet.AddressException;
import javax.mail.internet.InternetAddress;

in class com.networknt.oas.validator.ValidatorBase.

In order to stay independent from the javax/jakarta package prefix issue, I think it would be best to use Java Reflection API to determine whether classes AddressException and InternetAddress can be loaded from either jakarta.mail or javax.mail packages and call into the methods of these classes as delegates behind a delegating facade located in the openapi-parser project itself.

It clearly would be a pity to be forced to fork this one more time (as it's already a fork from kaizen-openapi-parser) just to get rid of the "javax" dependency for legal reasons.

Many thanks for considering to make this important change to ensure your code is future-proof!

AndreasALoew pushed a commit to AndreasALoew/openapi-parser that referenced this issue Sep 17, 2024
AndreasALoew pushed a commit to AndreasALoew/openapi-parser that referenced this issue Sep 17, 2024
AndreasALoew pushed a commit to AndreasALoew/openapi-parser that referenced this issue Sep 17, 2024
AndreasALoew pushed a commit to AndreasALoew/openapi-parser that referenced this issue Sep 17, 2024
AndreasALoew pushed a commit to AndreasALoew/openapi-parser that referenced this issue Sep 17, 2024
AndreasALoew pushed a commit to AndreasALoew/openapi-parser that referenced this issue Sep 19, 2024
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