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 Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder class used to create Mirror instances. -
Field Summary
Fields inherited from class org.apache.maven.api.settings.TrackableBase
GLOBAL_LEVEL, PROJECT_LEVEL, USER_LEVEL -
Method Summary
Modifier and TypeMethodDescriptionThe layout of the mirror repository.The server ID of the repository being mirrored, e.g., "central".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.IdentifiableBase
getId, newBuilder, newBuilderMethods inherited from class org.apache.maven.api.settings.TrackableBase
getLocation, getSourceLevel, newBuilder, newBuilder, setSourceLevelMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.maven.api.settings.InputLocationTracker
getLocation
-
Method Details
-
getMirrorOf
The server ID of the repository being mirrored, e.g., "central". This MUST NOT match the mirror id.- Returns:
- a
String
-
getName
The optional name that describes the mirror.- Returns:
- a
String
-
getUrl
The URL of the mirror repository.- Returns:
- a
String
-
getLayout
The layout of the mirror repository. Since Maven 3.- Returns:
- a
String
-
getMirrorOfLayouts
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:
- a
String
-
isBlocked
public boolean isBlocked()Whether this mirror should be blocked from any download request but fail the download process, explaining why.- Returns:
- a
boolean
-
with
Creates a new builder with this object as the basis.- Overrides:
within classIdentifiableBase- Returns:
- a
Builder
-
withId
Creates a newMirrorinstance using the specified id.- Overrides:
withIdin classIdentifiableBase- Parameters:
id- the newStringto use- Returns:
- a
Mirrorwith the specified id
-
withMirrorOf
Creates a newMirrorinstance using the specified mirrorOf.- Parameters:
mirrorOf- the newStringto use- Returns:
- a
Mirrorwith the specified mirrorOf
-
withName
Creates a newMirrorinstance using the specified name.- Parameters:
name- the newStringto use- Returns:
- a
Mirrorwith the specified name
-
withUrl
Creates a newMirrorinstance using the specified url.- Parameters:
url- the newStringto use- Returns:
- a
Mirrorwith the specified url
-
withLayout
Creates a newMirrorinstance using the specified layout.- Parameters:
layout- the newStringto use- Returns:
- a
Mirrorwith the specified layout
-
withMirrorOfLayouts
Creates a newMirrorinstance using the specified mirrorOfLayouts.- Parameters:
mirrorOfLayouts- the newStringto use- Returns:
- a
Mirrorwith the specified mirrorOfLayouts
-
withBlocked
Creates a newMirrorinstance using the specified blocked.- Parameters:
blocked- the newbooleanto use- Returns:
- a
Mirrorwith the specified blocked
-
newInstance
Creates a newMirrorinstance. Equivalent tonewInstance(true).- Returns:
- a new
Mirror - See Also:
-
newInstance
Creates 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
-
newBuilder
Creates a newMirrorbuilder instance. Equivalent tonewBuilder(true).- Returns:
- a new
Builder - See Also:
-
newBuilder
Creates a newMirrorbuilder instance using default values or not.- Parameters:
withDefaults- the boolean indicating whether default values should be used- Returns:
- a new
Builder
-
newBuilder
Creates a newMirrorbuilder instance using the specified object as a basis. Equivalent tonewBuilder(from, false).- Parameters:
from- theMirrorinstance to use as a basis- Returns:
- a new
Builder
-
newBuilder
Creates a newMirrorbuilder instance using the specified object as a basis.- Parameters:
from- theMirrorinstance to use as a basisforceCopy- the boolean indicating if a copy should be forced- Returns:
- a new
Builder
-
toString
-