Package org.apache.maven.api.settings
Class Repository
java.lang.Object
org.apache.maven.api.settings.TrackableBase
org.apache.maven.api.settings.IdentifiableBase
org.apache.maven.api.settings.RepositoryBase
org.apache.maven.api.settings.Repository
- All Implemented Interfaces:
Serializable
,InputLocationTracker
@Experimental
@Generated
@ThreadSafe
@Immutable
public class Repository
extends RepositoryBase
implements Serializable, InputLocationTracker
Repository contains the information needed for establishing
connections with remote repository
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Builder class used to create Repository instances. -
Field Summary
Fields inherited from class org.apache.maven.api.settings.TrackableBase
GLOBAL_LEVEL, PROJECT_LEVEL, USER_LEVEL
-
Method Summary
Modifier and TypeMethodDescriptionHow to handle downloading of releases from this repositoryHow to handle downloading of snapshots from this repositorystatic Repository.Builder
Creates a newRepository
builder instance.static Repository.Builder
newBuilder
(boolean withDefaults) Creates a newRepository
builder instance using default values or not.static Repository.Builder
newBuilder
(Repository from) Creates a newRepository
builder instance using the specified object as a basis.static Repository.Builder
newBuilder
(Repository from, boolean forceCopy) Creates a newRepository
builder instance using the specified object as a basis.static Repository
Creates a newRepository
instance.static Repository
newInstance
(boolean withDefaults) Creates a newRepository
instance using default values or not.with()
Creates a new builder with this object as the basis.Creates a newRepository
instance using the specified id.withLayout
(String layout) Creates a newRepository
instance using the specified layout.Creates a newRepository
instance using the specified name.withReleases
(RepositoryPolicy releases) Creates a newRepository
instance using the specified releases.withSnapshots
(RepositoryPolicy snapshots) Creates a newRepository
instance using the specified snapshots.Creates a newRepository
instance using the specified url.Methods inherited from class org.apache.maven.api.settings.RepositoryBase
getLayout, getName, getUrl, newBuilder, newBuilder
Methods inherited from class org.apache.maven.api.settings.IdentifiableBase
getId, newBuilder, newBuilder
Methods inherited from class org.apache.maven.api.settings.TrackableBase
getLocation, getSourceLevel, newBuilder, newBuilder, setSourceLevel
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.maven.api.settings.InputLocationTracker
getLocation
-
Method Details
-
getReleases
How to handle downloading of releases from this repository- Returns:
- a
RepositoryPolicy
-
getSnapshots
How to handle downloading of snapshots from this repository- Returns:
- a
RepositoryPolicy
-
with
Creates a new builder with this object as the basis.- Overrides:
with
in classRepositoryBase
- Returns:
- a
Builder
-
withId
Creates a newRepository
instance using the specified id.- Overrides:
withId
in classRepositoryBase
- Parameters:
id
- the newString
to use- Returns:
- a
Repository
with the specified id
-
withName
Creates a newRepository
instance using the specified name.- Overrides:
withName
in classRepositoryBase
- Parameters:
name
- the newString
to use- Returns:
- a
Repository
with the specified name
-
withUrl
Creates a newRepository
instance using the specified url.- Overrides:
withUrl
in classRepositoryBase
- Parameters:
url
- the newString
to use- Returns:
- a
Repository
with the specified url
-
withLayout
Creates a newRepository
instance using the specified layout.- Overrides:
withLayout
in classRepositoryBase
- Parameters:
layout
- the newString
to use- Returns:
- a
Repository
with the specified layout
-
withReleases
Creates a newRepository
instance using the specified releases.- Parameters:
releases
- the newRepositoryPolicy
to use- Returns:
- a
Repository
with the specified releases
-
withSnapshots
Creates a newRepository
instance using the specified snapshots.- Parameters:
snapshots
- the newRepositoryPolicy
to use- Returns:
- a
Repository
with the specified snapshots
-
newInstance
Creates a newRepository
instance. Equivalent tonewInstance(true)
.- Returns:
- a new
Repository
- See Also:
-
newInstance
Creates a newRepository
instance using default values or not. Equivalent tonewBuilder(withDefaults).build()
.- Parameters:
withDefaults
- the boolean indicating whether default values should be used- Returns:
- a new
Repository
-
newBuilder
Creates a newRepository
builder instance. Equivalent tonewBuilder(true)
.- Returns:
- a new
Builder
- See Also:
-
newBuilder
Creates a newRepository
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 newRepository
builder instance using the specified object as a basis. Equivalent tonewBuilder(from, false)
.- Parameters:
from
- theRepository
instance to use as a basis- Returns:
- a new
Builder
-
newBuilder
Creates a newRepository
builder instance using the specified object as a basis.- Parameters:
from
- theRepository
instance to use as a basisforceCopy
- the boolean indicating if a copy should be forced- Returns:
- a new
Builder
-