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

Environment Variable defaulting

    XMLWordPrintableJSON

    Details

    • Type: New Feature
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: waiting-for-feedback
    • Component/s: None
    • Labels:
      None

      Description

      Hi all,

      maven build in CI environment often rely on environnement variables.

      If those environment variables are not defined on the developper environment the build will fail.

      For now defaulting those environment variable can only be done by defining one profile per variable which is really verbose.

      it would be easier if we can either

      add a default value where the variable is used:

      ```

      ${env.VARIABLE_NAME:defaultValue}

      ```

      or have a section to define default values in the pom:

      ```

      <environment>

         <VARIABLE_NAME>defaultValue</VARIABLE_NAME>

      <environment/>

      ```

      I would love to work on a PR to implements one of those solution if this make sense to you.

       

      Regards

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              loichrn Loïc Hermann
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: