mirror of https://github.com/apache/maven.git
get MVNW_USERNAME and MVNW_PASSWORD from env
when auth for the http proxy, MVNW_{USERNAME,PASSWORD} should be fetched via `System.getenv`.
This commit is contained in:
parent
14449e426a
commit
6fba7aa3c4
|
@ -68,7 +68,7 @@ public class DefaultDownloader
|
||||||
|
|
||||||
private void configureAuthentication()
|
private void configureAuthentication()
|
||||||
{
|
{
|
||||||
if ( System.getProperty( "MVNW_USERNAME" ) != null && System.getProperty( "MVNW_PASSWORD" ) != null
|
if ( System.getenv( MVNW_USERNAME ) != null && System.getenv( MVNW_PASSWORD ) != null
|
||||||
&& System.getProperty( "http.proxyUser" ) == null )
|
&& System.getProperty( "http.proxyUser" ) == null )
|
||||||
{
|
{
|
||||||
Authenticator.setDefault( new Authenticator()
|
Authenticator.setDefault( new Authenticator()
|
||||||
|
@ -76,8 +76,8 @@ public class DefaultDownloader
|
||||||
@Override
|
@Override
|
||||||
protected PasswordAuthentication getPasswordAuthentication()
|
protected PasswordAuthentication getPasswordAuthentication()
|
||||||
{
|
{
|
||||||
return new PasswordAuthentication( System.getProperty( "MVNW_USERNAME" ),
|
return new PasswordAuthentication( System.getenv( MVNW_USERNAME ),
|
||||||
System.getProperty( "MVNW_PASSWORD" ).toCharArray() );
|
System.getenv( MVNW_PASSWORD ).toCharArray() );
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue