public class MavenConfigurationImpl extends org.ops4j.util.property.PropertyStore implements MavenConfiguration
MavenConfiguration| Constructor and Description |
|---|
MavenConfigurationImpl(org.ops4j.util.property.PropertyResolver propertyResolver,
String pid)
Creates a new service configuration.
|
| Modifier and Type | Method and Description |
|---|---|
void |
enableProxy(URL url)
Deprecated.
This method has side-effects and is only used in the "old" resolver.
|
Boolean |
getCertificateCheck()
Returns true if the certificate should be checked on SSL connection, false otherwise.
|
MavenRepositoryURL |
getDefaultLocalRepository() |
List<MavenRepositoryURL> |
getDefaultRepositories()
Repository is a comma separated list of repositories to be used.
|
String |
getGlobalChecksumPolicy()
Global repository update policy.
|
String |
getGlobalUpdatePolicy()
Global repository update policy.
|
MavenRepositoryURL |
getLocalRepository()
Resolves local repository directory by using the following resolution:
1. looks for a configuration property named localRepository; 2. looks for a framework property/system setting localRepository; 3. looks in settings.xml (see settings.xml resolution); 4. falls back to ${user.home}/.m2/repository. |
Map<String,Map<String,String>> |
getMirrors()
Returns the mirror settings from settings.xml.
|
org.ops4j.util.property.PropertyResolver |
getPropertyResolver() |
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()
Repository is a comma separated list of repositories to be used.
|
String |
getSecuritySettings() |
org.apache.maven.settings.Settings |
getSettings() |
URL |
getSettingsFileUrl()
Returns the URL of settings file.
|
Integer |
getTimeout()
Returns the timeout configured in case the maven artifact is retrieved from a
remote location.
|
boolean |
isOffline() |
boolean |
isValid() |
void |
setSettings(org.apache.maven.settings.Settings settings) |
Boolean |
useFallbackRepositories()
Returns true if the fallback repositories should be used instead of default ones.
|
public MavenConfigurationImpl(org.ops4j.util.property.PropertyResolver propertyResolver,
String pid)
propertyResolver - propertyResolver used to resolve properties; mandatorypid - configuration PID; mandatorypublic org.ops4j.util.property.PropertyResolver getPropertyResolver()
getPropertyResolver in interface MavenConfigurationpublic boolean isValid()
public boolean isOffline()
isOffline in interface MavenConfigurationMavenConfiguration.isOffline()public Boolean getCertificateCheck()
MavenConfigurationgetCertificateCheck in interface MavenConfigurationMavenConfiguration.getCertificateCheck()public URL getSettingsFileUrl()
getSettingsFileUrl in interface MavenConfigurationMavenConfiguration.getSettingsFileUrl()public List<MavenRepositoryURL> getDefaultRepositories() throws MalformedURLException
getDefaultRepositories in interface MavenConfigurationMalformedURLExceptionMavenConfiguration.getRepositories(),
MavenConfiguration.getLocalRepository()public List<MavenRepositoryURL> getRepositories() throws MalformedURLException
getRepositories in interface MavenConfigurationMalformedURLExceptionMavenConfiguration.getRepositories(),
MavenConfiguration.getLocalRepository()public String getGlobalUpdatePolicy()
MavenConfigurationServiceConstants.PROPERTY_GLOBAL_UPDATE_POLICYgetGlobalUpdatePolicy in interface MavenConfigurationpublic String getGlobalChecksumPolicy()
MavenConfigurationServiceConstants.PROPERTY_GLOBAL_CHECKSUM_POLICYgetGlobalChecksumPolicy in interface MavenConfigurationpublic MavenRepositoryURL getLocalRepository()
getLocalRepository in interface MavenConfigurationMavenConfiguration.getLocalRepository()public MavenRepositoryURL getDefaultLocalRepository()
public Integer getTimeout()
MavenConfigurationgetTimeout in interface MavenConfigurationpublic Boolean useFallbackRepositories()
useFallbackRepositories in interface MavenConfigurationpublic void enableProxy(URL url)
enableProxy in interface MavenConfigurationurl - Enables the proxy server for a given URL.public Map<String,Map<String,String>> getProxySettings(String... protocols)
MavenConfigurationgetProxySettings in interface MavenConfigurationprotocols - protocols to be recognized.public Map<String,Map<String,String>> getMirrors()
MavenConfigurationgetMirrors in interface MavenConfigurationpublic org.apache.maven.settings.Settings getSettings()
getSettings in interface MavenConfigurationpublic void setSettings(org.apache.maven.settings.Settings settings)
public String getSecuritySettings()
getSecuritySettings in interface MavenConfigurationCopyright © 2006-2014 OPS4J - Open Participation Software for Java. All Rights Reserved.