Skip to content

docs: clarify deprecation of RELEASE and LATEST version constants#11686

Open
amahi1568 wants to merge 2 commits into
apache:masterfrom
amahi1568:docs-deprecated-11504
Open

docs: clarify deprecation of RELEASE and LATEST version constants#11686
amahi1568 wants to merge 2 commits into
apache:masterfrom
amahi1568:docs-deprecated-11504

Conversation

@amahi1568

Copy link
Copy Markdown

What was done

Added JavaDoc guidance for deprecated artifact version constants to clarify recommended alternatives.

Why

The deprecated RELEASE and LATEST version tokens provided no migration guidance, which could confuse users.

Scope

Documentation-only change. No functional impact.

@cstamas

cstamas commented Jan 29, 2026

Copy link
Copy Markdown
Member

The LATEST and RELEASE meta versions have been deprecated since Maven 3.0, this change is incorrect.

@amahi1568

amahi1568 commented Feb 1, 2026 via email

Copy link
Copy Markdown
Author

@desruisseaux

Copy link
Copy Markdown
Contributor

Instead of closing the PR, maybe just replace it by the addition of the since = "3.0" attribute in @Deprecated. It would avoid the same confusion to happen again.

@amahi1568

Copy link
Copy Markdown
Author

Thanks for the suggestion. I’ve updated the PR to add the correct
@deprecated(since = "3.0") attribute for RELEASE and LATEST constants,
so the deprecation timeline is clear and avoids future confusion.


@Deprecated(since = "4.0.0")
/**
* @deprecated since 3.0

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.

No need to duplicate the since parameter

@Deprecated(since = "4.0.0")
/**
* @deprecated since 3.0
* Use a fixed version or an explicit version range instead of special version tokens.

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.

never use version ranges

@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.

Claude Code on behalf of Guillaume Nodet

Thanks for improving the documentation. A few issues to address:

  1. since version change is incorrect: The @Deprecated annotation currently says since = "4.0.0" on master. Changing it to "3.0" is not accurate — the @Deprecated annotation itself was added in 4.0.0. While RELEASE/LATEST resolution may have been discouraged earlier, the formal deprecation marker was introduced in 4.x. Please revert this change and keep since = "4.0.0".

  2. As @elharo already noted, the Javadoc @deprecated tag duplicates what the @Deprecated(since=...) annotation already conveys. If you want to add guidance, a plain Javadoc comment without @deprecated would be sufficient, since the annotation already handles the deprecation signal.

  3. Also as @elharo noted, recommending "version range" as an alternative to LATEST is not good advice.

Please address the existing review feedback before this can move forward.

* @deprecated since 3.0
* Use explicit version resolution instead of special version constants.
*/
@Deprecated(since = "3.0")

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.

The since value should remain "4.0.0" — that is when the @Deprecated annotation was actually added to these constants. Changing it to "3.0" without evidence from the git history is inaccurate.

Also, the Javadoc asterisks are misaligned — they should use * (space-star) to match the project's formatting conventions:

Suggested change
@Deprecated(since = "3.0")
* @deprecated since 3.0
* Use explicit version resolution instead of special version constants.

should be (if kept at all):

Suggested change
@Deprecated(since = "3.0")
* @deprecated Since 4.0.0. Use explicit version resolution instead of special version constants.

* Use explicit version resolution instead of special version constants.
*/
@Deprecated(since = "3.0")
String RELEASE_VERSION = "RELEASE";

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.

Changing @Deprecated(since = "4.0.0") to @Deprecated(since = "3.0") is incorrect. The deprecation annotation was introduced in Maven 4.0.0. Please revert.

Suggested change
String RELEASE_VERSION = "RELEASE";
@Deprecated(since = "4.0.0")

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.

5 participants