Package org.apache.maven.toolchain
Interface ToolchainManager
-
- All Known Implementing Classes:
DefaultToolchainManager
,DefaultToolchainManagerPrivate
public interface ToolchainManager
Public API for a toolchain-aware plugin to get expected toolchain instance.- Since:
- 2.0.9
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ROLE
Deprecated.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Toolchain
getToolchainFromBuildContext(java.lang.String type, MavenSession context)
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
Toolchain getToolchainFromBuildContext(java.lang.String type, MavenSession context)
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.- Parameters:
type
- the type, must not benull
context
- the Maven session, must not benull
- Returns:
- the toolchain selected by
maven-toolchains-plugin
-
getToolchains
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
.- 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
- Since:
- 3.3.0
-
-