Package org.apache.maven.toolchain
Class ToolchainManagerFactory.DefaultToolchainManagerV3
java.lang.Object
org.apache.maven.toolchain.ToolchainManagerFactory.DefaultToolchainManagerV3
- All Implemented Interfaces:
ToolchainManager
,ToolchainManagerPrivate
- Enclosing class:
- ToolchainManagerFactory
public class ToolchainManagerFactory.DefaultToolchainManagerV3
extends Object
implements ToolchainManager, ToolchainManagerPrivate
-
Field Summary
Fields inherited from interface org.apache.maven.toolchain.ToolchainManager
ROLE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetToolchainFromBuildContext
(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
.getToolchainsForType
(String type, MavenSession session) Retrieves every toolchains of given type available in user settings.void
storeToolchainToBuildContext
(ToolchainPrivate toolchain, MavenSession session) Stores the toolchain into build context for later use by toolchain-aware plugins.
-
Constructor Details
-
DefaultToolchainManagerV3
public DefaultToolchainManagerV3()
-
-
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
-
getToolchainsForType
public ToolchainPrivate[] getToolchainsForType(String type, MavenSession session) throws MisconfiguredToolchainException Description copied from interface:ToolchainManagerPrivate
Retrieves every toolchains of given type available in user settings.- Specified by:
getToolchainsForType
in interfaceToolchainManagerPrivate
- Parameters:
type
- the type, must not benull
session
- the Maven session, must not benull
- Throws:
MisconfiguredToolchainException
-
storeToolchainToBuildContext
Description copied from interface:ToolchainManagerPrivate
Stores the toolchain into build context for later use by toolchain-aware plugins.- Specified by:
storeToolchainToBuildContext
in interfaceToolchainManagerPrivate
- Parameters:
toolchain
- the toolchain to store, must not benull
session
- the Maven session, must not benull
- See Also:
-