Skip to content

gdk-parent:4.10.17 inherits a duplicate Flexmark dependency-management entry #89

Description

@jasonlyle88

Affected artifact

cloud.graal.gdk:gdk-parent:4.10.17

Impact

Projects inheriting GDK Parent emit a Maven malformed-model warning on every Maven invocation. Maven currently completes successfully, but warns that future Maven versions may no longer support the malformed model.

Actual ### result

mvn validate reports:

[WARNING] 'dependencyManagement.dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique:
com.vladsch.flexmark:flexmark-html2md-converter:jar
-> version ${html2md.converter.version} vs ${flexmark.version}
@ io.micronaut.platform:micronaut-platform:4.10.17-oracle-00001,
micronaut-platform-4.10.17-oracle-00001.pom, line 3132, column 19

Expected result

Maven model construction completes without a duplicate dependency-management warning.

Root cause

gdk-parent:4.10.17 inherits:

io.micronaut.platform:micronaut-parent:4.10.17-oracle-00001

Its imported platform POM declares the same dependency-management key twice:

com.vladsch.flexmark:flexmark-html2md-converter

with conflicting versions:

${html2md.converter.version}
${flexmark.version}

Minimal reproduction

This uses Maven Central and https://maven.oracle.com/public only. The settings file redirects all inherited non-Central repositories, including private repository IDs, to Oracle Public.

pom.xml

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>cloud.graal.gdk</groupId>
        <artifactId>gdk-parent</artifactId>
        <version>4.10.17</version>
    </parent>

    <groupId>example</groupId>
    <artifactId>gdk-flexmark-repro</artifactId>
    <version>1.0.0</version>
    <packaging>pom</packaging>
</project>

settings.xml

<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd">
    <mirrors>
        <mirror>
            <id>oracle-public-for-non-central</id>
            <url>https://maven.oracle.com/public</url>
            <mirrorOf>*,!central</mirrorOf>
        </mirror>
    </mirrors>

    <profiles>
        <profile>
            <id>oracle-public</id>
            <repositories>
                <repository>
                    <id>oracle-public</id>
                    <url>https://maven.oracle.com/public</url>
                </repository>
            </repositories>
        </profile>
    </profiles>

    <activeProfiles>
        <activeProfile>oracle-public</activeProfile>
    </activeProfiles>
</settings>

Command

mvn -s settings.xml -Dmaven.repo.local="$(mktemp -d)" validate

Validation performed

  • Apache Maven 3.9.16
  • GraalVM Community 25.0.2
  • Build succeeds with exit code 0.

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