Skip to content

Conversation

@anukalp2804
Copy link
Contributor

Summary:
This pull request documents the rationale for a deprecated method in DefaultMaven.

Why:
The existing JavaDoc did not explain why the method is deprecated or clarify that
it is intended for internal Maven Core use only, which could confuse external users.

What:

  • Replaced informal JavaDoc with a clear explanation of the deprecation rationale
  • Clarified intended usage boundaries for the deprecated method

Scope:

  • Documentation-only change in Maven Core
  • No behavioral or API changes

Testing:

  • mvn -DskipTests install (BUILD SUCCESS)

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.

@desruisseaux
Copy link
Contributor

Git history tells me that it was deprecated on November 21, 2023:

git show e89b6fd -- maven-core/src/main/java/org/apache/maven/DefaultMaven.java

I don't know which Maven version was released after that time. Maybe the "release" page of Maven web site can tell that.

@desruisseaux
Copy link
Contributor

desruisseaux commented Dec 27, 2025

Actually an easier way to find the release is git tag --contains e89b6fd. Deprecation was in maven-4.0.0-alpha-9, but it is probably not worth to go to that level of details. I think that 4.0.0 is sufficient.

@anukalp2804
Copy link
Contributor Author

Actually an easier way to find the release is git tag --contains e89b6fd. Deprecation was in maven-4.0.0-alpha-9, but it is probably not worth to go to that level of details. I think that 4.0.0 is sufficient.

Thank you for checking the history and confirming the version.
I have updated the code to use @deprecated(since = "4.0.0") and removed
the redundant Javadoc deprecation tag, keeping only the rationale text.

Please let me know if anything else should be adjusted.

@desruisseaux desruisseaux merged commit 0380999 into apache:master Dec 29, 2025
22 checks passed
@github-actions
Copy link

@desruisseaux Please assign appropriate label to PR according to the type of change.

@github-actions github-actions bot added this to the 4.1.0 milestone Dec 29, 2025
@desruisseaux desruisseaux added the documentation Improvements or additions to documentation label Dec 29, 2025
@anukalp2804
Copy link
Contributor Author

Thanks for the review and merge!

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.

2 participants