Skip to content

[MNG-7575] Remove RequiresReports - #12755

Open
ljkGH wants to merge 1 commit into
apache:masterfrom
ljkGH:7575
Open

[MNG-7575] Remove RequiresReports#12755
ljkGH wants to merge 1 commit into
apache:masterfrom
ljkGH:7575

Conversation

@ljkGH

@ljkGH ljkGH commented Aug 17, 2026

Copy link
Copy Markdown

Removing the RequiresReports in the plugin model.

mvn -Prun-its verify passed

Following this checklist to help us incorporate your
contribution quickly and easily:

  • Your pull request should address just one issue, without pulling in other changes.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Each commit in the pull request should have a meaningful subject line and body.
    Note that commits might be squashed by a maintainer on merge.
  • Write unit tests that match behavioral changes, where the tests fail if the changes to the runtime are not applied.
    This may not always be possible but is a best-practice.
  • Run mvn verify to make sure basic checks pass.
    A more thorough check will be performed on your pull request automatically.
  • You have run the Core IT successfully.

If your pull request is about ~20 lines of code you don't need to sign an
Individual Contributor License Agreement if you are unsure
please ask on the developers list.

To make clear that you license your contribution under
the Apache License Version 2.0, January 2004
you have to acknowledge this by using the following check-box.

@gnodet gnodet left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for tackling MNG-7575, @ljkGH! Removing the deprecated requiresReports field from the model definition is a clean, safe change.

A few observations that might be helpful for you and the maintainers:

1. This change has no effect on generated code (which is fine)
The requiresReports field was declared as version 1.0.0 only (the inline comment confirms "no longer part of 1.1.0"). All Modello code generation in api/maven-api-plugin/pom.xml targets <version>2.0.0</version>, so this field was already excluded from all generated model classes, readers/writers, and XSD schemas. This PR is purely a schema-definition cleanup — which is exactly what MNG-7575 asks for.

2. The compat module still fully supports requiresReports at runtime
The hand-written compat code is unaffected by this change:

  • compat/maven-plugin-api/.../MojoDescriptor.java still has the requiresReports field, getter (isRequiresReports()), and setter
  • compat/maven-plugin-api/.../PluginDescriptorBuilder.java still reads <requiresReports> from XML when parsing old plugin descriptors

If MNG-7575 intends to fully remove requiresReports from runtime, a follow-up change to the compat module would be needed. Note that japicmp enforces API backward compatibility there, so the public getter/setter would likely need @Deprecated(forRemoval = true) first.

3. isRequiresReports() is dead code
A codebase-wide search confirms that isRequiresReports() is never called anywhere in Maven's production code. The value is parsed from old plugin descriptors and stored but never consumed — it has been dead code since Maven 3.0 removed report support.

4. Test fixtures still reference requiresReports
Two integration test plugins use @Mojo(requiresReports = true) and two test plugin.xml files contain <requiresReports>false</requiresReports>. These aren't affected by this PR but could be cleaned up in a follow-up.

Overall this is a correct, safe cleanup. The observations above are informational context for the broader MNG-7575 effort, not blockers for this PR.


This review was generated by an AI agent (Claude Code) and may contain inaccuracies. Please verify all suggestions before applying.

Claude Code on behalf of Guillaume Nodet

gnodet added a commit to gnodet/maven that referenced this pull request Aug 17, 2026
@elharo elharo changed the title Fix #8879 MNG-7575 Remove RequiresReports [MNG-7575] Remove RequiresReports Aug 18, 2026
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.

2 participants