Interface MavenConfiguration

  • All Known Implementing Classes:
    MavenConfigurationImpl

    public interface MavenConfiguration
    Handler configuration.
    Since:
    August 11, 2007
    Author:
    Alin Dreghiciu, Guillaume Nodet
    • 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
      • 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 associated PropertyResolver
        Returns: