Bukama commented on code in PR #463: URL: https://github.com/apache/maven-dependency-plugin/pull/463#discussion_r1846973600
########## src/main/java/org/apache/maven/plugins/dependency/fromDependencies/CopyDependenciesMojo.java: ########## @@ -111,6 +109,21 @@ protected void doExecute() throws MojoExecutionException { Set<Artifact> artifacts = dss.getResolvedDependencies(); if (!useRepositoryLayout) { + Map<String, Integer> copies = new HashMap<>(); + for (Artifact artifactItem : artifacts) { + String destFileName = DependencyUtil.getFormattedFileName( + artifactItem, stripVersion, prependGroupId, useBaseVersion, stripClassifier); + int numCopies = copies.getOrDefault(destFileName, 0); + copies.put(destFileName, numCopies + 1); + } + for (Map.Entry<String, Integer> entry : copies.entrySet()) { + if (entry.getValue() > 1) { + getLog().warn("Multiple files with the name " + entry.getKey() + " in the dependency tree."); + getLog().warn( Review Comment: Is this new line on purpose? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org