Skip to content
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

[MPLUGIN-519][MPLUGIN-520] Parent POM 42, prerequisite of 3.6.3, get rid of maven-compat #280

Merged
merged 4 commits into from
May 2, 2024

Conversation

cstamas
Copy link
Member

@cstamas cstamas commented Apr 29, 2024

Update parent POM to 42, up prerequisite to 3.6.3. As parent 42 removes implicit (sisu) indexing, added explicitly indexing to all modules, as I think they all need it (may be wrong here).

The Mojo AddPluginArtifactMetadataMojo pulls in classes that have transitive (classes) coming from maven-compat. In fact, this mojo is not required at all since Maven 3.9.0 as resolver handles all transparently.


https://issues.apache.org/jira/browse/MPLUGIN-519
https://issues.apache.org/jira/browse/MPLUGIN-520

@cstamas cstamas changed the title Get rid of maven-compat [MPLUGIN-519] Get rid of maven-compat Apr 29, 2024
@cstamas cstamas changed the title [MPLUGIN-519] Get rid of maven-compat [MPLUGIN-519][MPLUGIN-520] Parent POM 42, prerequisite of 3.6.3, get rid of maven-compat Apr 29, 2024
@cstamas cstamas marked this pull request as ready for review April 29, 2024 13:35
@michael-o michael-o self-requested a review April 30, 2024 07:59
Copy link
Member

@michael-o michael-o left a comment

Choose a reason for hiding this comment

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

This works for me.

Comment on lines +84 to +98
// nothing if Maven is 3.9+
try {
if (versionScheme
.parseVersion("3.9.0")
.compareTo(versionScheme.parseVersion(runtimeInformation.getMavenVersion()))
< 1) {
getLog().info("This Mojo is not used in Maven version 3.9.0 and above");
return;
}
} catch (InvalidVersionSpecificationException e) {
// not happening with generic
throw new MojoExecutionException(e);
}

projectArtifact.addMetadata(groupMetadata);
LegacySupport.execute(project, getGoalPrefix());
Copy link
Member

Choose a reason for hiding this comment

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

We should be careful with it .... probably it is used by Nexus Staging Plugin
https://issues.apache.org/jira/browse/MPLUGIN-384

Copy link
Member Author

Choose a reason for hiding this comment

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

I consider nexus-staging-maven-plugin legacy, simply put, people should avoid using it... all the benefits it (may) add, is that you don't have to log into Nx UI and press "close" button. Simply put, not worth if you contrast that to legacy burden it brings and have.

Copy link
Member

Choose a reason for hiding this comment

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

I fully agree with @cstamas and ignore it.

Copy link
Member

Choose a reason for hiding this comment

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

👍

Copy link
Member

Choose a reason for hiding this comment

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

We will see how many people use nexus-staging

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

This change is unrelated. What happened is that those users had no prefix set (ever), so remote metadata has no prefix either, and now that they upgraded, and forced to set plugin prefix (in latest m-p-p), NPE happens.

@michael-o
Copy link
Member

This will constitute a great 3.13.0 release.

@cstamas cstamas merged commit 1fa1805 into apache:master May 2, 2024
19 checks passed
@cstamas cstamas deleted the get-rid-of-compat branch May 2, 2024 20:15
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