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
@Experimental
@Generated
@ThreadSafe
@Immutable
public class Mirror
extends IdentifiableBase
implements Serializable
A download mirror for a given repository.
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Builder class used to create Mirror instances. -
Field Summary
Fields inherited from class org.apache.maven.api.settings.TrackableBase
GLOBAL_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.boolean
Whether this mirror should be blocked from any download request but fail the download process, explaining why.static Mirror.Builder
Creates a newMirror
builder instance.static Mirror.Builder
newBuilder
(boolean withDefaults) Creates a newMirror
builder instance using default values or not.static Mirror.Builder
newBuilder
(Mirror from) Creates a newMirror
builder instance using the specified object as a basis.static Mirror.Builder
newBuilder
(Mirror from, boolean forceCopy) Creates a newMirror
builder instance using the specified object as a basis.static Mirror
Creates a newMirror
instance.static Mirror
newInstance
(boolean withDefaults) Creates a newMirror
instance using default values or not.toString()
with()
Creates a new builder with this object as the basis.withBlocked
(boolean blocked) Creates a newMirror
instance using the specified blocked.Creates a newMirror
instance using the specified id.withLayout
(String layout) Creates a newMirror
instance using the specified layout.withMirrorOf
(String mirrorOf) Creates a newMirror
instance using the specified mirrorOf.withMirrorOfLayouts
(String mirrorOfLayouts) Creates a newMirror
instance using the specified mirrorOfLayouts.Creates a newMirror
instance using the specified name.Creates a newMirror
instance using the specified url.Methods inherited from class org.apache.maven.api.settings.IdentifiableBase
getId, newBuilder, newBuilder
Methods inherited from class org.apache.maven.api.settings.TrackableBase
getSourceLevel, newBuilder, newBuilder, setSourceLevel
-
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:
with
in classIdentifiableBase
- Returns:
- a
Builder
-
withId
Creates a newMirror
instance using the specified id.- Overrides:
withId
in classIdentifiableBase
- Parameters:
id
- the newString
to use- Returns:
- a
Mirror
with the specified id
-
withMirrorOf
Creates a newMirror
instance using the specified mirrorOf.- Parameters:
mirrorOf
- the newString
to use- Returns:
- a
Mirror
with the specified mirrorOf
-
withName
Creates a newMirror
instance using the specified name.- Parameters:
name
- the newString
to use- Returns:
- a
Mirror
with the specified name
-
withUrl
Creates a newMirror
instance using the specified url.- Parameters:
url
- the newString
to use- Returns:
- a
Mirror
with the specified url
-
withLayout
Creates a newMirror
instance using the specified layout.- Parameters:
layout
- the newString
to use- Returns:
- a
Mirror
with the specified layout
-
withMirrorOfLayouts
Creates a newMirror
instance using the specified mirrorOfLayouts.- Parameters:
mirrorOfLayouts
- the newString
to use- Returns:
- a
Mirror
with the specified mirrorOfLayouts
-
withBlocked
Creates a newMirror
instance using the specified blocked.- Parameters:
blocked
- the newboolean
to use- Returns:
- a
Mirror
with the specified blocked
-
newInstance
Creates a newMirror
instance. Equivalent tonewInstance( true )
.- Returns:
- a new
Mirror
- See Also:
-
newInstance
Creates a newMirror
instance 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 newMirror
builder instance. Equivalent tonewBuilder( true )
.- Returns:
- a new
Builder
- See Also:
-
newBuilder
Creates a newMirror
builder instance using default values or not.- Parameters:
withDefaults
- the boolean indicating whether default values should be used- Returns:
- a new
Builder
-
newBuilder
Creates a newMirror
builder instance using the specified object as a basis. Equivalent tonewBuilder( from, false )
.- Parameters:
from
- theMirror
instance to use as a basis- Returns:
- a new
Builder
-
newBuilder
Creates a newMirror
builder instance using the specified object as a basis.- Parameters:
from
- theMirror
instance to use as a basisforceCopy
- the boolean indicating if a copy should be forced- Returns:
- a new
Builder
-
toString
-