Package org.apache.maven.api.model
Class Repository
java.lang.Object
org.apache.maven.api.model.RepositoryBase
org.apache.maven.api.model.Repository
- All Implemented Interfaces:
Serializable
,InputLocationTracker
- Direct Known Subclasses:
DeploymentRepository
@Experimental
@Generated
@ThreadSafe
@Immutable
public class Repository
extends RepositoryBase
implements Serializable, InputLocationTracker
A 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. -
Constructor Summary
ModifierConstructorDescriptionprotected
Repository
(Repository.Builder builder) Constructor for this class, to be called from its subclasses andRepository.Builder
. -
Method Summary
Modifier and TypeMethodDescriptionboolean
getLocation
(Object key) Gets the location of the specified field in the input source.Gets the keys of the locations of the input source.How to handle downloading of releases from this repository.How to handle downloading of snapshots from this repository.int
hashCode()
static 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.model.RepositoryBase
getId, getImportedFrom, getLayout, getName, getUrl, newBuilder, newBuilder
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.maven.api.model.InputLocationTracker
getImportedFrom
-
Constructor Details
-
Repository
Constructor for this class, to be called from its subclasses andRepository.Builder
.- See Also:
-
-
Method Details
-
equals
- Overrides:
equals
in classRepositoryBase
-
hashCode
public int hashCode()- Overrides:
hashCode
in classRepositoryBase
-
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
-
getLocation
Gets the location of the specified field in the input source.- Specified by:
getLocation
in interfaceInputLocationTracker
- Overrides:
getLocation
in classRepositoryBase
-
getLocationKeys
Gets the keys of the locations of the input source.- Overrides:
getLocationKeys
in classRepositoryBase
-
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
-