oracle / oracle/graal-dev-kit

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

Open
#89 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
40
Forks
13
Avg merge
15h 9m
Merged PRs (30d)
6

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running the minimal pom.xml reproduction with settings.xml and the specified mvn validate command, using a clean local repository. Trace the inherited dependency-management entries for flexmark-html2md-converter and identify the repository-controlled change needed to remove the duplicate. Done means Maven completes validation without the malformed-model warning.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.