Class MavenRepositoryDefaultResolver
java.lang.Object
org.talend.sdk.component.runtime.manager.service.MavenRepositoryDefaultResolver
- All Implemented Interfaces:
MavenRepositoryResolver
m2 discovery process is used for plugins/connectors loading.
The default discovery process is at it follows:
- read
talend.component.manager.m2.repositorysystem property - check if we're running in studio and uses its m2 if system property is not set to maven.repository=global
- parse maven's
settings.xml(or if providedtalend.component.manager.m2.settings) for checking if a property localRepository is defined - checking for maven env properties (ie $M2_HOME)
- fallbacks to ${user.home}/.m2/repository
-
Field Summary
Fields inherited from interface org.talend.sdk.component.runtime.manager.service.MavenRepositoryResolver
CONF_SETTINGS, M2_HOME, M2_REPOSITORY, M2_SETTINGS, MAVEN_HOME, STUDIO_MVN_REPOSITORY, TALEND_COMPONENT_MANAGER_M2_REPOSITORY, TALEND_COMPONENT_MANAGER_M2_SETTINGS, USER_HOME, XML_COMMENTS_PATTERN, XML_EMPTY_LINES_PATTERN, XML_LOCAL_REPO_PATTERN -
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
MavenRepositoryDefaultResolver
public MavenRepositoryDefaultResolver()
-
-
Method Details
-
discover
Description copied from interface:MavenRepositoryResolverMain entry point for the discovery process. It allows to priorize how we may find the local maven repository path according the context.- Specified by:
discoverin interfaceMavenRepositoryResolver- Returns:
- local maven repository path discovered.
-
fallback
Description copied from interface:MavenRepositoryResolverMake sure that we provide a fallback if discovery fails. such likereturn PathHandler.get(USER_HOME).resolve(M2_REPOSITORY);- Specified by:
fallbackin interfaceMavenRepositoryResolver- Returns:
- a fallback path to local maven repository
-
fromSystemProperties
-
fromMavenSettings
-
fromEnvironmentVariables
-