Skip to content

[4.0.x] Fix #11504: add replacement guidance to deprecated model and settings APIs - #12890

Merged
gnodet merged 1 commit into
maven-4.0.xfrom
backport/12872-to-4.0.x
Aug 28, 2026
Merged

[4.0.x] Fix #11504: add replacement guidance to deprecated model and settings APIs#12890
gnodet merged 1 commit into
maven-4.0.xfrom
backport/12872-to-4.0.x

Conversation

@gnodet

@gnodet gnodet commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Backport of #12872 to maven-4.0.x.

Summary

  • Add @deprecated Javadoc tags with replacement guidance to 9 deprecated elements across maven.mdo and settings.mdo that were missing "what to use instead" information
  • Covers both the API model (org.apache.maven.api.model) and the compat model (org.apache.maven.model) as well as org.apache.maven.settings

Test plan

  • CI passes on maven-4.0.x

… APIs (#12872)

Update @deprecated Javadoc tags in maven.mdo and settings.mdo to tell
users what to use instead of each deprecated element:

- Notifier.address → use the configuration properties map
- Model.getProjectDirectory() → use getProjectDirectoryPath()
- ModelBase.reports → use the reporting element
- ConfigurationContainer.unsetInheritanceApplied() → no-op, no replacement
- ConfigurationContainer.setInherited(boolean) → use setInherited(String)
- Plugin.goals → use executions
- Plugin.flushExecutionMap() → no-op, no replacement
- Reporting.flushReportPluginMap() → no-op, no replacement
- Settings.getMirrorOf() → use mirror matching infrastructure

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
@gnodet gnodet added this to the 4.0.0-rc-7 milestone Aug 28, 2026
@gnodet gnodet added the documentation Improvements or additions to documentation label Aug 28, 2026

@gnodet gnodet left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Clean backport of #12872 to maven-4.0.x. The diff is byte-identical to the original — only hunk offsets differ due to branch divergence. All 9 deprecated elements receive accurate replacement guidance:

  • getProjectDirectory()getProjectDirectoryPath()
  • reportsreporting
  • Notifier.addressconfiguration map
  • unsetInheritanceApplied(), flushExecutionMap(), flushReportPluginMap() → correctly marked as no-op with no replacement
  • setInherited(boolean)setInherited(String)
  • Plugin.goalsexecutions
  • Settings.getMirrorOf(String) → explains limitation and directs to Maven mirror matching infrastructure

✅ LGTM — documentation-only, no behavioral impact.

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

Claude Code on behalf of Guillaume Nodet

@gnodet
gnodet merged commit 45b768d into maven-4.0.x Aug 28, 2026
24 checks passed
@gnodet
gnodet deleted the backport/12872-to-4.0.x branch August 28, 2026 20:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant