Sitelet https://github.com/apache/maven-wrapper/commit/8b56620e977e3b35dec212446d458cf077468107
Skip to content

Commit 8b56620

Browse files
committed
[MWRAPPER-19] get MVNW_USERNAME and MVNW_PASSWORD from env
Submitted by James Z.M. Gao
1 parent 887a951 commit 8b56620

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎maven-wrapper/src/main/java/org/apache/maven/wrapper/DefaultDownloader.java‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,15 @@ private void configureProxyAuthentication()
6767

6868
private void configureAuthentication()
6969
{
70-
if ( System.getProperty( "MVNW_USERNAME" ) != null && System.getProperty( "MVNW_PASSWORD" ) != null
70+
if ( System.getenv( "MVNW_USERNAME" ) != null && System.getenv( "MVNW_PASSWORD" ) != null
7171
&& System.getProperty( "http.proxyUser" ) == null )
7272
{
7373
Authenticator.setDefault( new Authenticator()
7474
{
7575
protected PasswordAuthentication getPasswordAuthentication()
7676
{
77-
return new PasswordAuthentication( System.getProperty( "MVNW_USERNAME" ),
78-
System.getProperty( "MVNW_PASSWORD" ).toCharArray() );
77+
return new PasswordAuthentication( System.getenv( "MVNW_USERNAME" ),
78+
System.getenv( "MVNW_PASSWORD" ).toCharArray() );
7979
}
8080
} );
8181
}

0 commit comments

Comments
 (0)