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
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder class used to create Repository instances. -
Method Summary
Modifier and TypeMethodDescriptionbooleanHow to handle downloading of releases from this repository.How to handle downloading of snapshots from this repository.inthashCode()static Repository.BuilderCreates a newRepositorybuilder instance.static Repository.BuildernewBuilder(boolean withDefaults) Creates a newRepositorybuilder instance using default values or not.static Repository.BuildernewBuilder(Repository from) Creates a newRepositorybuilder instance using the specified object as a basis.static Repository.BuildernewBuilder(Repository from, boolean forceCopy) Creates a newRepositorybuilder instance using the specified object as a basis.static RepositoryCreates a newRepositoryinstance.static RepositorynewInstance(boolean withDefaults) Creates a newRepositoryinstance using default values or not.with()Creates a new builder with this object as the basis.Creates a newRepositoryinstance using the specified id.withLayout(String layout) Creates a newRepositoryinstance using the specified layout.Creates a newRepositoryinstance using the specified name.withReleases(RepositoryPolicy releases) Creates a newRepositoryinstance using the specified releases.withSnapshots(RepositoryPolicy snapshots) Creates a newRepositoryinstance using the specified snapshots.Creates a newRepositoryinstance using the specified url.Methods inherited from class org.apache.maven.api.model.RepositoryBase
getId, getLayout, getLocation, getName, getUrl, newBuilder, newBuilderMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.maven.api.model.InputLocationTracker
getLocation
-
Method Details
-
equals
- Overrides:
equalsin classRepositoryBase
-
hashCode
public int hashCode()- Overrides:
hashCodein 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
-
with
Creates a new builder with this object as the basis.- Overrides:
within classRepositoryBase- Returns:
- a
Builder
-
withId
Creates a newRepositoryinstance using the specified id.- Overrides:
withIdin classRepositoryBase- Parameters:
id- the newStringto use- Returns:
- a
Repositorywith the specified id
-
withName
Creates a newRepositoryinstance using the specified name.- Overrides:
withNamein classRepositoryBase- Parameters:
name- the newStringto use- Returns:
- a
Repositorywith the specified name
-
withUrl
Creates a newRepositoryinstance using the specified url.- Overrides:
withUrlin classRepositoryBase- Parameters:
url- the newStringto use- Returns:
- a
Repositorywith the specified url
-
withLayout
Creates a newRepositoryinstance using the specified layout.- Overrides:
withLayoutin classRepositoryBase- Parameters:
layout- the newStringto use- Returns:
- a
Repositorywith the specified layout
-
withReleases
Creates a newRepositoryinstance using the specified releases.- Parameters:
releases- the newRepositoryPolicyto use- Returns:
- a
Repositorywith the specified releases
-
withSnapshots
Creates a newRepositoryinstance using the specified snapshots.- Parameters:
snapshots- the newRepositoryPolicyto use- Returns:
- a
Repositorywith the specified snapshots
-
newInstance
Creates a newRepositoryinstance. Equivalent tonewInstance(true).- Returns:
- a new
Repository - See Also:
-
newInstance
Creates a newRepositoryinstance 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 newRepositorybuilder instance. Equivalent tonewBuilder(true).- Returns:
- a new
Builder - See Also:
-
newBuilder
Creates a newRepositorybuilder instance using default values or not.- Parameters:
withDefaults- the boolean indicating whether default values should be used- Returns:
- a new
Builder
-
newBuilder
Creates a newRepositorybuilder instance using the specified object as a basis. Equivalent tonewBuilder(from, false).- Parameters:
from- theRepositoryinstance to use as a basis- Returns:
- a new
Builder
-
newBuilder
Creates a newRepositorybuilder instance using the specified object as a basis.- Parameters:
from- theRepositoryinstance to use as a basisforceCopy- the boolean indicating if a copy should be forced- Returns:
- a new
Builder
-