You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
maven-shade-plugin: dependency-reduced-pom.xml triggers FATAL parent.relativePath error in Maven 4 #13191
maven-shade-plugin generates a dependency-reduced-pom.xml with <relativePath>pom.xml</relativePath> in the parent section. When Maven 4 processes this generated POM (e.g. during the shade goal itself or downstream artifact resolution), it evaluates the relativePath, finds it resolves to the same project (not the declared parent), and raises a [FATAL] error.
Maven 3 was lenient in this case (WARNING-level or ignored).
Reproduction
Affected project (found in maven4-testing rc-6 run):
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-shade-plugin:3.6.1:shade (default)
on project org.apache.sling.models.impl: Error creating shaded jar:
Encountered 1 problem(s) while processing the POMs:
[ERROR] - [FATAL] 'parent.relativePath' of POM org.apache.sling:org.apache.sling.models.impl:2.0.3-SNAPSHOT
(/home/runner/work/.../dependency-reduced-pom.xml) points at 'pom.xml' which resolves to
org.apache.sling:org.apache.sling.models.impl instead of the declared parent
org.apache.sling:sling-bundle-parent. Correct the <relativePath> value or remove it to let
Maven resolve the parent from the repository.
Root cause
The dependency-reduced-pom.xml generated by maven-shade-plugin contains:
This is a generated synthetic POM — the relativePath is left over from the original POM transformation. Maven 4's parent POM resolution is stricter: when relativePath resolves to the project itself (same groupId:artifactId), it is now a [FATAL] error instead of a warning.
Expected behavior
Either:
maven-shade-plugin should strip or fix the <relativePath> in the generated dependency-reduced-pom.xml, OR
Maven 4 should apply WARNING (not FATAL) severity when a generated/synthetic POM has an incorrect relativePath, similar to Maven 3 behavior.
Activity
fix: add --maven3-personality hint to FATAL message for wrong parent …
fix: add --maven3-personality hint to FATAL message for wrong parent …
fix: add --maven3-personality hint to FATAL message for wrong parent …
fix: add -Dmaven.maven3Personality=true hint to FATAL message for wro…
fix: add -Dmaven.maven3Personality=true hint to FATAL message for wro…
fix: add -Dmaven.maven3Personality hint to FATAL message for wrong pa…
fix: add -Dmaven.maven3Personality hint to FATAL message for wrong pa…
fix: add -Dmaven.maven3Personality hint to FATAL message for wrong pa…
fix: add -Dmaven.maven3Personality hint to FATAL message for wrong pa…
fix: add -Dmaven.maven3Personality hint to FATAL message for wrong pa…