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 Mar 4, 2024
1 parent 35c9ac5 commit a07365f
Showing 1 changed file with 2 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,7 @@ 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 a07365f

Please sign in to comment.