Skip to content

Migrate to Doxia 2 to fix broken table layout in generated reports#61

Merged
slachiewicz merged 2 commits intomasterfrom
copilot/fix-0f91a605-b585-4b8c-ba72-cf103144a615
Oct 19, 2025
Merged

Migrate to Doxia 2 to fix broken table layout in generated reports#61
slachiewicz merged 2 commits intomasterfrom
copilot/fix-0f91a605-b585-4b8c-ba72-cf103144a615

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Oct 5, 2025

Problem

After the release of version 2.1, the JDepend Maven Plugin generates reports, but the table layout is broken and not properly rendered. This issue affects projects like Apache Tentacles where the report tables appear malformed, while other table-based reports (like taglist) render correctly.

The root cause is that the plugin was using Doxia 1.x dependencies, which are incompatible with newer Maven site rendering. Doxia 2 requires all tables to have explicit caption elements, and without them, the table layout breaks.

Solution

This PR migrates the plugin to Doxia 2 by:

  1. Upgrading Maven Reporting Dependencies

    • maven-reporting-api: 3.1.14.0.0
    • maven-reporting-impl: 3.2.04.0.0
    • Added maven-core dependency (version 3.6.3) required by Doxia 2
  2. Adding Table Captions

    • Added tableCaption() elements to all 5 tables in ReportGenerator.java:
      • Summary table
      • Packages detail tables (2 tables)
      • Cycles table
      • Explanation table

Changes

The changes are minimal and surgical, following the same migration pattern used in taglist-maven-plugin#160:

pom.xml: Updated dependencies to Doxia 2 versions

ReportGenerator.java: Added table captions after each sink.table() call:

sink.table();
sink.tableCaption();
sink.text(bundle.getString("report.summary.title"));
sink.tableCaption_();

Verification

  • ✅ All 7 existing tests pass
  • ✅ Build succeeds with only deprecation warnings (for Renderer and getOutputName())
  • ✅ Generated HTML reports now contain proper <caption> elements in all tables
  • ✅ Test project verified - tables render correctly with proper layout

Related Issues

Fixes #44

Similar to mojohaus/taglist-maven-plugin#160 (Doxia 2 migration)

Original prompt

This section details on the original issue you should resolve

<issue_title>Table layout seems broken with version 2.1</issue_title>
<issue_description>After #39 seems to be resolved with the new release 2.1 a report is generated, but its layout seems broken as the table layout is not properly rendered.

Apache Tentacles uses the plugin in its report, but the layout seems broken as shown on

image

or live

Other table-layout reports properly get rendered thus I assume it has something to do with the plugin itself.

</issue_description>

Comments on the Issue (you are @copilot in this section)

@slachiewicz This plugin needs to be migrated to Doxia 2

something similar to: mojohaus/taglist-maven-plugin#160</comment_new>

Fixes #43

💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Co-authored-by: slachiewicz <6705942+slachiewicz@users.noreply.github.com>
Copilot AI changed the title [WIP] Table layout seems broken with version 2.1 Migrate to Doxia 2 to fix broken table layout in generated reports Oct 5, 2025
Copilot AI requested a review from slachiewicz October 5, 2025 18:23
@slachiewicz slachiewicz marked this pull request as ready for review October 5, 2025 18:32
@slachiewicz slachiewicz merged commit 2d5aa0a into master Oct 19, 2025
23 checks passed
@slachiewicz slachiewicz deleted the copilot/fix-0f91a605-b585-4b8c-ba72-cf103144a615 branch October 19, 2025 11:21
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.

Table layout seems broken with version 2.1

2 participants