Merge pull request #145 from erik-wramner/fix-maven-proxy-bug

Modified Maven plugin to use proxy host as is, not as an URL. This works...

Former-commit-id: 53e28e6799ef13ca3d88ed00aaa1e0c3f24aa04b
This commit is contained in:
Jeremy Long
2014-08-15 05:37:14 -04:00

View File

@@ -750,16 +750,6 @@ public class DependencyCheckMojo extends AbstractMojo implements MavenMultiPageR
}
// </editor-fold>
/**
* Returns the maven settings proxy server.
*
* @param proxy the maven proxy
* @return the proxy url
*/
private String getMavenSettingsProxyServer(Proxy proxy) {
return new StringBuilder(proxy.getProtocol()).append("://").append(proxy.getHost()).toString();
}
/**
* Returns the maven proxy.
*
@@ -816,7 +806,7 @@ public class DependencyCheckMojo extends AbstractMojo implements MavenMultiPageR
final Proxy proxy = getMavenProxy();
if (proxy != null) {
Settings.setString(Settings.KEYS.PROXY_SERVER, getMavenSettingsProxyServer(proxy));
Settings.setString(Settings.KEYS.PROXY_SERVER, proxy.getHost());
Settings.setString(Settings.KEYS.PROXY_PORT, Integer.toString(proxy.getPort()));
final String userName = proxy.getUsername();
final String password = proxy.getPassword();