Document deprecation of Language.SCRIPT#11579
Conversation
|
Gentle ping 🙂 |
|
Just checking in on this PR. It has been idle for a while and is still awaiting workflow approval and review. |
api/maven-api-core/src/main/java/org/apache/maven/api/Language.java
Outdated
Show resolved
Hide resolved
api/maven-api-core/src/main/java/org/apache/maven/api/Language.java
Outdated
Show resolved
Hide resolved
api/maven-api-core/src/main/java/org/apache/maven/api/Language.java
Outdated
Show resolved
Hide resolved
|
Fixed — replaced the plain @deprecated with @deprecated(since = "4.0.0"). |
elharo
left a comment
There was a problem hiding this comment.
This needs to answer the question of what someone should do instead.
api/maven-api-core/src/main/java/org/apache/maven/api/Language.java
Outdated
Show resolved
Hide resolved
|
Updated the deprecation documentation to remove the alpha reference and use a stable 4.0.0 version, while explicitly documenting RESOURCES as the replacement. Please let me know if this now matches expectations. |
| * This constant is retained for backward compatibility with Maven 3. | ||
| * | ||
| * @deprecated Use {@link #RESOURCES} instead. | ||
| * @deprecated Since 4.0.0. |
There was a problem hiding this comment.
Why do you think RESOURCES is the replacement?
There was a problem hiding this comment.
The intent was to document RESOURCES as the replacement because SCRIPT was historically used for non-Java content in Maven 3, and in Maven 4 such content is handled under the resources language model.
If that assumption is incorrect, I’m happy to update the documentation to point to the correct replacement (or remove the replacement reference entirely if there is no direct equivalent).
There was a problem hiding this comment.
Yes, my understanding is that since script are just source files copied verbatim, they can be handled as ordinary resources. The new <source> element has no <lang> value specifically for scripts.
There was a problem hiding this comment.
so should it be RESOURCES or should it simply be removed?
There was a problem hiding this comment.
I think that we can keep RESOURCES. Developers who were used to bundle scripts in their application would need to handle them as resources instead.
api/maven-api-core/src/main/java/org/apache/maven/api/Language.java
Outdated
Show resolved
Hide resolved
|
Based on the discussion, I’m comfortable with either approach. My initial intent in mentioning Please let me know which you’d prefer, and I’ll update the PR accordingly. |
api/maven-api-core/src/main/java/org/apache/maven/api/Language.java
Outdated
Show resolved
Hide resolved
|
I think that redirecting users to |
|
Good point — I’ve removed the paragraph separator and kept the Javadoc more compact. Thanks for the suggestion. |
|
I think that we can merge? Are we waiting for something else? |
elharo
left a comment
There was a problem hiding this comment.
The class level javadoc comment is incon\sistent with thsis code.
|
Thanks for pointing this out. I’ve aligned the class-level Javadoc with the current code so it is now consistent. Please let me know if it looks correct now. |
|
|
||
| /** | ||
| * The "script" language. Provided for compatibility with Maven 3. | ||
| * The {@code "script"} language. This constant is retained for backward compatibility with Maven 3. |
There was a problem hiding this comment.
The use of {@code} here is inconsistent with the javadoc of other fields.
There was a problem hiding this comment.
Removed the {@code} usage and aligned the wording with the style used by other language constants.
|
@elharo Please assign appropriate label to PR according to the type of change. |
Summary
Improves documentation for the deprecated
Language.SCRIPTconstant.Motivation
Language.SCRIPTis deprecated but lacked structured deprecation metadata.This change clarifies the rationale, adds
sinceinformation, and documentsthe recommended replacement.
Changes
@Deprecated(since = "4.0.0-alpha", forRemoval = false)Following 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.
Note: This change is documentation-only and does not affect runtime behavior.