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 java.lang.Object implements ToolchainManager
- Author:
- mkleint
-
-
Field Summary
-
Fields inherited from interface org.apache.maven.toolchain.ToolchainManager
ROLE
-
-
Constructor Summary
Constructors Constructor Description DefaultToolchainManager()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.lang.StringgetStorageKey(java.lang.String type)ToolchaingetToolchainFromBuildContext(java.lang.String type, MavenSession session)Retrieve toolchain of specified type from build context.java.util.List<Toolchain>getToolchains(MavenSession session, java.lang.String type, java.util.Map<java.lang.String,java.lang.String> requirements)Select all toolchains available in user settings matching the type and requirements, independently frommaven-toolchains-plugin.
-
-
-
Method Detail
-
getToolchainFromBuildContext
public Toolchain getToolchainFromBuildContext(java.lang.String type, MavenSession session)
Description copied from interface:ToolchainManagerRetrieve toolchain of specified type from build context. It is expected thatmaven-toolchains-plugincontains the configuration to select the appropriate toolchain and is executed at the beginning of the build.- Specified by:
getToolchainFromBuildContextin interfaceToolchainManager- Parameters:
type- the type, must not benullsession- the Maven session, must not benull- Returns:
- the toolchain selected by
maven-toolchains-plugin
-
getToolchains
public java.util.List<Toolchain> getToolchains(MavenSession session, java.lang.String type, java.util.Map<java.lang.String,java.lang.String> requirements)
Description copied from interface:ToolchainManagerSelect all toolchains available in user settings matching the type and requirements, independently frommaven-toolchains-plugin.- Specified by:
getToolchainsin interfaceToolchainManager- Parameters:
session- the Maven session, must not benulltype- the type, must not benullrequirements- the requirements, may benull- Returns:
- the matching toolchains, never
null
-
getStorageKey
public static final java.lang.String getStorageKey(java.lang.String type)
-
-