Skip to content

Commit 0c28780

Browse files
added fallback if no repositories were found
1 parent 39aa279 commit 0c28780

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

cobigen/core-artifact-retriever/src/main/java/com/devonfw/cobigen/retriever/ArtifactRetriever.java

+7
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,13 @@ protected static List<URL> retrieveTemplateSetXmlDownloadLinks(List<String> grou
9393
.addAll(retrieveArtifactsFromRepository(groupIdsList, model, activeProxy, repositoriesWhichDoNotUseTheProxy));
9494
}
9595

96+
// Fallback if no repositories were found
97+
if (allActiveRepositories.isEmpty()) {
98+
LOG.debug("No repositories were found in settings.xml, using fallback.");
99+
downloadLinks.addAll(
100+
retrieveArtifactsFromRepository(groupIdsList, null, null, new ArrayList<MavenSettingsRepositoryModel>()));
101+
}
102+
96103
return downloadLinks;
97104

98105
}

0 commit comments

Comments
 (0)