Details
-
Wish
-
Status: Closed
-
Major
-
Resolution: Duplicate
-
None
-
None
-
None
-
None
-
mistria@mistria--rh:~$ mvn -version
Apache Maven 3.0.4 (r1232337; 2012-01-17 09:44:56+0100)
Maven home: /home/mistria/apps/apache-maven-3.0.4
Java version: 1.6.0_24, vendor: Sun Microsystems Inc.
Java home: /usr/lib/jvm/java-6-openjdk-amd64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.2.0-29-generic", arch: "amd64", family: "unix"
mistria@mistria--rh :~$ mvn -version Apache Maven 3.0.4 (r1232337; 2012-01-17 09:44:56+0100) Maven home: /home/mistria/apps/apache-maven-3.0.4 Java version: 1.6.0_24, vendor: Sun Microsystems Inc. Java home: /usr/lib/jvm/java-6-openjdk-amd64/jre Default locale: en_US, platform encoding: UTF-8 OS name: "linux", version: "3.2.0-29-generic", arch: "amd64", family: "unix"
Description
Use-case:
I want to give as input of my surefire-plugin
<configuration>
<skip>${skipTests} || ${skipDownloadRuntimes}</skip>
<configuration>
This won't work because the expressions are not evaluated. Boolean arguments in plugin are set to something like Boolean.parseBoolean, which is quite limited.
Instead, we could think of introducing an expression language, such as Groovy, that would allow expressions as parameters for plugins.
Then let's say skipTests=false and skipDownloadRuntimes=true, Maven would first replace "${skipTests} || ${skipDownloadRuntimes}" by "false || true" and then this evaluator would evaluate that to "false", and skip will receive the value "false".
This would for sure make maven less verbose in some cases.
Attachments
Issue Links
- duplicates
-
MNG-5347 Support expression language in ${...}
- Closed