mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-01-13 23:33:37 +01:00
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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user