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

Use org.glassfish jaxb instead of com.sun to avoid duplicate jar #891

Merged
merged 1 commit into from
Sep 19, 2024

Conversation

jamesfredley
Copy link
Contributor

@jamesfredley jamesfredley commented Sep 19, 2024

Eliminate duplicate jar from grails/grails-gradle-plugin#335

@codeconsole codeconsole merged commit 5c80141 into 9.0.x Sep 19, 2024
7 checks passed
@jamesfredley jamesfredley deleted the jamesfredley/use-glassfish-jaxb branch September 20, 2024 00:21
@@ -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"
Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

@matrei matrei Sep 20, 2024

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?

Copy link
Contributor

@codeconsole codeconsole Sep 20, 2024

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.

Copy link
Contributor Author

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

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

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

Successfully merging this pull request may close these issues.

3 participants