Skip to content

Fix project variable resolution in environment file paths - #8246

Merged
mattcasters merged 1 commit into
apache:mainfrom
gvdutra:8187-resolve-project-variable-environment-path
Sep 3, 2026
Merged

Fix project variable resolution in environment file paths#8246
mattcasters merged 1 commit into
apache:mainfrom
gvdutra:8187-resolve-project-variable-environment-path

Conversation

@gvdutra

@gvdutra gvdutra commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Fixes #8187.

Project variables were applied after environment configuration files were loaded, so paths such as ${CONFIG_HOME}/environment.json could not be resolved.

Apply project variables before resolving those paths, then reapply them afterward to preserve the existing variable precedence.

Added a regression test using CONFIG_HOME=${PROJECT_HOME}/config and a real environment configuration file. Before the fix, the expected environment value was null. With the fix, the file is loaded and all 13 ProjectTest tests pass.

Validation:

  • ./mvnw -pl plugins/misc/projects -am -Dtest=ProjectTest -Dsurefire.failIfNoSpecifiedTests=false test

  • Spotless formatting and validation

  • git diff --check

  • I hereby declare this contribution to be licensed under the Apache License Version 2.0, January 2004

@mattcasters
mattcasters merged commit 5e2dabf into apache:main Sep 3, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Project variables are not resolved when referenced in Environment file paths

2 participants