Package org.apache.maven.settings
Class Server
java.lang.Object
org.apache.maven.settings.TrackableBase
org.apache.maven.settings.IdentifiableBase
org.apache.maven.settings.Server
- All Implemented Interfaces:
Serializable,Cloneable
The
<server> element contains
informations required to a server settings.- Version:
- $Revision$ $Date$
- See Also:
-
Field Summary
Fields inherited from class org.apache.maven.settings.TrackableBase
GLOBAL_LEVEL, USER_LEVEL -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidMethod addAlias.voidaddRepositoryOrigin(String string) Method addRepositoryOrigin.clone()Method clone.Method getAliases.Get extra configuration for the transport layer.Get the permissions for directories when they are created.Get the permissions for files when they are created.Get the passphrase used in conjunction with the privateKey to authenticate.Get the password used in conjunction with the username to authenticate.Get the private key location used to authenticate.Method getRepositoryOrigins.Get the username used to authenticate.voidremoveAlias(String string) Method removeAlias.voidremoveRepositoryOrigin(String string) Method removeRepositoryOrigin.voidsetAliases(List<String> aliases) Set list of additional server aliases.voidsetConfiguration(Object configuration) Set extra configuration for the transport layer.voidsetDirectoryPermissions(String directoryPermissions) Set the permissions for directories when they are created.voidsetFilePermissions(String filePermissions) Set the permissions for files when they are created.voidsetPassphrase(String passphrase) Set the passphrase used in conjunction with the privateKey to authenticate.voidsetPassword(String password) Set the password used in conjunction with the username to authenticate.voidsetPrivateKey(String privateKey) Set the private key location used to authenticate.voidsetRepositoryOrigins(List<String> repositoryOrigins) Set list of repository origins these credentials may be used with, each written asscheme://hostorscheme://host:port, for examplehttps://repo.example.orgorhttps://mirror.example.org:8443- an origin, not a full repository URL.voidsetUsername(String username) Set the username used to authenticate.Methods inherited from class org.apache.maven.settings.IdentifiableBase
getId, setIdMethods inherited from class org.apache.maven.settings.TrackableBase
getSourceLevel, setSourceLevel
-
Constructor Details
-
Server
public Server()
-
-
Method Details
-
addAlias
Method addAlias.- Parameters:
string- a string object.
-
addRepositoryOrigin
Method addRepositoryOrigin.- Parameters:
string- a string object.
-
clone
Method clone.- Overrides:
clonein classIdentifiableBase- Returns:
- Server
-
getAliases
Method getAliases.- Returns:
- List
-
getConfiguration
Get extra configuration for the transport layer.- Returns:
- Object
-
getDirectoryPermissions
Get the permissions for directories when they are created.- Returns:
- String
-
getFilePermissions
Get the permissions for files when they are created.- Returns:
- String
-
getPassphrase
Get the passphrase used in conjunction with the privateKey to authenticate.- Returns:
- String
-
getPassword
Get the password used in conjunction with the username to authenticate.- Returns:
- String
-
getPrivateKey
Get the private key location used to authenticate.- Returns:
- String
-
getRepositoryOrigins
Method getRepositoryOrigins.- Returns:
- List
-
getUsername
Get the username used to authenticate.- Returns:
- String
-
removeAlias
Method removeAlias.- Parameters:
string- a string object.
-
removeRepositoryOrigin
Method removeRepositoryOrigin.- Parameters:
string- a string object.
-
setAliases
Set list of additional server aliases. For each alias, an additional server entry will be generated with the same configuration as the original one, but with the ID replaced by the alias and with an empty aliases list. This is useful when the same credentials should be used for multiple servers.- Parameters:
aliases- a aliases object.
-
setConfiguration
Set extra configuration for the transport layer.- Parameters:
configuration- a configuration object.
-
setDirectoryPermissions
Set the permissions for directories when they are created.- Parameters:
directoryPermissions- a directoryPermissions object.
-
setFilePermissions
Set the permissions for files when they are created.- Parameters:
filePermissions- a filePermissions object.
-
setPassphrase
Set the passphrase used in conjunction with the privateKey to authenticate.- Parameters:
passphrase- a passphrase object.
-
setPassword
Set the password used in conjunction with the username to authenticate.- Parameters:
password- a password object.
-
setPrivateKey
Set the private key location used to authenticate.- Parameters:
privateKey- a privateKey object.
-
setRepositoryOrigins
Set list of repository origins these credentials may be used with, each written asscheme://hostorscheme://host:port, for examplehttps://repo.example.orgorhttps://mirror.example.org:8443- an origin, not a full repository URL. Maven binds the credentials of a server to the origins of the repositories and mirrors declared with the same id, see themaven.repository.credentialScopeuser property. The origins listed here are added to those; nothing is replaced. Declaring them is needed when the repository using these credentials is not known when the session is created, for example a repository declared in asettings.xmlprofile that is not listed in<activeProfiles>but activated through<activation>or-P. Comparison is case insensitive and the default ports 80 (http) and 443 (https) are equivalent to no port.- Parameters:
repositoryOrigins- a repositoryOrigins object.
-
setUsername
Set the username used to authenticate.- Parameters:
username- a username object.
-