in maven-wrapper/src/main/java/org/apache/maven/wrapper/DefaultDownloader.java [59:72]
private void configureAuthentication() {
if (System.getenv(MVNW_USERNAME) != null
&& System.getenv(MVNW_PASSWORD) != null
&& System.getProperty("http.proxyUser") == null) {
Authenticator.setDefault(new Authenticator() {
@Override
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(
System.getenv(MVNW_USERNAME),
System.getenv(MVNW_PASSWORD).toCharArray());
}
});
}
}