Describe the bug
The environment tag of the native-maven-plugin only provides environment variables to the produced binary, but doesn't provide these variables to the image builder.
To Reproduce
Add environment variables to the pom.xml with:
<configuration>
<environment>
<variable1>value1</variable1>
<envVariable2>value2</envVariable2>
</environment>
</configuration>
then proceed to create an image where System.getenv() is printed/logged in a static initializer. The environment variables provided through the tag are not visible and don't get printed during the image build.
Expected behavior
The environment variables provided through the <environment> tag SHOULD be visible during the image build.
System Info (please complete the following information):
- OS: [e.g.
Linux Ubuntu-22.04]
- GraalVM Version [e.g.
25.0.1 EE]
- Java Version [e.g.
17]
- Plugin version [e.g.
native-maven-plugin:0.11.4]
Describe the bug
The
environmenttag of thenative-maven-pluginonly provides environment variables to the produced binary, but doesn't provide these variables to the image builder.To Reproduce
Add environment variables to the
pom.xmlwith:then proceed to create an image where
System.getenv()is printed/logged in a static initializer. The environment variables provided through the tag are not visible and don't get printed during the image build.Expected behavior
The environment variables provided through the
<environment>tag SHOULD be visible during the image build.System Info (please complete the following information):
Linux Ubuntu-22.04]25.0.1 EE]17]native-maven-plugin:0.11.4]