Skip to content

[Blocker] EclipseLink root POM contains unresolved variable breaking the build on Maven 4 #2416

@lprimak

Description

@lprimak

Describe the bug

EclipseLink root POM contains <repository> entry which refers to undeclared property ${sonatypeOssDistMgmtStagingUrl}
Maven 4 is much stricter with bad POMs and builds that depend on this POM no longer work:
This is a critical issue because maven 4 projects cannot consume EclipseLink as it's now published in Maven Central.
This affects almost all Jakarta EE projects that use maven 4.

ERROR] Failed to execute goal on project flowlogix-jee: Could not collect dependencies for project com.flowlogix:flowlogix-jee:jar:9.x-SNAPSHOT
[ERROR] java.lang.IllegalArgumentException: Invalid Version Range Request: org.eclipse.ee4j:project:pom:1.0.9 < [central (https://repo.maven.apache.org/maven2, default, releases), sonatype-nexus-staging (${sonatypeOssDistMgmtStagingUrl}, default, releases)]
[ERROR] 	Caused by: Invalid Version Range Request: org.eclipse.ee4j:project:pom:1.0.9 < [central (https://repo.maven.apache.org/maven2, default, releases), sonatype-nexus-staging (${sonatypeOssDistMgmtStagingUrl}, default, releases)]
[ERROR] : Failed to collect dependencies at org.eclipse.persistence:org.eclipse.persistence.jpa.modelgen.processor:jar:4.0.6

In maven 3, this worked "by coincidence" maven 4 <repository> entries are processed before <parent> and thus the variable will not be inherited from the parent POM.

It needs to be defined in the <properties> section of the root POM with a default value.
Default value can even be empty, and overridden in deploy profile or command line if needed.

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