[MNG-6202] Cannot pass nonProxyHosts to ITs making remote tests lock up when proxy rejects to proxy internal hosts

Set default value 'localhost' of 'proxy.nonProxyHosts' and allow users to
override if necessary.
This commit is contained in:
Michael Osipov 2017-04-01 22:10:35 +02:00
parent cf53410e0c
commit d9c9a8551d
5 changed files with 13 additions and 10 deletions

View File

@ -58,9 +58,10 @@ under the License.
ITs that don't require to fork Maven can also be run from the IDE using the Maven projects from the workspace if the
Maven dependencies are added to the test class path.
If you're behind a proxy, use the system properties proxy.host, proxy.port, proxy.user and proxy.pass to specify the
required proxy setup for the ITs. Alternatively, set the system property maven.it.central to a URL of a local
repository manager that proxies the required artifacts.
If you're behind a proxy, use the system properties proxy.host, proxy.port, proxy.user, proxy.pass and
proxy.nonProxyHosts to specify the required proxy setup for the ITs. Alternatively, set the system property
maven.it.central to a URL of a local repository manager (anonymous authentication only) that proxies the
required artifacts.
-->
<properties>
@ -78,6 +79,7 @@ under the License.
<proxy.type>none</proxy.type>
<proxy.user></proxy.user>
<proxy.pass></proxy.pass>
<proxy.nonProxyHosts>localhost</proxy.nonProxyHosts>
<slf4jVersion>1.6.1</slf4jVersion>
<jetty9Version>9.0.4.v20130625</jetty9Version>
</properties>

View File

@ -59,9 +59,10 @@ mvn clean test -Prun-its -DmavenVersion=2.2.1
ITs that don't require to fork Maven can also be run from the IDE using the Maven projects from the workspace if the
Maven dependencies are added to the test class path.
If you're behind a proxy, use the <<<proxy.host>>>, <<<proxy.port>>>, <<<proxy.user>>> and <<<proxy.pass>>> system properties
to specify the required proxy setup for the ITs. Alternatively, set the <<<maven.it.central>>> system property to a URL of a local
repository manager that proxies the required artifacts.
If you're behind a proxy, use the system properties <<<proxy.host>>>, <<<proxy.port>>>, <<<proxy.user>>>, <<<proxy.pass>>>
and <<<proxy.nonProxyHosts>>> to specify the required proxy setup for the ITs. Alternatively, set the system property
<<<maven.it.central>>> to a URL of a local repository manager (anonymous authentication only) that proxies the required
artifacts.
* Results

View File

@ -34,7 +34,7 @@ plugins/artifacts from test repos so use of these settings should be the excepti
<port>${proxy.port}</port>
<username>${proxy.user}</username>
<password>${proxy.pass}</password>
<nonProxyHosts>localhost</nonProxyHosts>
<nonProxyHosts>${proxy.nonProxyHosts}</nonProxyHosts>
</proxy>
</proxies>
<profiles>

View File

@ -19,8 +19,8 @@
@REM How JvZ runs the ITs from a clean slate if it would be on Windows
mvn clean install -Prun-its,embedded -Dmaven.repo.local=%cd%/repo
mvn clean install -Prun-its,embedded -Dmaven.repo.local=%cd%\repo
@REM If behind a proxy try this..
@REM mvn clean install -Prun-its,embedded -Dmaven.repo.local=%cd%/repo -Dproxy.active=true -Dproxy.type=http -Dproxy.host=<host> -Dproxy.port=<port> -Dproxy.user= -Dproxy.pass=
@REM mvn clean install -Prun-its,embedded -Dmaven.repo.local=%cd%\repo -Dproxy.host=<host> -Dproxy.port=<port> -Dproxy.user= -Dproxy.pass= -Dproxy.nonProxyHosts=<hosts>

View File

@ -25,4 +25,4 @@ mvn clean install -Prun-its,embedded -Dmaven.repo.local=`pwd`/repo
# If behind a proxy try this
# mvn clean install -Prun-its,embedded -Dmaven.repo.local=`pwd`/repo -Dproxy.active=true -Dproxy.type=http -Dproxy.host=<host> -Dproxy.port=<port> -Dproxy.user= -Dproxy.pass=
# mvn clean install -Prun-its,embedded -Dmaven.repo.local=`pwd`/repo -Dproxy.host=<host> -Dproxy.port=<port> -Dproxy.user= -Dproxy.pass= -Dproxy.nonProxyHosts=<hosts>