Package org.apache.maven.api.services
Interface ToolchainFactory
- All Known Implementing Classes:
DefaultJavaToolchainFactory
Factory interface for creating toolchain instances from configuration models.
This factory is responsible for instantiating concrete toolchain implementations based on toolchain model configurations or default settings.
- Since:
- 4.0.0
-
Method Summary
Modifier and TypeMethodDescriptionCreates a default toolchain instance using system defaults.createToolchain
(ToolchainModel model) Creates a toolchain instance from the provided model configuration.
-
Method Details
-
createToolchain
Creates a toolchain instance from the provided model configuration.- Parameters:
model
- The toolchain configuration model- Returns:
- A configured toolchain instance
- Throws:
ToolchainFactoryException
- if toolchain creation fails
-
createDefaultToolchain
Creates a default toolchain instance using system defaults.- Returns:
- Optional containing the default toolchain if available
- Throws:
ToolchainFactoryException
- if default toolchain creation fails
-