Interface MojoMetadataProvider.Context.Inputs

  • Enclosing interface:
    MojoMetadataProvider.Context

    public static interface MojoMetadataProvider.Context.Inputs
    The inputs of a goal determine its cache key. All fields annotated with @Parameter need to be declared as either an input, output, local state or ignored using the ignore(String...) method. Any unhandled parameters will make the goal execution non-cacheable.
    Since:
    1.15
    • Method Detail

      • property

        MojoMetadataProvider.Context.Inputs property​(java.lang.String propertyName,
                                                     java.lang.Object value)
        Adds the given object as an additional input property. Supported types are all primitives, enums and Strings, as well as arrays, collections and maps of these types.
        Parameters:
        propertyName - the name of the property to be added
        value - the value of the property to be added. Supported types are all primitives, enums and Strings, as well as arrays, collections and maps of these types
        Since:
        1.15
      • fileSet

        MojoMetadataProvider.Context.Inputs fileSet​(java.lang.String propertyName,
                                                    java.lang.Object files,
                                                    java.util.function.Consumer<MojoMetadataProvider.Context.FileSet> action)
        Adds the given files as input files under the given property name.

        May be zero, one or many files and directories.

        Parameters:
        propertyName - the name of the property to be marked as a set of input files
        files - can be an Iterable, an array or a single object of type String, Path, URI or File. Each element can represent an absolute path or a relative path to a file. If it is a relative path, it will be resolved using the current project's base directory.
        action - an action to configure the MojoMetadataProvider.Context.FileSet
        Since:
        1.15
      • ignore

        MojoMetadataProvider.Context.Inputs ignore​(java.lang.String... propertyNames)
        Ignores the given properties. Use this for any input parameters that don't affect the output files of the goal, e.g. parameters that only affect the console output or parameters that affect how work is parallelized.
        Parameters:
        propertyNames - the names of the properties to be ignored
        Since:
        1.15