itexpression:eval
Full name:
org.apache.maven.its.plugins:maven-it-plugin-expression:2.1-SNAPSHOT:eval
Description:
Creates a properties file with the effective values of some
user-defined expressions. Unlike Maven's built-in expression syntax
for interpolation, these expressions use forward slashes to
navigate down the object graph and support access to individual
collection/array elements. Furthermore, the result of an expression
need not be a scalar value but can also be a collection/array or a
bean-like object (from the Maven model). For example, the
expression "project/dependencies/0" would extract the first project
dependency. In more detail, this example expression could output
the following keys to the properties file:
project.dependencies.0.groupId = org.apache.maven
project.dependencies.0.artifactId = maven-project
project.dependencies.0.type = jar
project.dependencies.0.version = 2.0
project.dependencies.0.optional = false
project.dependencies.0.exclusions = 2
project.dependencies.0.exclusions.0.groupId = plexus
project.dependencies.0.exclusions.0.artifactId = plexus-utils
project.dependencies.0.exclusions.1.groupId = plexus
project.dependencies.0.exclusions.1.artifactId = plexus-container-default
Expressions that reference non-existing objects or use invalid
collection/array indices silently resolve to
null. For
collections and arrays, the special index "*" can be used to
iterate all elements.
Attributes:
- Requires a Maven project to be executed.
- Binds by default to the lifecycle phase: initialize.
Optional Parameters
Name |
Type |
Since |
Description |
expressionList |
String |
- |
The comma separated set of expressions to evaluate. User property is: expression.expressions. |
expressions |
String[] |
- |
The set of expressions to evaluate.
|
outputFile |
File |
- |
The path to the output file for the properties with the expression
values. For each expression given by the parameter
expressions an similar named properties key will be
used to save the expression value. If an expression evaluated to
null, there will be no corresponding key in the
properties file. User property is: expression.outputFile. |
Parameter Details
expressionList:
The comma separated set of expressions to evaluate.
- Type: java.lang.String
- Required: No
- User Property: expression.expressions
expressions:
The set of expressions to evaluate.
- Type: java.lang.String[]
- Required: No
outputFile:
The path to the output file for the properties with the expression
values. For each expression given by the parameter
expressions an similar named properties key will be
used to save the expression value. If an expression evaluated to
null, there will be no corresponding key in the
properties file.
- Type: java.io.File
- Required: No
- User Property: expression.outputFile