After upgrading to sendgrid-java version 4.6.1 our internal build started to flag the following BanDuplicateClasses violation:
[WARNING] Rule 0: org.apache.maven.plugins.enforcer.BanDuplicateClasses failed with message:
Duplicate class found:
Found in:
org.bouncycastle:bcprov-jdk15to18:jar:1.65:compile
org.bouncycastle:bcprov-jdk15on:jar:1.66:compile
Duplicate classes:
org/bouncycastle/LICENSE.class
There may be others but <findAllDuplicates> was set to false, so failing fast
Turns out this is because sendgrid-java switched from bcprov-jdk15on to bcprov-jdk15to18 in d9f4413, while we have another dependency that also pulls in bcprov-jdk15on.
There are of course several ways to resolve or silence this issue on our side, but before I select any of those I wanted to ask you what the reason for this change was. We use sendgrid-java with JDK 11, and bcprov-jdk15on would actually seem to be the better choice, since it also caters to JDK 9+, IIUC.
CC @eshanholtz.
After upgrading to
sendgrid-javaversion 4.6.1 our internal build started to flag the followingBanDuplicateClassesviolation:Turns out this is because
sendgrid-javaswitched frombcprov-jdk15ontobcprov-jdk15to18in d9f4413, while we have another dependency that also pulls inbcprov-jdk15on.There are of course several ways to resolve or silence this issue on our side, but before I select any of those I wanted to ask you what the reason for this change was. We use
sendgrid-javawith JDK 11, andbcprov-jdk15onwould actually seem to be the better choice, since it also caters to JDK 9+, IIUC.CC @eshanholtz.