Class BuildChainBuilder

    • Field Detail

      • LOG_CONFLICT_CAUSING

        static final boolean LOG_CONFLICT_CAUSING
    • Constructor Detail

      • BuildChainBuilder

        BuildChainBuilder()
    • Method Detail

      • addBuildStep

        public BuildStepBuilder addBuildStep​(BuildStep buildStep)
        Add a build step to the chain. The configuration in the build step builder at the time that the chain is built is the configuration that will apply to the build step in the final chain. Any subsequent changes will be ignored.

        A given build step is included in the chain when one or more of the following criteria are met:

        • It includes a pre-produce step for a item which is produced by one or more build steps that is included in the chain
        • It includes a produce step for a item which is consumed by a build step that is included in the chain or is a final item
        • It includes a consume step for a item which is produced by a build step that is included in the chain or is an initial item
        • It includes a destroy step for a item which is produced by a build step that is included in the chain or is an initial item
        In addition, the declaration of producers and consumers can cause corresponding consumers and producers to be included if they exist.
        Parameters:
        buildStep - the build step instance
        Returns:
        the builder for the build step
      • addBuildStep

        public BuildStepBuilder addBuildStep()
        Add a build step to the chain. The configuration in the build step builder at the time that the chain is built is the configuration that will apply to the build step in the final chain. Any subsequent changes will be ignored.

        A given build step is included in the chain when one or more of the following criteria are met:

        • It includes a pre-produce step for a item which is produced by one or more build steps that is included in the chain
        • It includes a produce step for a item which is consumed by a build step that is included in the chain or is a final item
        • It includes a consume step for a item which is produced by a build step that is included in the chain or is an initial item
        • It includes a destroy step for a item which is produced by a build step that is included in the chain or is an initial item
        In addition, the declaration of producers and consumers can cause corresponding consumers and producers to be included if they exist.
        Returns:
        the builder for the build step
      • addInitial

        public BuildChainBuilder addInitial​(Class<? extends BuildItem> type)
        Declare an initial item that will be provided to build steps in the chain. Note that if this method is called for a simple item, no build steps will be allowed to produce that item.
        Parameters:
        type - the item type (must not be null)
        Returns:
        this builder
        Throws:
        IllegalArgumentException - if the item type is null
      • addFinal

        public BuildChainBuilder addFinal​(Class<? extends BuildItem> type)
        Declare a final item that will be consumable after the build step chain completes. This may be any item that is produced in the chain.
        Parameters:
        type - the item type (must not be null)
        Returns:
        this builder
        Throws:
        IllegalArgumentException - if the item type is null
      • setClassLoader

        public void setClassLoader​(ClassLoader classLoader)
        Sets the ClassLoader for the build. Every build step will be run with this as the TCCL.
        Parameters:
        classLoader - The ClassLoader