Skip to content

[MNG-7642] Restore compatibility with flatten-maven-plugin#947

Merged
gnodet merged 4 commits intoapache:masterfrom
gnodet:MNG-7642
Jan 9, 2023
Merged

[MNG-7642] Restore compatibility with flatten-maven-plugin#947
gnodet merged 4 commits intoapache:masterfrom
gnodet:MNG-7642

Conversation

@gnodet
Copy link
Copy Markdown
Contributor

@gnodet gnodet commented Jan 4, 2023

Revert "[MNG-7505] Remove ReportingConverter (#906)"
This reverts commit adf89ef.

Following this checklist to help us incorporate your
contribution quickly and easily:

  • Make sure there is a JIRA issue filed
    for the change (usually before you start working on it). Trivial changes like typos do not
    require a JIRA issue. Your pull request should address just this issue, without
    pulling in other changes.
  • Each commit in the pull request should have a meaningful subject line and body.
  • Format the pull request title like [MNG-XXX] SUMMARY,
    where you replace MNG-XXX and SUMMARY with the appropriate JIRA issue.
  • Also format the first line of the commit message like [MNG-XXX] SUMMARY.
    Best practice is to use the JIRA issue title in both the pull request title and in the first line of the commit message.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Run mvn clean 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.

Revert "[MNG-7505] Remove ReportingConverter (apache#906)"
This reverts commit adf89ef.
@gnodet gnodet added this to the 4.0.0-alpha-4 milestone Jan 4, 2023
@gnodet gnodet requested a review from michael-o January 4, 2023 10:49

/**
* @deprecated since Maven 4
* @see DefaultModelBuilderFactory#setReportingConverter(ReportingConverter)
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.

There is nothing to be seen there.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

All the setXxx methods have the same javadoc. The deprecation is not something new in this case.

@pzygielo
Copy link
Copy Markdown
Contributor

pzygielo commented Jan 4, 2023

Not sure about Restore compatibility.
This just restores as no-op methods. If flatten called them - didn't it do it for some purpose?
Will flatten behave as expected or just not throw API incompatibility exception and silently do who-knows-what? Perhaps flatten should be updated instead?

I admit - I have not reviewed this PR/MNG-7642 in detail, so it might all be fine. No need to reply to my comment.

@gnodet
Copy link
Copy Markdown
Contributor Author

gnodet commented Jan 4, 2023

Not sure about Restore compatibility. This just restores as no-op methods. If flatten called them - didn't it do it for some purpose? Will flatten behave as expected or just not throw API incompatibility exception and silently do who-knows-what? Perhaps flatten should be updated instead?

I admit - I have not reviewed this PR/MNG-7642 in detail, so it might all be fine. No need to reply to my comment.

Those classes are actually not used. But the flatten maven plugin needs to be injected with one instance of ReportingConverter, see https://github.com/mojohaus/flatten-maven-plugin/blob/master/src/main/java/org/codehaus/mojo/flatten/ModelBuilderThreadSafetyWorkaround.java#L107
It will simply pass it to the ModelBuilder in the loop method.

The flatten plugin should also be adapted to support the removal of those classes, so that we can get rid of those in 4.1 for example.

@pzygielo
Copy link
Copy Markdown
Contributor

pzygielo commented Jan 4, 2023

So it will be passed in


just to be ignored?

@pzygielo
Copy link
Copy Markdown
Contributor

pzygielo commented Jan 4, 2023

I think I can see that now.
Thanks @gnodet.

@gnodet
Copy link
Copy Markdown
Contributor Author

gnodet commented Jan 4, 2023

I think I can see that now.
Thanks @gnodet.

Yes, it's really just for binary compatibility with the existing stuff.

@gnodet gnodet requested a review from michael-o January 9, 2023 08:00
@jira-importer
Copy link
Copy Markdown

Resolve #8811

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