Class Mirror

All Implemented Interfaces:
Serializable, Cloneable

public class Mirror extends IdentifiableBase implements Serializable, Cloneable
A download mirror for a given repository.
Version:
$Revision$ $Date$
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private boolean
    Whether this mirror should be blocked from any download request but fail the download process, explaining why.
    private String
    The layout of the mirror repository.
    private String
    A repository id or (since Maven 2.0.9) an expression matching one or many repository ids to mirror, e.g., central or *,!repo1.
    private String
    The layouts of repositories being mirrored.
    private String
    The optional name that describes the mirror.
    private String
    The URL of the mirror repository.

    Fields inherited from class org.apache.maven.settings.TrackableBase

    GLOBAL_LEVEL, USER_LEVEL
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Method clone.
    Get the layout of the mirror repository.
    Get a repository id or (since Maven 2.0.9) an expression matching one or many repository ids to mirror, e.g., central or *,!repo1.
    Get the layouts of repositories being mirrored.
    Get the optional name that describes the mirror.
    Get the URL of the mirror repository.
    boolean
    Get whether this mirror should be blocked from any download request but fail the download process, explaining why.
    void
    setBlocked(boolean blocked)
    Set whether this mirror should be blocked from any download request but fail the download process, explaining why.
    void
    setLayout(String layout)
    Set the layout of the mirror repository.
    void
    setMirrorOf(String mirrorOf)
    Set a repository id or (since Maven 2.0.9) an expression matching one or many repository ids to mirror, e.g., central or *,!repo1.
    void
    setMirrorOfLayouts(String mirrorOfLayouts)
    Set the layouts of repositories being mirrored.
    void
    Set the optional name that describes the mirror.
    void
    Set the URL of the mirror repository.
     

    Methods inherited from class org.apache.maven.settings.IdentifiableBase

    getId, setId

    Methods inherited from class org.apache.maven.settings.TrackableBase

    getSourceLevel, setSourceLevel

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • mirrorOf

      private String mirrorOf
      A repository id or (since Maven 2.0.9) an expression matching one or many repository ids to mirror, e.g., central or *,!repo1. * (since Maven 2.0.5), external:* (since Maven 2.0.9) and external:http:* (since Maven 3.8.0) have a special meaning: see Mirror Settings guide.
    • name

      private String name
      The optional name that describes the mirror.
    • url

      private String url
      The URL of the mirror repository.
    • layout

      private String layout
      The layout of the mirror repository.
      Since: Maven 3 .
    • mirrorOfLayouts

      private String mirrorOfLayouts
      The layouts of repositories being mirrored. This value can be used to restrict the usage of the mirror to repositories with a matching layout (apart from a matching id).
      Since: Maven 3 .
    • blocked

      private boolean blocked
      Whether this mirror should be blocked from any download request but fail the download process, explaining why.
      Default value is: false
      Since: Maven 3.8.0 .
  • Constructor Details

    • Mirror

      public Mirror()
  • Method Details

    • clone

      public Mirror clone()
      Method clone.
      Overrides:
      clone in class IdentifiableBase
      Returns:
      Mirror
    • getLayout

      public String getLayout()
      Get the layout of the mirror repository.
      Since: Maven 3.
      Returns:
      String
    • getMirrorOf

      public String getMirrorOf()
      Get a repository id or (since Maven 2.0.9) an expression matching one or many repository ids to mirror, e.g., central or *,!repo1. * (since Maven 2.0.5), external:* (since Maven 2.0.9) and external:http:* (since Maven 3.8.0) have a special meaning: see Mirror Settings guide.
      Returns:
      String
    • getMirrorOfLayouts

      public String getMirrorOfLayouts()
      Get the layouts of repositories being mirrored. This value can be used to restrict the usage of the mirror to repositories with a matching layout (apart from a matching id).
      Since: Maven 3.
      Returns:
      String
    • getName

      public String getName()
      Get the optional name that describes the mirror.
      Returns:
      String
    • getUrl

      public String getUrl()
      Get the URL of the mirror repository.
      Returns:
      String
    • isBlocked

      public boolean isBlocked()
      Get whether this mirror should be blocked from any download request but fail the download process, explaining why.
      Default value is: false
      Since: Maven 3.8.0.
      Returns:
      boolean
    • setBlocked

      public void setBlocked(boolean blocked)
      Set whether this mirror should be blocked from any download request but fail the download process, explaining why.
      Default value is: false
      Since: Maven 3.8.0.
      Parameters:
      blocked - a blocked object.
    • setLayout

      public void setLayout(String layout)
      Set the layout of the mirror repository.
      Since: Maven 3.
      Parameters:
      layout - a layout object.
    • setMirrorOf

      public void setMirrorOf(String mirrorOf)
      Set a repository id or (since Maven 2.0.9) an expression matching one or many repository ids to mirror, e.g., central or *,!repo1. * (since Maven 2.0.5), external:* (since Maven 2.0.9) and external:http:* (since Maven 3.8.0) have a special meaning: see Mirror Settings guide.
      Parameters:
      mirrorOf - a mirrorOf object.
    • setMirrorOfLayouts

      public void setMirrorOfLayouts(String mirrorOfLayouts)
      Set the layouts of repositories being mirrored. This value can be used to restrict the usage of the mirror to repositories with a matching layout (apart from a matching id).
      Since: Maven 3.
      Parameters:
      mirrorOfLayouts - a mirrorOfLayouts object.
    • setName

      public void setName(String name)
      Set the optional name that describes the mirror.
      Parameters:
      name - a name object.
    • setUrl

      public void setUrl(String url)
      Set the URL of the mirror repository.
      Parameters:
      url - a url object.
    • toString

      public String toString()
      Overrides:
      toString in class Object