Package org.apache.maven.api.settings
Class Repository
java.lang.Object
org.apache.maven.api.settings.RepositoryBase
org.apache.maven.api.settings.Repository
- All Implemented Interfaces:
Serializable
@Experimental
@Generated
@ThreadSafe
@Immutable
public class Repository
extends RepositoryBase
implements Serializable
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. -
Method Summary
Modifier and TypeMethodDescriptionboolean
How 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
getId, getLayout, getName, getUrl, newBuilder, newBuilder
-
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
-
equals
- Overrides:
equals
in classRepositoryBase
- See Also:
-