Skip to content

Commit

Permalink
ignore localhost and file system repositories from gcv-maven-reposito…
Browse files Browse the repository at this point in the history
…ries.xml (#56)

ignore localhost and file system repositories from gcv-maven-repositories.xml
  • Loading branch information
FinlayRJW authored Oct 28, 2024
1 parent 2a7b959 commit 5b0ae1e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions changelog/@unreleased/pr-56.v2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
type: fix
fix:
description: ignore localhost and file system repositories from gcv-maven-repositories.xml
links:
- https://github.com/palantir/gradle-consistent-versions-idea-plugin/pull/56
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ public static Set<String> loadRepositories(Project project) {
Repositories repositories = XML_MAPPER.readValue(mavenRepoFile, Repositories.class);
return repositories.repositories().stream()
.map(RepositoryConfig::url)
// This is a temporary workaround to ignore localhost and file system from maven local - long term
// we should fix localhost on the GCV side, and we should be able to explore the maven local repo
.filter(url -> !url.contains("localhost") && !url.startsWith("file:"))
.collect(Collectors.toCollection(LinkedHashSet::new));
} catch (IOException e) {
log.error("Failed to load repositories", e);
Expand Down

0 comments on commit 5b0ae1e

Please sign in to comment.