[
https://issues.apache.org/jira/browse/MSHARED-971?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17324282#comment-17324282
]
Robert Scholte commented on MSHARED-971:
----------------------------------------
To me this is not a bug in maven-shared-utils. Instead the bug would be in
maven-invoker, saying value of {{isShellEnvironmentInherited()}} has no effect
(it requires a unittest to proof so).
To fix it, it will require an improvement in {{Commandline}}.
> System environment variable are always added to maven-invoker
> -------------------------------------------------------------
>
> Key: MSHARED-971
> URL: https://issues.apache.org/jira/browse/MSHARED-971
> Project: Maven Shared Components
> Issue Type: Bug
> Components: maven-invoker, maven-shared-utils
> Reporter: Slawomir Jaranowski
> Priority: Minor
>
> In {{org.apache.maven.shared.invoker.MavenCommandLineBuilder}}
> [https://github.com/apache/maven-invoker/blob/d58703dd592ba0bc6f0a09928d0cce90e4002af9/src/main/java/org/apache/maven/shared/invoker/MavenCommandLineBuilder.java#L197-L242]
> we have code:
> {code}
> if ( request.isShellEnvironmentInherited() )
> {
> cli.addSystemEnvironment();
> }
> {code}
> but in {{org.apache.maven.shared.utils.cli.Commandline}} we have:
> {code}
> public String[] getEnvironmentVariables()
> {
> addSystemEnvironment();
> ...
> }
> {code}
> System environment variable are always added - it is inconsistent
> implementation.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)