slachiewicz opened a new issue, #797:
URL: https://github.com/apache/maven-invoker-plugin/issues/797

   ### Affected version
   
   3.10.1, `master` at e4ab4f6
   
   ### Bug description
   
   `invoker.environmentVariables.<name>` in `invoker.properties` is silently 
ignored when the variable name starts with `_` or has a single character. 
`InvokerProperties` matches the keys with 
`invoker\.environmentVariables\.([A-Za-z][^.]+)(\.(\d+))?` 
([`InvokerProperties.java:50`](https://github.com/apache/maven-invoker-plugin/blob/master/src/main/java/org/apache/maven/plugins/invoker/InvokerProperties.java#L50)),
 which requires a leading letter and at least two characters.
   
   So `invoker.environmentVariables._JAVA_OPTIONS = -Dabc=def` never reaches 
the forked Maven, and neither does `invoker.environmentVariables.X = 1`; there 
is no warning. Environment variable names may start with an underscore, and 
`_JAVA_OPTIONS` is the one the JVM itself reads. maven-javadoc-plugin had to 
switch an IT to `JAVA_TOOL_OPTIONS` for this reason.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to