[
http://jira.codehaus.org/browse/MNG-4228?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=184349#action_184349
]
John Casey commented on MNG-4228:
---------------------------------
Actually, reading the source again, it looks like NTCredentials IS used:
{code}
ProxyInfo proxyInfo = getProxyInfo( getRepository().getProtocol(),
getRepository().getHost() );
if ( proxyInfo != null )
{
String proxyUsername = proxyInfo.getUserName();
String proxyPassword = proxyInfo.getPassword();
String proxyHost = proxyInfo.getHost();
int proxyPort = proxyInfo.getPort();
String proxyNtlmHost = proxyInfo.getNtlmHost();
String proxyNtlmDomain = proxyInfo.getNtlmDomain();
if ( proxyHost != null )
{
hc.setProxy( proxyHost, proxyPort );
if ( proxyUsername != null && proxyPassword != null )
{
Credentials creds;
if ( proxyNtlmHost != null || proxyNtlmDomain != null )
{
creds = new NTCredentials( proxyUsername,
proxyPassword, proxyNtlmHost, proxyNtlmDomain );
}
else
{
creds = new UsernamePasswordCredentials( proxyUsername,
proxyPassword );
}
int port = proxyInfo.getPort() > -1 ? proxyInfo.getPort() :
AuthScope.ANY_PORT;
AuthScope scope = new AuthScope( proxyHost, port );
client.getState().setProxyCredentials( scope, creds );
}
}
}
{code}
So, if you use ntlmHost and ntlmDomain in your proxy configuration, it should
work for NTLMv1 (but not v2).
> [regression] Authorization failed: Not authorized by proxy.
> -----------------------------------------------------------
>
> Key: MNG-4228
> URL: http://jira.codehaus.org/browse/MNG-4228
> Project: Maven 2
> Issue Type: Bug
> Components: Artifacts and Repositories, Settings
> Affects Versions: 2.2.0
> Environment: Windows XP, java version "1.6.0_04"
> Reporter: Marco Noto
> Assignee: John Casey
> Priority: Blocker
> Fix For: 2.2.1
>
> Attachments: NTLMV21.RAR, TestNTLMAuth.java
>
>
> I can not access any external repository using the version 2.2.0. If I go
> back to 2.1.0 everything works properly.
> For example:
> mvn -U eclipse:eclipse
> [INFO] Scanning for projects...
> [INFO] Searching repository for plugin with prefix: 'eclipse'.
> [INFO] org.apache.maven.plugins: checking for updates from central
> [WARNING] repository metadata for: 'org.apache.maven.plugins' could not be
> retrieved from repository: central due
> to an error: Authorization failed: Not authorized by proxy.
> [INFO] Repository 'central' will be blacklisted
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira