You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "gnodet (via GitHub)" <gi...@apache.org> on 2026/05/21 21:10:13 UTC

Re: [PR] docs: clarify deprecation of RELEASE and LATEST version constants [maven]

gnodet commented on code in PR #11686:
URL: https://github.com/apache/maven/pull/11686#discussion_r3284358720


##########
compat/maven-artifact/src/main/java/org/apache/maven/artifact/Artifact.java:
##########
@@ -37,10 +37,18 @@
  */
 public interface Artifact extends Comparable<Artifact> {
 
-    @Deprecated(since = "4.0.0")
+    /**
+    * @deprecated since 3.0
+    * Use explicit version resolution instead of special version constants.
+    */
+    @Deprecated(since = "3.0")

Review Comment:
   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:
   
   ```suggestion
       * @deprecated since 3.0
       * Use explicit version resolution instead of special version constants.
   ```
   
   should be (if kept at all):
   
   ```suggestion
        * @deprecated Since 4.0.0. Use explicit version resolution instead of special version constants.
   ```



##########
compat/maven-artifact/src/main/java/org/apache/maven/artifact/Artifact.java:
##########
@@ -37,10 +37,18 @@
  */
 public interface Artifact extends Comparable<Artifact> {
 
-    @Deprecated(since = "4.0.0")
+    /**
+    * @deprecated since 3.0
+    * Use explicit version resolution instead of special version constants.
+    */
+    @Deprecated(since = "3.0")
     String RELEASE_VERSION = "RELEASE";

Review Comment:
   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.
   
   ```suggestion
       @Deprecated(since = "4.0.0")
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org