Interface SettingsSupplierFactory


public interface SettingsSupplierFactory
Provides a set of suppliers to be used to resolve maven settings.
Since:
1.0
  • Field Details

    • USER_SETTINGS_SYSTEM_PROPERTY

      static final String USER_SETTINGS_SYSTEM_PROPERTY
    • GLOBAL_SETTINGS_SYSTEM_PROPERTY

      static final String GLOBAL_SETTINGS_SYSTEM_PROPERTY
  • Method Details

    • environmentGlobalSettingsSupplier

      Optional<File> environmentGlobalSettingsSupplier()
      This supplier will try to resolve the maven global settings file based on environment variables.

      It will try to get the global settings file from MAVEN_CMD_LINE_ARGS environment variable by parsing command line arguments, if not set, then it will try with a environment or system property GLOBAL_SETTINGS_SYSTEM_PROPERTY, if not set, finally it will try to find it from $M2_HOME/conf/settings.xml or $MAVEN_HOME/conf/settings.xml (both environment variables or using system property $maven.home/conf/settings.xml).

      Returns:
      an optional that resolves the maven global settings file based on environment configuration. Or empty optional if couldn't be found.
    • environmentUserSettingsSupplier

      Optional<File> environmentUserSettingsSupplier()
      This supplier will try to resolve the maven user settings file based on the environment variables.

      It will try to get the global settings file from MAVEN_CMD_LINE_ARGS environment variable by parsing command line arguments, if not set, then it will try with a environment or system property USER_SETTINGS_SYSTEM_PROPERTY, if not set, finally it will try to get the user settings file from the $USER_HOME/.m2/settings.xml.

      Returns:
      an optional that resolves the user settings file based on environment configuration. Or empty optional if couldn't be found.
    • environmentSettingsSecuritySupplier

      Optional<File> environmentSettingsSecuritySupplier()
      This supplier will try to resolve the maven settings-security file based on the environment variables.

      It will try to get the settings-security file from system property settings.security, if not found by convention try to look for the file in ~/.m2/settings-security.xml.

      Returns:
      an optional that resolves the settings security file based on environment configuration. Or empty optional if couldn't be found.
    • addToMavenConfig

      Parameters:
      mavenConfigurationBuilder - the builder to add the config obtained from this object to.
      Returns:
      the updated mavenConfigurationBuilder