Skip to content

[MDEP-981] Non-Unique dependency declaration breaks build (Maven 4) #1482

Open
@jira-importer

Description

@jira-importer

Matthias Bünger opened MDEP-981 and commented

Build is broken on Maven 4 due duplicate dependency delcaration

PS D:\Github\Maven\maven-dependency-plugin> mvn clean -V         
Apache Maven 4.0.0-rc-3 (3952d00ce65df6753b63a51e86b1f626c55a8df2)
Maven home: C:\apache-maven-4.0.0-rc-3
Java version: 21.0.1, vendor: Eclipse Adoptium, runtime: C:\JDK\Java21
Default locale: de_DE, platform encoding: UTF-8
OS name: "windows 10", version: "10.0", arch: "amd64", family: "winnt"
[INFO] 
[INFO] 1 problem was encountered while building the effective settings (use -e to see details)
[INFO] 
[WARNING] Unable to find the root directory. Create a .mvn directory in the root directory or add the root="true" attribute on the root project's model to identify it.
[INFO] Scanning for projects...
[ERROR] Some problems were encountered while processing the POMs
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]   
[ERROR]   The project [inherited]:maven-dependency-plugin:maven-plugin:3.8.2-SNAPSHOT (D:\Github\Maven\maven-dependency-plugin\pom.xml) has 2 errors
[ERROR]     'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: org.apache.maven.resolver:maven-resolver-api:jar -> version ${resolverVersion} vs 1.9.22 @ org.apache.maven.plugins:maven-dependency-plugin:3.8.2-SNAPSHOT, file:///D:/Github/Maven/maven-dependency-plugin/pom.xml, line 409, column 5
[ERROR]     'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: org.apache.maven.resolver:maven-resolver-util:jar -> version ${resolverVersion} vs 1.9.22 @ org.apache.maven.plugins:maven-dependency-plugin:3.8.2-SNAPSHOT, file:///D:/Github/Maven/maven-dependency-plugin/pom.xml, line 415, column 5

The resolver version is set to 1.4.1 via property:

<resolverVersion>1.4.1</resolverVersion>


Affects: 3.8.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpriority:criticalCrashes, loss of data, severe memory leak

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions