Package org.apache.maven.api.model
Class RepositoryBase
java.lang.Object
org.apache.maven.api.model.RepositoryBase
- All Implemented Interfaces:
- Serializable,- InputLocationTracker
- Direct Known Subclasses:
- Repository
@Experimental
@Generated
@ThreadSafe
@Immutable
public class RepositoryBase
extends Object
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 RepositoryBase instances.
- 
Method SummaryModifier and TypeMethodDescriptionbooleangetId()A unique identifier for a repository.The type of layout this repository uses for locating and storing artifacts - can belegacyordefault.getLocation(Object key) Gets the location of the specified field in the input source.getName()Human readable name of the repository.getUrl()The url of the repository, in the formprotocol://hostname/path.inthashCode()static RepositoryBase.BuilderCreates a newRepositoryBasebuilder instance.static RepositoryBase.BuildernewBuilder(boolean withDefaults) Creates a newRepositoryBasebuilder instance using default values or not.static RepositoryBase.BuildernewBuilder(RepositoryBase from) Creates a newRepositoryBasebuilder instance using the specified object as a basis.static RepositoryBase.BuildernewBuilder(RepositoryBase from, boolean forceCopy) Creates a newRepositoryBasebuilder instance using the specified object as a basis.static RepositoryBaseCreates a newRepositoryBaseinstance.static RepositoryBasenewInstance(boolean withDefaults) Creates a newRepositoryBaseinstance using default values or not.with()Creates a new builder with this object as the basis.Creates a newRepositoryBaseinstance using the specified id.withLayout(String layout) Creates a newRepositoryBaseinstance using the specified layout.Creates a newRepositoryBaseinstance using the specified name.Creates a newRepositoryBaseinstance using the specified url.
- 
Method Details- 
equals
- 
hashCodepublic int hashCode()
- 
getIdA unique identifier for a repository. This is used to match the repository to configuration in thesettings.xmlfile, for example. Furthermore, the identifier is used during POM inheritance and profile injection to detect repositories that should be merged.- Returns:
- a String
 
- 
getNameHuman readable name of the repository.- Returns:
- a String
 
- 
getUrlThe url of the repository, in the formprotocol://hostname/path.- Returns:
- a String
 
- 
getLayoutThe type of layout this repository uses for locating and storing artifacts - can belegacyordefault.- Returns:
- a String
 
- 
getLocationGets the location of the specified field in the input source.- Specified by:
- getLocationin interface- InputLocationTracker
 
- 
withCreates a new builder with this object as the basis.- Returns:
- a Builder
 
- 
withIdCreates a newRepositoryBaseinstance using the specified id.- Parameters:
- id- the new- Stringto use
- Returns:
- a RepositoryBasewith the specified id
 
- 
withNameCreates a newRepositoryBaseinstance using the specified name.- Parameters:
- name- the new- Stringto use
- Returns:
- a RepositoryBasewith the specified name
 
- 
withUrlCreates a newRepositoryBaseinstance using the specified url.- Parameters:
- url- the new- Stringto use
- Returns:
- a RepositoryBasewith the specified url
 
- 
withLayoutCreates a newRepositoryBaseinstance using the specified layout.- Parameters:
- layout- the new- Stringto use
- Returns:
- a RepositoryBasewith the specified layout
 
- 
newInstanceCreates a newRepositoryBaseinstance. Equivalent tonewInstance(true).- Returns:
- a new RepositoryBase
- See Also:
 
- 
newInstanceCreates a newRepositoryBaseinstance using default values or not. Equivalent tonewBuilder(withDefaults).build().- Parameters:
- withDefaults- the boolean indicating whether default values should be used
- Returns:
- a new RepositoryBase
 
- 
newBuilderCreates a newRepositoryBasebuilder instance. Equivalent tonewBuilder(true).- Returns:
- a new Builder
- See Also:
 
- 
newBuilderCreates a newRepositoryBasebuilder instance using default values or not.- Parameters:
- withDefaults- the boolean indicating whether default values should be used
- Returns:
- a new Builder
 
- 
newBuilderCreates a newRepositoryBasebuilder instance using the specified object as a basis. Equivalent tonewBuilder(from, false).- Parameters:
- from- the- RepositoryBaseinstance to use as a basis
- Returns:
- a new Builder
 
- 
newBuilderCreates a newRepositoryBasebuilder instance using the specified object as a basis.- Parameters:
- from- the- RepositoryBaseinstance to use as a basis
- forceCopy- the boolean indicating if a copy should be forced
- Returns:
- a new Builder
 
 
-