Skip to content

chore: added upper bound to parent pom range #1421

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

Merged
merged 4 commits into from
Jun 18, 2025

Conversation

jarebudev
Copy link
Contributor

This PR

adds upper bound version for the parent pom

  • adds this new feature

Related Issues

Fixes #1417

Notes

see https://maven.apache.org/docs/3.2.2/release-notes.html

Support version ranges in parent elements ([MNG-2199](https://issues.apache.org/jira/browse/MNG-2199))
Parent elements can now use bounded ranges in the version specification. You can now consistently use ranges for all intra-project dependencies, of which parents are a special case but still considered a dependency of projects that inherit from them. The following is now permissible:

<project>
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>org.apache</groupId>
    <artifactId>apache</artifactId>
    <version>[3.0,4.0)</version>
  </parent>
  <groupId>org.apache.maven.its.mng2199</groupId>
  <artifactId>valid</artifactId>
  <version>1</version>
  <packaging>pom</packaging>
</project>

Note this requires Maven 3.2.2 so if you use this new feature it is encouraged you add a Maven Enforcer rule to your build to ensure the use of Maven 3.2.2+.

Follow-up Tasks

How to test

@toddbaert
Copy link
Member

toddbaert commented Jun 17, 2025

cc @aepfli @chrfwow @justinabrahms

I guess this is OK, we'll just have to remember to update these if we release new parents...

We could make the upper bound exclusive of 1.0 actually, maybe that would be safer?

@chrfwow
Copy link
Contributor

chrfwow commented Jun 18, 2025

I agree, let's set it to exclusive 1.0

@chrfwow chrfwow enabled auto-merge (squash) June 18, 2025 07:30
@chrfwow chrfwow merged commit 5701dc5 into open-feature:main Jun 18, 2025
6 of 7 checks passed
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.

Maven error: The requested parent version range '[0.2,)' does not specify an upper bound