Interface MavenConfiguration
-
- All Known Implementing Classes:
MavenConfigurationImpl
public interface MavenConfigurationHandler configuration.- Since:
- August 11, 2007
- Author:
- Alin Dreghiciu, Guillaume Nodet
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidenableProxy(URL url)BooleangetCertificateCheck()Returns true if the certificate should be checked on SSL connection, false otherwise.List<MavenRepositoryURL>getDefaultRepositories()Returns a list of default repositories to be searched before any other repositories.StringgetGlobalChecksumPolicy()Global repository update policy.StringgetGlobalUpdatePolicy()Global repository update policy.MavenRepositoryURLgetLocalRepository()Returns the url of local repository.Map<String,Map<String,String>>getMirrors()Returns the mirror settings from settings.xml.StringgetPid()Returns PID for properties used by this configuration.<T> TgetProperty(String name, T defaultValue, Class<T> clazz)Returns generic property by name.org.ops4j.util.property.PropertyResolvergetPropertyResolver()Map<String,Map<String,String>>getProxySettings(String... protocols)Returns the active proxy settings from settings.xml The fields are user, pass, host, port, nonProxyHosts, protocol.List<MavenRepositoryURL>getRepositories()Returns a list of repositories to be searched.StringgetSecuritySettings()org.apache.maven.settings.SettingsgetSettings()URLgetSettingsFileUrl()Returns the URL of maven settings file.IntegergetTimeout()Returns the read timeout configured in case the maven artifact is retrieved from a remote location.booleanisOffline()BooleanuseFallbackRepositories()Returns true if the fallback repositories should be used instead of default ones.
-
-
-
Method Detail
-
isOffline
boolean isOffline()
-
getCertificateCheck
Boolean getCertificateCheck()
Returns true if the certificate should be checked on SSL connection, false otherwise.- Returns:
- true if the certificate should be checked
-
getSettingsFileUrl
URL getSettingsFileUrl()
Returns the URL of maven settings file.- Returns:
- the url to settings file
-
getDefaultRepositories
List<MavenRepositoryURL> getDefaultRepositories() throws MalformedURLException
Returns a list of default repositories to be searched before any other repositories.- Returns:
- a list of default repositories. List can be null or empty if there are not default repositories to be searched.
- Throws:
MalformedURLException
-
getRepositories
List<MavenRepositoryURL> getRepositories() throws MalformedURLException
Returns a list of repositories to be searched.- Returns:
- a list of repositories. List can be null or empty if there are no repositories to be searched.
- Throws:
MalformedURLException
-
getGlobalUpdatePolicy
String getGlobalUpdatePolicy()
Global repository update policy. SeeServiceConstants.PROPERTY_GLOBAL_UPDATE_POLICY- Returns:
- repository update policy or null if not set
-
getGlobalChecksumPolicy
String getGlobalChecksumPolicy()
Global repository update policy. SeeServiceConstants.PROPERTY_GLOBAL_CHECKSUM_POLICY- Returns:
- repository update policy or null if not set
-
getLocalRepository
MavenRepositoryURL getLocalRepository()
Returns the url of local repository.- Returns:
- url of local repository. Can be null if there is no local repository.
-
useFallbackRepositories
Boolean useFallbackRepositories()
Returns true if the fallback repositories should be used instead of default ones. Default value is true.- Returns:
- true if the fallback repositories should be used
-
getTimeout
Integer getTimeout()
Returns the read timeout configured in case the maven artifact is retrieved from a remote location.- Returns:
- the timeout in case artifacts are retrieved from a remote location
-
enableProxy
void enableProxy(URL url)
- Parameters:
url- Enables the proxy server for a given URL.
-
getProxySettings
Map<String,Map<String,String>> getProxySettings(String... protocols)
Returns the active proxy settings from settings.xml The fields are user, pass, host, port, nonProxyHosts, protocol.- Parameters:
protocols- protocols to be recognized.- Returns:
- the active proxy settings
-
getMirrors
Map<String,Map<String,String>> getMirrors()
Returns the mirror settings from settings.xml. The fields are id, url, mirrorOf, layout, mirrorOfLayouts.- Returns:
- the mirror settings
-
getSettings
org.apache.maven.settings.Settings getSettings()
-
getSecuritySettings
String getSecuritySettings()
-
getPropertyResolver
org.ops4j.util.property.PropertyResolver getPropertyResolver()
-
getProperty
<T> T getProperty(String name, T defaultValue, Class<T> clazz)
Returns generic property by name.- Parameters:
name-defaultValue-clazz-- Returns:
-
getPid
String getPid()
Returns PID for properties used by this configuration. It's used as prefix for properties in associatedPropertyResolver- Returns:
-
-