Skip to content

[MNG-8674] Deprecate mergeId in the Maven 3 model and remove it in the new model #2233

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion api/maven-api-model/src/main/mdo/maven.mdo
Original file line number Diff line number Diff line change
Expand Up @@ -2208,7 +2208,7 @@
</field>
<field xml.transient="true">
<name>mergeId</name>
<version>4.0.0+</version>
<version>4.0.0</version>
<description>
FOR INTERNAL USE ONLY. This is a unique identifier assigned to each
resource to allow Maven to merge changes to this resource that take
Expand All @@ -2220,6 +2220,21 @@
</field>
</fields>
<codeSegments>
<codeSegment>
<version>4.0.0+</version>
<code>
<![CDATA[
@Deprecated
Copy link
Contributor

Choose a reason for hiding this comment

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

So these are new methods being added in a deprecated state? That's unusual.

There should be a Javadoc comment about them of some kind, perhaps just indicating that they should not be used at all.

And if they're deprecated because they're only for internal use, that's not really what deprecated is typically used for.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've added a bit of javadoc.
Those methods are not new, they are not explicitly added, because the switch above from <version>4.0.0+</version> to <version>4.0.0</version> effectively does not generate them anymore. So I added them for backward compatibility as no-op.

public String getMergeId() {
return null;
}

@Deprecated
public void setMergeId(String mergeId) {
}
]]>
</code>
</codeSegment>
<codeSegment>
<version>4.0.0+</version>
<code>
Expand Down