You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Loïc Hermann (Jira)" <ji...@apache.org> on 2021/01/16 17:24:00 UTC
[jira] [Updated] (MNG-7074) Environment Variable defaulting
[ https://issues.apache.org/jira/browse/MNG-7074?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Loïc Hermann updated MNG-7074:
------------------------------
Description:
It's often required to use specific environnement variables in CI environnent.
If the environment variable is not defined on the developper environment the build will fail.
{{For now defaulting those environment variable can only be done by defining profiles 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/>
```
was:
It's often required to use specific environnement variables in CI environnent.
If the environment variable is not defined on the developper environment the build will fail.
{{For now defaulting those environment variable can only be done by defining profiles 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/>
```
{{}}
> Environment Variable defaulting
> -------------------------------
>
> Key: MNG-7074
> URL: https://issues.apache.org/jira/browse/MNG-7074
> Project: Maven
> Issue Type: New Feature
> Reporter: Loïc Hermann
> Priority: Major
>
> It's often required to use specific environnement variables in CI environnent.
> If the environment variable is not defined on the developper environment the build will fail.
> {{For now defaulting those environment variable can only be done by defining profiles 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/>
> ```
--
This message was sent by Atlassian Jira
(v8.3.4#803005)