Skip to content

Conversation

@mlopezFC
Copy link
Member

@mlopezFC mlopezFC commented Nov 25, 2025

Fixes #187

This PR resolves the duplicate jaxb-core-4.0.6.jar dependency issue that prevented users from upgrading to version 2.5.x when building WAR files with Gradle. The problem occurred because both docx4j-JAXB-ReferenceImpl and docx4j-JAXB-MOXy transitively included different implementations of the same JAXB core library under different Maven group IDs (org.glassfish.jaxb:jaxb-core and com.sun.xml.bind:jaxb-core).

The fix adds a Maven exclusion to the docx4j-JAXB-MOXy dependency, excluding com.sun.xml.bind:jaxb-core while keeping the GlassFish reference implementation. This change has been verified with a clean dependency tree, successful build, all unit tests passing and also manual testing of the demo.

Summary by CodeRabbit

  • Chores
    • Updated IDE and build tool configuration settings.
    • Refined project dependency management to improve build stability.

✏️ Tip: You can customize this high-level summary in your review settings.

Exclude jaxb-code transitive dependency to avoid duplicate problem
Fixes #187
@coderabbitai
Copy link

coderabbitai bot commented Nov 25, 2025

Walkthrough

This pull request adds two new entries (.eclipse and .vaadin) to .gitignore and adds a transitive dependency exclusion to pom.xml, excluding com.sun.xml.bind:jaxb-core from org.docx4j:docx4j-JAXB-MOXy to resolve duplicate jaxb-core implementations.

Changes

Cohort / File(s) Summary
Build configuration
pom.xml
Adds exclusion for com.sun.xml.bind:jaxb-core transitive dependency in org.docx4j:docx4j-JAXB-MOXy:11.5.0 to prevent duplicate jaxb-core artifacts
Git configuration
.gitignore
Adds .eclipse and .vaadin to ignored file patterns

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • The .gitignore changes are trivial additions with no behavioral impact
  • The pom.xml exclusion is a straightforward dependency configuration change addressing a known duplicate dependency issue
  • No complex logic or multi-file structural changes involved

Possibly related PRs

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and specifically describes the main change: fixing a duplicate jaxb-core dependency issue by adding a Maven exclusion, directly addressing issue #187.
Linked Issues check ✅ Passed The pull request successfully implements the required fix by adding a Maven exclusion to resolve the duplicate jaxb-core dependency, ensuring single JAXB implementation and enabling smooth upgrades to Grid Exporter Addon 2.5.x.
Out of Scope Changes check ✅ Passed Changes are limited to the required fix: updating .gitignore with two entries and adding a transitive dependency exclusion in pom.xml, both directly supporting the primary objective of resolving the duplicate dependency issue.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch issue-187

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4b82e6d and 267db70.

📒 Files selected for processing (2)
  • .gitignore (1 hunks)
  • pom.xml (1 hunks)
🧰 Additional context used
🪛 GitHub Actions: Java CI with Maven
pom.xml

[error] 1-1: Command failed: mvn -B package --file pom.xml. There are test failures in the grid-exporter-addon module (Surefire) causing build failure.

🔇 Additional comments (2)
.gitignore (1)

7-8: Add IDE and framework-specific directories to gitignore.

Adding .eclipse and .vaadin prevents accidental commits of local IDE and framework-specific files.

pom.xml (1)

158-167: Based on my verification, I now have sufficient information to rewrite the review comment. Let me compile my findings:

Key Findings:

  1. The exclusion of com.sun.xml.bind:jaxb-core from docx4j-JAXB-MOXy is syntactically correct XML
  2. docx4j-JAXB-MOXy 11.5.0 uses Jakarta XML Binding 4.0 + EclipseLink MOXy, not old Oracle JAXB
  3. docx4j-JAXB-ReferenceImpl 11.5.0 uses GlassFish JAXB (org.glassfish.jaxb:jaxb-runtime)
  4. No evidence of test failures found in the repository
  5. The exclusion appears to be a legitimate dependency management fix to prevent duplicate/conflicting JAXB implementations
  6. MOXy should function correctly with the exclusion

Resolve the Review Comment

The exclusion is syntactically correct and logically sound for managing duplicate JAXB implementations.

The exclusion of com.sun.xml.bind:jaxb-core from docx4j-JAXB-MOXy (lines 158–167) is properly formatted Maven XML and represents a valid dependency management strategy. Both docx4j implementations now use Jakarta XML Binding 4.0: ReferenceImpl uses org.glassfish.jaxb:jaxb-runtime (modern), and MOXy uses EclipseLink MOXy runtime. The exclusion prevents a duplicate or conflicting JAXB core implementation and should not break functionality since MOXy itself does not depend on the legacy com.sun.xml.bind:jaxb-core artifact.

Tip

📝 Customizable high-level summaries are now available in beta!

You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.

  • Provide your own instructions using the high_level_summary_instructions setting.
  • Format the summary however you like (bullet lists, tables, multi-section layouts, contributor stats, etc.).
  • Use high_level_summary_in_walkthrough to move the summary from the description to the walkthrough section.

Example instruction:

"Divide the high-level summary into five sections:

  1. 📝 Description — Summarize the main change in 50–60 words, explaining what was done.
  2. 📓 References — List relevant issues, discussions, documentation, or related PRs.
  3. 📦 Dependencies & Requirements — Mention any new/updated dependencies, environment variable changes, or configuration updates.
  4. 📊 Contributor Summary — Include a Markdown table showing contributions:
    | Contributor | Lines Added | Lines Removed | Files Changed |
  5. ✔️ Additional Notes — Add any extra reviewer context.
    Keep each section concise (under 200 words) and use bullet or numbered lists for clarity."

Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sonarqubecloud
Copy link

Copy link
Member

@javier-godoy javier-godoy left a comment

Choose a reason for hiding this comment

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

@github-project-automation github-project-automation bot moved this from To Do to In Progress in Flowing Code Addons Nov 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

Jaxb-core-4.0.6.jar is a duplicate (when upgrading to Grid Exporter Addon 2.5.z)

3 participants