[MNG-7575] Remove RequiresReports - #12755
Conversation
gnodet
left a comment
There was a problem hiding this comment.
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.javastill has therequiresReportsfield, getter (isRequiresReports()), and settercompat/maven-plugin-api/.../PluginDescriptorBuilder.javastill 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
Removing the
RequiresReportsin the plugin model.mvn -Prun-its verifypassedFollowing this checklist to help us incorporate your
contribution quickly and easily:
Note that commits might be squashed by a maintainer on merge.
This may not always be possible but is a best-practice.
mvn verifyto make sure basic checks pass.A more thorough check will be performed on your pull request automatically.
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.