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,16 +292,13 @@
|
||||||
*/
|
*/
|
||||||
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(); )
|
|
||||||
{
|
|
||||||
Proxy proxy = (Proxy) it.next();
|
|
||||||
if ( proxy.isActive() )
|
if ( proxy.isActive() )
|
||||||
{
|
{
|
||||||
activeProxy = proxy;
|
activeProxy = proxy;
|
||||||
|
@ -309,12 +306,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
// If we only have one proxy, use it as the active one.
|
|
||||||
activeProxy = (Proxy) proxies.get( 0 );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return activeProxy;
|
return activeProxy;
|
||||||
|
@ -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