Skip to content

Commit

Permalink
only emit warnings when urls differ
Browse files Browse the repository at this point in the history
  • Loading branch information
kwin committed May 18, 2024
1 parent bee5ef4 commit 885cee2
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -611,6 +611,7 @@ private void validateUniqueRepositoryIds(
for (Repository externalRepository : externalRepositories) {
Optional<Repository> clashingPomRepository = pomRepositories.stream()
.filter(r -> Objects.equals(r.getId(), externalRepository.getId()))
.filter(r -> !Objects.equals(r.getUrl(), externalRepository.getUrl()))
.findFirst();
if (clashingPomRepository.isPresent()) {
addViolation(
Expand All @@ -619,7 +620,8 @@ private void validateUniqueRepositoryIds(
Version.BASE,
isPluginRepository ? "pluginRepositories.repository" : "repositories.repository",
clashingPomRepository.get().getId(),
"is overwritten by the repository with same id from " + externalRepositoriesSource,
"is overwritten by the repository with same id but having a different url from "
+ externalRepositoriesSource,
clashingPomRepository.get());
}
}
Expand Down

0 comments on commit 885cee2

Please sign in to comment.