mirror of https://github.com/apache/maven.git
[MNG-2387] <active> on <proxy> in settings is misleading
o Merged from r747683 git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@759552 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ccdd99b5c6
commit
aded054d76
|
@ -292,28 +292,19 @@
|
||||||
*/
|
*/
|
||||||
public synchronized Proxy getActiveProxy()
|
public synchronized Proxy getActiveProxy()
|
||||||
{
|
{
|
||||||
if(activeProxy == null)
|
if (activeProxy == null)
|
||||||
{
|
{
|
||||||
java.util.List proxies = getProxies();
|
java.util.List<Proxy> proxies = getProxies();
|
||||||
if ( proxies != null && !proxies.isEmpty() )
|
if ( proxies != null && !proxies.isEmpty() )
|
||||||
{
|
{
|
||||||
if ( proxies.size() > 1 )
|
for ( Proxy proxy : proxies )
|
||||||
{
|
{
|
||||||
for ( java.util.Iterator it = proxies.iterator(); it.hasNext(); )
|
if ( proxy.isActive() )
|
||||||
{
|
{
|
||||||
Proxy proxy = (Proxy) it.next();
|
activeProxy = proxy;
|
||||||
if ( proxy.isActive() )
|
break;
|
||||||
{
|
|
||||||
activeProxy = proxy;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
// If we only have one proxy, use it as the active one.
|
|
||||||
activeProxy = (Proxy) proxies.get( 0 );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -464,7 +455,7 @@
|
||||||
<name>active</name>
|
<name>active</name>
|
||||||
<version>1.0.0</version>
|
<version>1.0.0</version>
|
||||||
<required>false</required>
|
<required>false</required>
|
||||||
<defaultValue>false</defaultValue>
|
<defaultValue>true</defaultValue>
|
||||||
<description>
|
<description>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
Whether this proxy configuration is the active one.
|
Whether this proxy configuration is the active one.
|
||||||
|
|
Loading…
Reference in New Issue