Class DefaultToolchainManager

java.lang.Object
org.apache.maven.toolchain.DefaultToolchainManager
All Implemented Interfaces:
ToolchainManager
Direct Known Subclasses:
DefaultToolchainManagerPrivate

@Named @Singleton public class DefaultToolchainManager extends Object implements ToolchainManager
  • Field Details

    • logger

      protected final org.slf4j.Logger logger
  • Constructor Details

  • Method Details

    • getToolchainFromBuildContext

      public Toolchain getToolchainFromBuildContext(String type, MavenSession session)
      Description copied from interface: ToolchainManager
      Retrieve toolchain of specified type from build context. It is expected that maven-toolchains-plugin contains the configuration to select the appropriate toolchain and is executed at the beginning of the build.
      Specified by:
      getToolchainFromBuildContext in interface ToolchainManager
      Parameters:
      type - the type, must not be null
      session - the Maven session, must not be null
      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 from maven-toolchains-plugin.
      Specified by:
      getToolchains in interface ToolchainManager
      Parameters:
      session - the Maven session, must not be null
      type - the type, must not be null
      requirements - the requirements, may be null
      Returns:
      the matching toolchains, never null
    • getStorageKey

      public static final String getStorageKey(String type)