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 Summary
Modifier and TypeMethodDescriptionfileSet
(String propertyName, Object files, Consumer<MojoMetadataProvider.Context.FileSet> action) Adds the given files as input files under the given property name.fileSet
(String propertyName, Consumer<MojoMetadataProvider.Context.FileSet> action) Marks the given property as a set of input files.Ignores the given properties.properties
(String... propertyNames) Marks the given properties as scalar input properties.Adds the given object as an additional input property.
-
Method Details
-
properties
Marks the given properties as scalar input properties.- Parameters:
propertyNames
- the names of the properties to be marked as scalar inputs- Since:
- 1.15
- See Also:
-
property
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 addedvalue
- 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(String propertyName, Consumer<MojoMetadataProvider.Context.FileSet> action) Marks the given property as a set of input files.- Parameters:
propertyName
- the name of the property to be marked as a set of input filesaction
- an action to configure theMojoMetadataProvider.Context.FileSet
- Since:
- 1.15
- See Also:
-
fileSet
MojoMetadataProvider.Context.Inputs fileSet(String propertyName, Object files, 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 filesfiles
- can be anIterable
, an array or a single object of typeString
,Path
,URI
orFile
. 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 theMojoMetadataProvider.Context.FileSet
- Since:
- 1.15
-
ignore
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
-