davidmoten / subethasmtp

SubEtha SMTP is a Java library for receiving SMTP mail

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Possibly Remove Dependency to JSR305

in-fke opened this issue · comments

I would be great if we could remove the dependency to this "dormant" (rather dead) JSR305.
Actually, we currently have trouble with two Artifacts both exposing the package "javax.annotation" and JSR305 is one of them.

$ grep javax.annotation $(find . -name "*.java")
./src/main/java/org/subethamail/smtp/internal/server/ServerThread.java:import javax.annotation.concurrent.GuardedBy;
./src/main/java/org/subethamail/smtp/server/SMTPServer.java:import javax.annotation.concurrent.GuardedBy;
./src/main/java/org/subethamail/smtp/server/TimeBasedSessionIdFactory.java:import javax.annotation.concurrent.GuardedBy;
./src/main/java/org/subethamail/smtp/server/TimeBasedSessionIdFactory.java:import javax.annotation.concurrent.ThreadSafe;

Reference: https://stackoverflow.com/a/67415527/1747140

I forked the repo and did the changes there, in case you want to "copy" that.
in-fke#1

What is the other artifact? Can you just exclude the transitive dependency from subethasmtp in your pom (maven/gradle)?

I'm happy to exclude the artifact. Can you make a PR? Please leave comments where you remove the annotations (like // ThreadSafe, // GuardedBy this). Do not remove the parent pom block, that is used for deployment to Maven Central.