{
if ( repositories != null && mirrors != null )
{
for ( ArtifactRepository repository : repositories )
{
Mirror mirror = getMirror( repository, mirrors );
if ( mirror != null )
{
repository.setId( mirror.getId() );
repository.setUrl( mirror.getUrl() );
if ( StringUtils.isNotEmpty( mirror.getLayout() ) )
{
repository.setLayout( getLayout( mirror.getLayout() ) );
}
}
}
}
}