-
Notifications
You must be signed in to change notification settings - Fork 40
Allow defining complex expression like in interactive mode #132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
src/test/java/org/apache/maven/plugins/help/EvaluateMojoTest.java
Outdated
Show resolved
Hide resolved
src/test/java/org/apache/maven/plugins/help/EvaluateMojoTest.java
Outdated
Show resolved
Hide resolved
src/test/java/org/apache/maven/plugins/help/EvaluateMojoTest.java
Outdated
Show resolved
Hide resolved
src/test/java/org/apache/maven/plugins/help/EvaluateMojoTest.java
Outdated
Show resolved
Hide resolved
|
@ggkochanski please add at least one line from template to PR description https://github.com/apache/maven-help-plugin/blob/master/.github/pull_request_template.md |
|
|
It appears that property expression is already resolved when it goes to e.g. executing causes that the value of injected parameter expression is already resolved: and overlapping it with ${} does not do any good 😢 It overlaps already resolved expression with '${}' and tries to handle expression ${project_version=3.5.2-SNAPSHOT}, which fails with message However, the workaround exists 😛 |
|
should we revert this change? |
Please keep it; it ultimately serves its purpose: you can prepare properties like format (or any other) within a single goal. This eliminates the need to use standard input, which is not always possible, e.g., during release |
Overlapping parameter expression for goal
help:evaluateby default:handleResponse("${" + expression + "}", output);limits usage for more complex expressions, e.g.
mvn help:evaluate -Dexpression='project_version=${project.version}'which currently fails with message:
null object or invalid expressionSkipping the overlapping when an expression already contains string '${' removes this limitation and allows to define expression in the same way as in the interactive mode:
echo 'project_version=${project.version}'|mvn help:evaluate