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

[MNG-7893] Allow versioning the superpom according to the model version #1253

Merged
merged 2 commits into from
Sep 26, 2023

Conversation

gnodet
Copy link
Contributor

@gnodet gnodet commented Sep 21, 2023

JIRA issue: https://issues.apache.org/jira/browse/MNG-7893

Btw, I wonder if the recent changes such as #1139 and #1085 should be updated to only affect the 4.1.0 superpom... Thoughts welcomed.

@gnodet gnodet added this to the 4.0.0-alpha-8 milestone Sep 21, 2023
@@ -495,6 +495,7 @@ private void validatePrerequisitesForNonMavenPluginProjects(List<MavenProject> p
* @return A {@link Set} of profile identifiers, never {@code null}.
*/
private Set<String> getAllProfiles(MavenSession session) {
// TODO: which version of super pom should we use here ?
Copy link
Member

Choose a reason for hiding this comment

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

Maybe the same version that project uses? But: what happens if reactor has multiple versions (not same)? -- IMHO should fail.

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 update this part of the computation to be coherent with the way superPoms are used during model building. The superPom of a given project is determined by the modelVersion of that project and not the modelVersion of its upper parent. What this means is that if you write a 4.1.0 project which inherit a 4.0.0 parent, the superPom will be 4.1.0.

@gnodet gnodet merged commit 10fa5c7 into apache:master Sep 26, 2023
18 checks passed
@gnodet gnodet deleted the MNG-7893-superpom-versionning branch October 18, 2023 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants