mirror of https://github.com/apache/maven.git
[MNG-7117] add support for blocked mirror
This commit is contained in:
parent
3b21386c3f
commit
28b4ea92d3
|
@ -188,8 +188,8 @@ public class DefaultRepositorySystemSessionFactory
|
|||
DefaultMirrorSelector mirrorSelector = new DefaultMirrorSelector();
|
||||
for ( Mirror mirror : request.getMirrors() )
|
||||
{
|
||||
mirrorSelector.add( mirror.getId(), mirror.getUrl(), mirror.getLayout(), false, mirror.getMirrorOf(),
|
||||
mirror.getMirrorOfLayouts() );
|
||||
mirrorSelector.add( mirror.getId(), mirror.getUrl(), mirror.getLayout(), false, mirror.isBlocked(),
|
||||
mirror.getMirrorOf(), mirror.getMirrorOfLayouts() );
|
||||
}
|
||||
session.setMirrorSelector( mirrorSelector );
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ under the License.
|
|||
<groupId>org.codehaus.modello</groupId>
|
||||
<artifactId>modello-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<version>1.1.0</version>
|
||||
<version>1.2.0</version>
|
||||
<models>
|
||||
<model>src/main/mdo/settings.mdo</model>
|
||||
</models>
|
||||
|
|
|
@ -633,6 +633,15 @@
|
|||
of the mirror to repositories with a matching layout (apart from a matching id). Since Maven 3.
|
||||
</description>
|
||||
</field>
|
||||
<field>
|
||||
<name>blocked</name>
|
||||
<version>1.2.0+</version>
|
||||
<type>boolean</type>
|
||||
<defaultValue>false</defaultValue>
|
||||
<description>
|
||||
Whether this mirror should be blocked from any download request but fail the download process, explaining why.
|
||||
</description>
|
||||
</field>
|
||||
</fields>
|
||||
<codeSegments>
|
||||
<codeSegment>
|
||||
|
@ -648,6 +657,10 @@
|
|||
sb.append( ",mirrorOf=" ).append( mirrorOf );
|
||||
sb.append( ",url=" ).append( this.url );
|
||||
sb.append( ",name=" ).append( this.name );
|
||||
if ( isBlocked() )
|
||||
{
|
||||
sb.append( ",blocked" );
|
||||
}
|
||||
sb.append( "]" );
|
||||
return sb.toString();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue