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 SummaryNested ClassesModifier and TypeClassDescriptionstatic classBuilder class used to create Repository instances.
- 
Method SummaryModifier and TypeMethodDescriptionbooleangetLocation(Object key) Gets the location of the specified field in the input source.How 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.RepositoryBasegetId, getLayout, getName, getUrl, newBuilder, newBuilder
- 
Method Details- 
equals- Overrides:
- equalsin class- RepositoryBase
 
- 
hashCodepublic int hashCode()- Overrides:
- hashCodein class- RepositoryBase
 
- 
getReleasesHow to handle downloading of releases from this repository.- Returns:
- a RepositoryPolicy
 
- 
getSnapshotsHow to handle downloading of snapshots from this repository.- Returns:
- a RepositoryPolicy
 
- 
getLocationGets the location of the specified field in the input source.- Specified by:
- getLocationin interface- InputLocationTracker
- Overrides:
- getLocationin class- RepositoryBase
 
- 
withCreates a new builder with this object as the basis.- Overrides:
- within class- RepositoryBase
- Returns:
- a Builder
 
- 
withIdCreates a newRepositoryinstance using the specified id.- Overrides:
- withIdin class- RepositoryBase
- Parameters:
- id- the new- Stringto use
- Returns:
- a Repositorywith the specified id
 
- 
withNameCreates a newRepositoryinstance using the specified name.- Overrides:
- withNamein class- RepositoryBase
- Parameters:
- name- the new- Stringto use
- Returns:
- a Repositorywith the specified name
 
- 
withUrlCreates a newRepositoryinstance using the specified url.- Overrides:
- withUrlin class- RepositoryBase
- Parameters:
- url- the new- Stringto use
- Returns:
- a Repositorywith the specified url
 
- 
withLayoutCreates a newRepositoryinstance using the specified layout.- Overrides:
- withLayoutin class- RepositoryBase
- Parameters:
- layout- the new- Stringto use
- Returns:
- a Repositorywith the specified layout
 
- 
withReleasesCreates a newRepositoryinstance using the specified releases.- Parameters:
- releases- the new- RepositoryPolicyto use
- Returns:
- a Repositorywith the specified releases
 
- 
withSnapshotsCreates a newRepositoryinstance using the specified snapshots.- Parameters:
- snapshots- the new- RepositoryPolicyto use
- Returns:
- a Repositorywith the specified snapshots
 
- 
newInstanceCreates a newRepositoryinstance. Equivalent tonewInstance( true ).- Returns:
- a new Repository
- See Also:
 
- 
newInstanceCreates 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
 
- 
newBuilderCreates a newRepositorybuilder instance. Equivalent tonewBuilder( true ).- Returns:
- a new Builder
- See Also:
 
- 
newBuilderCreates a newRepositorybuilder instance using default values or not.- Parameters:
- withDefaults- the boolean indicating whether default values should be used
- Returns:
- a new Builder
 
- 
newBuilderCreates a newRepositorybuilder instance using the specified object as a basis. Equivalent tonewBuilder( from, false ).- Parameters:
- from- the- Repositoryinstance to use as a basis
- Returns:
- a new Builder
 
- 
newBuilderCreates a newRepositorybuilder instance using the specified object as a basis.- Parameters:
- from- the- Repositoryinstance to use as a basis
- forceCopy- the boolean indicating if a copy should be forced
- Returns:
- a new Builder
 
 
-