[ 
https://issues.apache.org/jira/browse/SUREFIRE-1195?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14992033#comment-14992033
 ] 

Michael Rumpf edited comment on SUREFIRE-1195 at 11/5/15 5:32 PM:
------------------------------------------------------------------

The disadvantage of this approach is that I need to add proxy configuration to 
the environment although it is already available in the Maven settings.xml.
The background is that I want to build the Spring Boot project in our corporate 
environment.
I cannot add our internal proxy to the POM of the Spring Boot project. Instead 
I need to inject this via user specific configurations.
There are 2 possibilities:
* from the settings.xml
* via environment properties: 
** ${env.HTTP_PROXY_HOST} 
** ${env.HTTP_PROXY_PORT}

I have already the HTTP_PROXY and HTTPS_PROXY environment variables set, but to 
translate them into the Java properties I would need to split the env value 
into host and port.
This is all very inconvenient and makes building an open-source project like 
Spring Boot much more complex in a corporate environment.

The idea would be to have a config property <proxy>true</proxy> to 
automatically pass the proxy from the Maven settings.xml or from the parent 
process environment (HTTP_PROXY) as command line parameters to a forked Junit 
process. When <proxy>true</proxy> is configured and no proxy is found, neither 
in settings now in the environment, then of course no -DhttpProxyHost=... 
parameters must be set.


was (Author: miru):
The disadvantage of this approach is that I need to add proxy configuration to 
the environment although it is already available in the Maven settings.xml.
The background is that I want to build the Spring Boot project in our corporate 
environment.
I cannot add our internal proxy to the POM of the Spring Boot project. Instead 
I need to inject this via user specific configurations.
There are 2 possibilities:
* from the settings.xml
* via environment properties: ${env.HTTP_PROXY_HOST} ${env.HTTP_PROXY_PORT}

I have already the HTTP_PROXY and HTTPS_PROXY environment variables set, but to 
translate them into the Java properties I would need to split the env value 
into host and port.
This is all very inconvenient and makes building an open-source project like 
Spring Boot much more complex in a corporate environment.

The idea would be to have a config property <proxy>true</proxy> to 
automatically pass the proxy from the Maven settings.xml or from the parent 
process environment (HTTP_PROXY) as command line parameters to a forked Junit 
process. When <proxy>true</proxy> is configured and no proxy is found, neither 
in settings now in the environment, then of course no -DhttpProxyHost=... 
parameters must be set.

> Add a feature to pass the proxy settings from the calling to the forked VM
> --------------------------------------------------------------------------
>
>                 Key: SUREFIRE-1195
>                 URL: https://issues.apache.org/jira/browse/SUREFIRE-1195
>             Project: Maven Surefire
>          Issue Type: Improvement
>            Reporter: Michael Rumpf
>            Assignee: Tibor Digana
>
> The proxy is configured in the user's settings.xml file.
> Unformately it seems as if there is not easy way to pass them to the child VM 
> when the surefire plugin start the VM.
> The parameters
> * -Dhttp.proxyHost=${http.proxyHost}
> * -Dhttp.proxyPort=${http.proxyPort}
> * -Dhttps.proxyHost=${https.proxyHost}
> * -Dhttps.proxyPort=${https.proxyPort}
> * -Dhttp.nonProxyHosts=${http.nonProxyHosts}
> must only be passed to the forked VM when there are values. if the proxy is 
> not configured and thus no values are present the parameters must not be 
> passed.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to