Package org.apache.maven.toolchain
Class DefaultToolchainManager
java.lang.Object
org.apache.maven.toolchain.DefaultToolchainManager
- All Implemented Interfaces:
ToolchainManager
- Direct Known Subclasses:
DefaultToolchainManagerPrivate
@Component(role=ToolchainManager.class)
public class DefaultToolchainManager
extends Object
implements ToolchainManager
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) Map<String,
ToolchainFactory> (package private) org.codehaus.plexus.logging.Logger
Fields inherited from interface org.apache.maven.toolchain.ToolchainManager
ROLE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic final String
getStorageKey
(String type) getToolchainFromBuildContext
(String type, MavenSession session) Retrieve toolchain of specified type from build context.getToolchains
(MavenSession session, String type, Map<String, String> requirements) Select all toolchains available in user settings matching the type and requirements, independently frommaven-toolchains-plugin
.retrieveContext
(MavenSession session) selectToolchains
(List<ToolchainModel> models, String type, Map<String, String> requirements)
-
Field Details
-
logger
@Requirement org.codehaus.plexus.logging.Logger logger -
factories
-
-
Constructor Details
-
DefaultToolchainManager
public DefaultToolchainManager()
-
-
Method Details
-
getToolchainFromBuildContext
Description copied from interface:ToolchainManager
Retrieve toolchain of specified type from build context. It is expected thatmaven-toolchains-plugin
contains the configuration to select the appropriate toolchain and is executed at the beginning of the build.- Specified by:
getToolchainFromBuildContext
in interfaceToolchainManager
- Parameters:
type
- the type, must not benull
session
- the Maven session, must not benull
- Returns:
- the toolchain selected by
maven-toolchains-plugin
-
getToolchains
public List<Toolchain> getToolchains(MavenSession session, String type, Map<String, String> requirements) Description copied from interface:ToolchainManager
Select all toolchains available in user settings matching the type and requirements, independently frommaven-toolchains-plugin
.- Specified by:
getToolchains
in interfaceToolchainManager
- Parameters:
session
- the Maven session, must not benull
type
- the type, must not benull
requirements
- the requirements, may benull
- Returns:
- the matching toolchains, never
null
-
selectToolchains
-
retrieveContext
-
getStorageKey
-