Interface SettingsSupplierFactory
- Since:
- 1.0
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionaddToMavenConfig(MavenConfiguration.MavenConfigurationBuilder mavenConfigurationBuilder) This supplier will try to resolve the maven global settings file based on environment variables.This supplier will try to resolve the maven settings-security file based on the environment variables.This supplier will try to resolve the maven user settings file based on the environment variables.
-
Field Details
-
USER_SETTINGS_SYSTEM_PROPERTY
-
GLOBAL_SETTINGS_SYSTEM_PROPERTY
-
-
Method Details
-
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
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
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
MavenConfiguration.MavenConfigurationBuilder addToMavenConfig(MavenConfiguration.MavenConfigurationBuilder mavenConfigurationBuilder) - Parameters:
mavenConfigurationBuilder- the builder to add the config obtained from this object to.- Returns:
- the updated
mavenConfigurationBuilder
-