-
Notifications
You must be signed in to change notification settings - Fork 71
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
Use org.glassfish jaxb instead of com.sun to avoid duplicate jar #891
Conversation
@@ -20,7 +20,7 @@ dependencies { | |||
} | |||
runtimeOnly "jakarta.el:jakarta.el-api:$jakartaElVersion" | |||
runtimeOnly "jakarta.xml.bind:jakarta.xml.bind-api:$jakartaXmlBindVersion" | |||
runtimeOnly "com.sun.xml.bind:jaxb-impl:4.0.5" | |||
runtimeOnly "org.glassfish.jaxb:jaxb-runtime:$jakartaXmlBindImpVersion" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is jaxb
even necessary at runtime for org.grails:grails-datastore-gorm-hibernate5
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was historically there: https://mvnrepository.com/artifact/org.grails/grails-datastore-gorm-hibernate5/8.1.0
But I did not find it currently used in any of the github.com/grails repos:
https://github.com/search?q=org%3Agrails+org.glassfish.jaxb&type=code
https://github.com/search?q=org%3Agrails+com.sun.istack&type=code
https://github.com/search?q=org%3Agrails+com.sun.xml.txw2&type=code
Do you know if it is safe to remove?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These dependencies were added in commit a8ad0c7 with the commit message "Add dependencies required for Java 11".
It seems JAXB was previously included in the JDK but removed in Java 11.
However, that does not answer my initial question; why is it needed in org.grails:grails-datastore-gorm-hibernate5
.
Is there any marshalling/unmarshalling of XML in this module?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hibernate-core-jakarta
| +--- org.hibernate:hibernate-core-jakarta:5.6.15.Final
| | \--- org.glassfish.jaxb:jaxb-runtime:3.0.0 -> 4.0.5
| | \--- org.glassfish.jaxb:jaxb-core:4.0.5
| | +--- jakarta.xml.bind:jakarta.xml.bind-api:4.0.2 (*)
| | +--- jakarta.activation:jakarta.activation-api:2.1.3
| | +--- org.eclipse.angus:angus-activation:2.0.2
| | | \--- jakarta.activation:jakarta.activation-api:2.1.3
| | +--- org.glassfish.jaxb:txw2:4.0.5
| | \--- com.sun.istack:istack-commons-runtime:4.1.2
if it isn't needed for compilation, remove it because is already being resolved by hibernate. This is why we have duplicate jar issues.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not used in gorm-hibernate5 or in any current code within the github.com/grails repos. I am creating another PR to pull it out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also included same changes in grails/grails-core#13661
Eliminate duplicate jar from grails/grails-gradle-plugin#335