Skip to content

fix: Move consumer POM flattening to .mvn/maven.properties (fixes #1688)#1694

Merged
gnodet merged 1 commit intomasterfrom
fix/consumer-pom-flatten-location
Mar 9, 2026
Merged

fix: Move consumer POM flattening to .mvn/maven.properties (fixes #1688)#1694
gnodet merged 1 commit intomasterfrom
fix/consumer-pom-flatten-location

Conversation

@gnodet
Copy link
Copy Markdown
Member

@gnodet gnodet commented Mar 9, 2026

Summary

  • Moves maven.consumer.pom.flatten=true from pom.xml <properties> to .mvn/maven.properties
  • The property is a Maven configuration setting, not a project property — it was silently ignored when placed in the POM
  • With this fix, child module consumer POMs are fully self-contained 4.0.0 POMs with no <parent> reference to jline-parent (which uses modelVersion 4.1.0)
  • This fixes Maven 3 and Gradle compatibility

Before (consumer POM still had parent reference):

<modelVersion>4.0.0</modelVersion>
<parent>
  <groupId>org.jline</groupId>
  <artifactId>jline-parent</artifactId>
  <version>4.0.1</version>
</parent>

After (self-contained consumer POM):

<modelVersion>4.0.0</modelVersion>
<groupId>org.jline</groupId>
<artifactId>jline-terminal</artifactId>
<version>4.0.1</version>

Fixes #1688

Workaround for apache/maven#11772

The maven.consumer.pom.flatten property must be set in
.mvn/maven.properties (a Maven configuration property), not in
pom.xml <properties> (a project property). When set in the POM, it
was ignored and child consumer POMs still retained a <parent>
reference to jline-parent (which uses modelVersion 4.1.0), breaking
Maven 3 and Gradle consumers.

Workaround for apache/maven#11772
@gnodet gnodet merged commit 2505581 into master Mar 9, 2026
9 checks passed
@gnodet gnodet added this to the 4.0.2 milestone Mar 31, 2026
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.

Gradle issue with Maven modelVersion 4.1.0 of jline-parent

1 participant