Class ImageBuild

  • All Implemented Interfaces:
    org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo, ConnectionCfg
    Direct Known Subclasses:
    ImagePush

    @Mojo(name="build",
          defaultPhase=PACKAGE,
          threadSafe=true)
    public class ImageBuild
    extends Containerfile
    Create a container image from the Containerfile directions and files from context
    • Field Detail

      • buildArguments

        @Parameter
        public Map<String,​String> buildArguments
        Map of build arguments
      • contexts

        @Parameter
        public Map<String,​String> contexts
        Map of context name to location
      • provenance

        @Parameter(property="buildx.provenance")
        public String provenance
        Include provenance attestation. Acceptable values are "min", "max", "false"
      • sbom

        @Parameter(property="buildx.sbom",
                   defaultValue="false")
        public boolean sbom
        Include software bill of materials attestation.
      • image

        @Parameter(property="buildx.image",
                   required=true)
        protected String image
        Fully qualified image name containing registry prefix, repository name, and version
      • registries

        @Parameter(property="buildx.registries")
        protected List<String> registries
        For building/pushing to multiple registries. When used, do not include registry prefix in image value
      • platforms

        @Parameter(property="buildx.platforms")
        protected List<String> platforms
        The os/arch of the built image
      • builder

        @Parameter(property="buildx.builder",
                   defaultValue="buildx-maven")
        protected String builder
        The name of an existing builder to use
    • Constructor Detail

      • ImageBuild

        public ImageBuild()
    • Method Detail

      • ctxDir

        protected String ctxDir()
      • doExecute

        protected void doExecute()
                          throws org.apache.maven.plugin.MojoExecutionException
        Specified by:
        doExecute in class ImageGoal
        Throws:
        org.apache.maven.plugin.MojoExecutionException