GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [MSHARED-1364] AbstractMavenReportRenderer should not depend on Doxia impl classes · Issue #184 · apache/maven-reporting-impl

[MSHARED-1364] AbstractMavenReportRenderer should not depend on Doxia impl classes #184

New issue
Copy link
New issue
Copy link
Open
Open
[MSHARED-1364] AbstractMavenReportRenderer should not depend on Doxia impl classes#184
Copy link
Labels
enhancementNew feature or request

Description

@jira-importer
jira-importer
opened on Mar 15, 2024
Issue body actions

Konrad Windszus opened MSHARED-1364 and commented

The classes in package o.a.m.doxia.sink.impl should by definition not be considered stable API (and therefore only consumed from Doxia classes internally).
However https://github.com/apache/maven-reporting-impl/blob/72181306bb0e12eed50c4ba4aec98dd76499df39/src/main/java/org/apache/maven/reporting/AbstractMavenReportRenderer.java#L47 depends on some internal constants.
This is dangerous, as those constants were removed in the context of DOXIA-685. Although constants are inlined during compile time, the evaluation of those constants vanished as well, so using them has no longer any effect. Reporting Impl should only rely on stable Doxia API to achieve a better decoupling.


Affects: maven-reporting-impl-4.0.0-M13

Activity

  1. jira-importer commented on Mar 16, 2024

    @jira-importer
    jira-importer
    on Mar 16, 2024
    Author
    More actions

    Michael Osipov commented

    What do you recommend to do in such a case? Where should this class (SinkEventAttributeSet) be?

  2. jira-importer commented on Mar 16, 2024

    @jira-importer
    jira-importer
    on Mar 16, 2024
    Author
    More actions

    Konrad Windszus commented

    I would recommend copy it to https://github.com/apache/maven-doxia/tree/e01880801ca1283b86205e2f7064b9b4dbc84d54/doxia-sink-api/src/main/java/org/apache/maven/doxia/sink (and at the same time deprecate the other one).

  3. jira-importer commented on Mar 16, 2024

    @jira-importer
    jira-importer
    on Mar 16, 2024
    Author
    More actions

    Michael Osipov commented

    I see and then extend from to retain binary compat? If so, please create a ticket and do so.

  4. jira-importer
    added
    enhancementNew feature or request
    priority:majorMajor loss of function
    on Jul 3, 2025
  5. slachiewicz commented on Aug 22, 2025

    @slachiewicz
    slachiewicz
    on Aug 22, 2025
    Member
    More actions

    @kwin do You think it's worth to work on it?

  6. slachiewicz
    removed
    priority:majorMajor loss of function
    on Jan 17, 2026
  7. slachiewicz commented on Aug 8, 2026

    @slachiewicz
    slachiewicz
    on Aug 8, 2026
    Member
    More actions

    Filed the Doxia ticket Michael asked for back in 2024, and drafted the change: apache/maven-doxia#1072, PR apache/maven-doxia#1073.

    A few things that came out of looking into this:

    The scope here is now one line. sink.verbatim(SinkEventAttributeSet.SOURCE) in verbatimSource() is the only reference to org.apache.maven.doxia.sink.impl left in this component. MSHARED-1182 dropped the BOXED usage and MSHARED-1185 added verbatimSource(), so this has been the whole of it for a while.

    This component cannot fix it on its own. doxia-sink-api has six files in it and ships no implementation of SinkEventAttributes and no factory for one, so Sink.verbatim(SinkEventAttributes) is uncallable by anyone without reaching into doxia-core's impl package. That is why the fix has to be on the Doxia side.

    It is not this component's doing either. In a checkout of the Maven repositories, 14 files import that package: maven-project-info-reports-plugin, maven-changes-plugin, maven-pmd-plugin, maven-plugin-report-plugin, maven-surefire-report-plugin, dist-tool and this one. And the class was in org.apache.maven.doxia.sink until DOXIA-506 moved it in with the internal sink implementations, so it is a class consumers always used that got relabelled as internal, not one they reached into.

    One correction to the original report. It says the constants lost their effect when DOXIA-685 replaced BOXED with SOURCE. That is not true of SOURCE today: Xhtml5BaseSink.verbatim(SinkEventAttributes) in 2.1.0 still evaluates DECORATION and emits <pre><code> for it, and src/it/use-as-direct-mojo asserts exactly that output. So there is no behavioural bug to fix here, only the package dependency.

    Once the Doxia change is released this becomes a one-line import change.

  8. slachiewicz commented on Aug 8, 2026

    @slachiewicz
    slachiewicz
    on Aug 8, 2026
    Member
    More actions

    Recording the exact remaining work here, so this issue is self-contained once the Doxia side lands.

    Blocked on: apache/maven-doxia#1073, which moves SinkEventAttributeSet into doxia-sink-api. Targeted at Doxia 2.2.0.

    When Doxia 2.2.0 is released, this is finished by bumping doxiaVersion and changing one import in AbstractMavenReportRenderer:

    -import org.apache.maven.doxia.sink.impl.SinkEventAttributeSet;
    +import org.apache.maven.doxia.sink.SinkEventAttributeSet;

    The single use is sink.verbatim(SinkEventAttributeSet.SOURCE) in verbatimSource(), and it is the only reference to org.apache.maven.doxia.sink.impl left in this component. The constants are the same objects under either name, so nothing else changes.

    Worth doing at the same time, and arguably more urgent than the package hygiene: SinkEventAttributeSet.SOURCE does not exist in Doxia 1, where it is called BOXED. Since a report plugin renders with whatever Doxia the Maven Site Plugin provides, verbatimSource() fails with a NoSuchFieldError under any Site Plugin older than 3.21.0 — the same failure mode as apache/maven-project-info-reports-plugin#103, which #243 has just fixed for verbatimText/verbatimLink. maven-plugin-report-plugin calls verbatimSource(), so this is reachable in practice, not hypothetical.

    Moving the class does not fix that on its own: SOURCE versus BOXED is a Doxia 1 versus 2 difference, not a packaging one.

  9. slachiewicz
    closed this as completedin #245on Aug 8, 2026
  10. slachiewicz
    reopened this on Aug 8, 2026
  11. slachiewicz commented on Aug 8, 2026

    @slachiewicz
    slachiewicz
    on Aug 8, 2026
    Member
    More actions

    Reopened: this was closed automatically when #245 merged, not deliberately. The PR body said "does not resolve #184", and GitHub matched the resolve #184 part of that regardless of the negation. Wording corrected there so it does not happen again.

    Still open as described above: waiting on apache/maven-doxia#1073, then a one line import change here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.