Modified Maven plugin to use proxy host as is, not as an URL. This works correctly for our proxy server with Maven 3.

Former-commit-id: 02e97e359b1c5d6d9f1dc9149c9fbed510d31559
This commit is contained in:
erik-wramner
2014-08-10 12:15:00 +02:00
parent d3bff2f39d
commit 6822188f52

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();