mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-03-25 18:41:44 +01:00
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:
@@ -750,16 +750,6 @@ public class DependencyCheckMojo extends AbstractMojo implements MavenMultiPageR
|
|||||||
}
|
}
|
||||||
// </editor-fold>
|
// </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.
|
* Returns the maven proxy.
|
||||||
*
|
*
|
||||||
@@ -816,7 +806,7 @@ public class DependencyCheckMojo extends AbstractMojo implements MavenMultiPageR
|
|||||||
|
|
||||||
final Proxy proxy = getMavenProxy();
|
final Proxy proxy = getMavenProxy();
|
||||||
if (proxy != null) {
|
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()));
|
Settings.setString(Settings.KEYS.PROXY_PORT, Integer.toString(proxy.getPort()));
|
||||||
final String userName = proxy.getUsername();
|
final String userName = proxy.getUsername();
|
||||||
final String password = proxy.getPassword();
|
final String password = proxy.getPassword();
|
||||||
|
|||||||
Reference in New Issue
Block a user