Package org.apache.maven.api.settings
Class Mirror
java.lang.Object
org.apache.maven.api.settings.TrackableBase
org.apache.maven.api.settings.IdentifiableBase
org.apache.maven.api.settings.Mirror
- All Implemented Interfaces:
- Serializable,- InputLocationTracker
@Experimental
@Generated
@ThreadSafe
@Immutable
public class Mirror
extends IdentifiableBase
implements Serializable, InputLocationTracker
A download mirror for a given repository.
- See Also:
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classBuilder class used to create Mirror instances.
- 
Method SummaryModifier and TypeMethodDescriptionThe layout of the mirror repository.A repository id or (since Maven 2.0.9) an expression matching one or many repository ids to mirror, e.g.,centralor*,!repo1.The layouts of repositories being mirrored.getName()The optional name that describes the mirror.getUrl()The URL of the mirror repository.booleanWhether this mirror should be blocked from any download request but fail the download process, explaining why.static Mirror.BuilderCreates a newMirrorbuilder instance.static Mirror.BuildernewBuilder(boolean withDefaults) Creates a newMirrorbuilder instance using default values or not.static Mirror.BuildernewBuilder(Mirror from) Creates a newMirrorbuilder instance using the specified object as a basis.static Mirror.BuildernewBuilder(Mirror from, boolean forceCopy) Creates a newMirrorbuilder instance using the specified object as a basis.static MirrorCreates a newMirrorinstance.static MirrornewInstance(boolean withDefaults) Creates a newMirrorinstance using default values or not.toString()with()Creates a new builder with this object as the basis.withBlocked(boolean blocked) Creates a newMirrorinstance using the specified blocked.Creates a newMirrorinstance using the specified id.withLayout(String layout) Creates a newMirrorinstance using the specified layout.withMirrorOf(String mirrorOf) Creates a newMirrorinstance using the specified mirrorOf.withMirrorOfLayouts(String mirrorOfLayouts) Creates a newMirrorinstance using the specified mirrorOfLayouts.Creates a newMirrorinstance using the specified name.Creates a newMirrorinstance using the specified url.Methods inherited from class org.apache.maven.api.settings.IdentifiableBasegetId, newBuilder, newBuilderMethods inherited from class org.apache.maven.api.settings.TrackableBasegetLocation, newBuilder, newBuilderMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.maven.api.settings.InputLocationTrackergetLocation
- 
Method Details- 
getMirrorOfA repository id or (since Maven 2.0.9) an expression matching one or many repository ids to mirror, e.g.,centralor*,!repo1.*(since Maven 2.0.5),external:*(since Maven 2.0.9) andexternal:http:*(since Maven 3.8.0) have a special meaning: see Mirror Settings guide.- Returns:
- a String
 
- 
getNameThe optional name that describes the mirror.- Returns:
- a String
 
- 
getUrlThe URL of the mirror repository.- Returns:
- a String
 
- 
getLayoutThe layout of the mirror repository.- Returns:
- a String
- Since:
- Maven 3.
 
- 
getMirrorOfLayoutsThe 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).- Returns:
- a String
- Since:
- Maven 3.
 
- 
isBlockedpublic boolean isBlocked()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:
- a boolean
 
- 
withCreates a new builder with this object as the basis.- Overrides:
- within class- IdentifiableBase
- Returns:
- a Builder
 
- 
withIdCreates a newMirrorinstance using the specified id.- Overrides:
- withIdin class- IdentifiableBase
- Parameters:
- id- the new- Stringto use
- Returns:
- a Mirrorwith the specified id
 
- 
withMirrorOfCreates a newMirrorinstance using the specified mirrorOf.- Parameters:
- mirrorOf- the new- Stringto use
- Returns:
- a Mirrorwith the specified mirrorOf
 
- 
withNameCreates a newMirrorinstance using the specified name.- Parameters:
- name- the new- Stringto use
- Returns:
- a Mirrorwith the specified name
 
- 
withUrlCreates a newMirrorinstance using the specified url.- Parameters:
- url- the new- Stringto use
- Returns:
- a Mirrorwith the specified url
 
- 
withLayoutCreates a newMirrorinstance using the specified layout.- Parameters:
- layout- the new- Stringto use
- Returns:
- a Mirrorwith the specified layout
 
- 
withMirrorOfLayoutsCreates a newMirrorinstance using the specified mirrorOfLayouts.- Parameters:
- mirrorOfLayouts- the new- Stringto use
- Returns:
- a Mirrorwith the specified mirrorOfLayouts
 
- 
withBlockedCreates a newMirrorinstance using the specified blocked.- Parameters:
- blocked- the new- booleanto use
- Returns:
- a Mirrorwith the specified blocked
 
- 
newInstanceCreates a newMirrorinstance. Equivalent tonewInstance(true).- Returns:
- a new Mirror
- See Also:
 
- 
newInstanceCreates a newMirrorinstance using default values or not. Equivalent tonewBuilder(withDefaults).build().- Parameters:
- withDefaults- the boolean indicating whether default values should be used
- Returns:
- a new Mirror
 
- 
newBuilderCreates a newMirrorbuilder instance. Equivalent tonewBuilder(true).- Returns:
- a new Builder
- See Also:
 
- 
newBuilderCreates a newMirrorbuilder instance using default values or not.- Parameters:
- withDefaults- the boolean indicating whether default values should be used
- Returns:
- a new Builder
 
- 
newBuilderCreates a newMirrorbuilder instance using the specified object as a basis. Equivalent tonewBuilder(from, false).- Parameters:
- from- the- Mirrorinstance to use as a basis
- Returns:
- a new Builder
 
- 
newBuilderCreates a newMirrorbuilder instance using the specified object as a basis.- Parameters:
- from- the- Mirrorinstance to use as a basis
- forceCopy- the boolean indicating if a copy should be forced
- Returns:
- a new Builder
 
- 
toString
 
-