GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — maven-shade-plugin: dependency-reduced-pom.xml triggers FATAL parent.relativePath error in Maven 4 · Issue #13191 · apache/maven

maven-shade-plugin: dependency-reduced-pom.xml triggers FATAL parent.relativePath error in Maven 4 #13191

New issue
Copy link
New issue
Copy link
Closed
#13196
Closed
maven-shade-plugin: dependency-reduced-pom.xml triggers FATAL parent.relativePath error in Maven 4#13191
#13196
Copy link

Description

@gnodet
gnodet
opened on Sep 18, 2026
Issue body actions

Summary

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):

  • sling-org-apache-sling-models-impl — uses maven-shade-plugin:3.6.1

Error

[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:

<parent>
  ...
  <relativePath>pom.xml</relativePath>
</parent>

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:

  1. maven-shade-plugin should strip or fix the <relativePath> in the generated dependency-reduced-pom.xml, OR
  2. Maven 4 should apply WARNING (not FATAL) severity when a generated/synthetic POM has an incorrect relativePath, similar to Maven 3 behavior.

Maven version

Maven 4.0.0-rc-6 / maven-4.0.x branch

Activity

  1. gnodet
    added 8 commits that reference this issue on Sep 19, 2026

    fix: add --maven3-personality hint to FATAL message for wrong parent …

    0347e1c

    fix: add --maven3-personality hint to FATAL message for wrong parent …

    84cdd1b

    fix: add --maven3-personality hint to FATAL message for wrong parent …

    f38ccf5

    fix: add -Dmaven.maven3Personality=true hint to FATAL message for wro…

    172f34b

    fix: add -Dmaven.maven3Personality=true hint to FATAL message for wro…

    e8e3823

    fix: add -Dmaven.maven3Personality hint to FATAL message for wrong pa…

    8bf6626

    fix: add -Dmaven.maven3Personality hint to FATAL message for wrong pa…

    92a5168

    fix: add -Dmaven.maven3Personality hint to FATAL message for wrong pa…

    0240a8e
  2. gnodet
    closed this as completedin #13196on Sep 20, 2026
  3. gnodet
    added a commit that references this issue on Sep 20, 2026

    fix: add -Dmaven.maven3Personality hint to FATAL message for wrong pa…

    This issue will close once commit 0db1748 is merged into the 'master' branch.
    0db1748
  4. pull
    added a commit that references this issue on Sep 20, 2026

    fix: add -Dmaven.maven3Personality hint to FATAL message for wrong pa…

    This issue will close once commit f47804c is merged into the 'master' branch.
    f47804c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.