Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-5333

Support expressions for plugin parameters

    XMLWordPrintableJSON

Details

    • Wish
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • None
    • None
    • None
    • None

    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

          Activity

            People

              rfscholte Robert Scholte
              mickael.istria Mickael Istria
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: