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 theignore(String...)
method. Any unhandled parameters will make the goal execution non-cacheable.- Since:
- 1.15
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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.MojoMetadataProvider.Context.Inputs
fileSet(java.lang.String propertyName, java.util.function.Consumer<MojoMetadataProvider.Context.FileSet> action)
Marks the given property as a set of input files.MojoMetadataProvider.Context.Inputs
ignore(java.lang.String... propertyNames)
Ignores the given properties.MojoMetadataProvider.Context.Inputs
properties(java.lang.String... propertyNames)
Marks the given properties as scalar input properties.MojoMetadataProvider.Context.Inputs
property(java.lang.String propertyName, java.lang.Object value)
Adds the given object as an additional input property.
-
-
-
Method Detail
-
properties
MojoMetadataProvider.Context.Inputs properties(java.lang.String... propertyNames)
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(String, Object)
-
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 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(java.lang.String propertyName, java.util.function.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(String, Object, Consumer)
-
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 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
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
-
-