[MNG-7074] Environment Variable defaulting
- Dominant language
- Java
- Stars
- 5.3k
- Forks
- 3.1k
- Avg merge
- 20h 42m
- Merged PRs (30d)
- 297
Description
**[Loïc Hermann](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=loichrn)** opened **[MNG-7074](https://issues.apache.org/jira/browse/MNG-7074?redirect=false)** and commented
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:
```
<`VARIABLE_NAME`>defaultValue
```
I would love to work on a PR to implements one of those solution if this make sense to you.
Regards
---
1 votes, 2 watchers
Contributor guide
Research direction
Start by reviewing Maven core's existing environment-variable interpolation and the two proposed default-value syntaxes in the issue. Decide which approach is appropriate and trace its impact through POM processing. Done means the chosen behavior is specified clearly and covered by relevant tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100