Class DefaultToolchainManager

    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) java.util.Map<java.lang.String,​ToolchainFactory> factories  
      (package private) org.codehaus.plexus.logging.Logger logger  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String getStorageKey​(java.lang.String type)  
      Toolchain getToolchainFromBuildContext​(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 from maven-toolchains-plugin.
      (package private) java.util.Map<java.lang.String,​java.lang.Object> retrieveContext​(MavenSession session)  
      private java.util.List<Toolchain> selectToolchains​(java.util.List<ToolchainModel> models, java.lang.String type, java.util.Map<java.lang.String,​java.lang.String> requirements)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DefaultToolchainManager

        public DefaultToolchainManager()
    • Method Detail

      • getToolchainFromBuildContext

        public Toolchain getToolchainFromBuildContext​(java.lang.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 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: 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
      • selectToolchains

        private java.util.List<Toolchain> selectToolchains​(java.util.List<ToolchainModel> models,
                                                           java.lang.String type,
                                                           java.util.Map<java.lang.String,​java.lang.String> requirements)
      • retrieveContext

        java.util.Map<java.lang.String,​java.lang.Object> retrieveContext​(MavenSession session)
      • getStorageKey

        public static final java.lang.String getStorageKey​(java.lang.String type)