in maven-wrapper-plugin/src/main/java/org/apache/maven/plugins/wrapper/WrapperMojo.java [334:358]
private String getRepoUrl() {
// default
String repoUrl = DEFAULT_REPOURL;
// adapt to also support MVNW_REPOURL as supported by mvnw scripts from maven-wrapper
String mvnwRepoUrl = System.getenv(MVNW_REPOURL);
if (mvnwRepoUrl != null && !mvnwRepoUrl.isEmpty()) {
repoUrl = mvnwRepoUrl;
getLog().debug("Using repo URL from " + MVNW_REPOURL + " environment variable.");
}
// otherwise mirror from settings
else if (settings.getMirrors() != null && !settings.getMirrors().isEmpty()) {
for (Mirror current : settings.getMirrors()) {
if ("*".equals(current.getMirrorOf())) {
repoUrl = current.getUrl();
break;
}
}
getLog().debug("Using repo URL from * mirror in settings file.");
}
getLog().debug("Determined repo URL to use as " + repoUrl);
return repoUrl;
}