You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "KARR, DAVID" <dk...@att.com> on 2011/09/02 15:57:16 UTC

Setting proxy information for Surefire

I have an integration test run with Surefire using Spring's SpringJUnit4ClassRunner.  I have it loading my applicationContext.xml, but it fails when it tries to load the schemas referenced in the context. I've verified the schema exists at that URL.  I can get it in the browser and also with wget (proxy settings in my environment).

I have proxy settings in my settings.xml.  I know they're correct because "mvn" builds at the command line have downloaded many artifacts from external repos.

Is there something maven-ish I should be configuring to get this to work?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Setting proxy information for Surefire

Posted by Guillaume Polet <gu...@gmail.com>.
I think you are mixing two different aspects:
* Maven settings which are used by Maven and its plugin
* Your unit tests settings which you should set up yourself.

How do you make your tests work outside of Maven scope? In your IDE for 
example? or manually? Do you pass your proxy settings using 
-DhttpProxy.host and -DhttpProxy.port? If so, try to pass them to the 
surefire configuration using this: 
http://maven.apache.org/plugins/maven-surefire-plugin/test-mojo.html#argLine

Cheers,
Guillaume

Le 2/09/2011 17:14, KARR, DAVID a écrit :
>> -----Original Message-----
>> From: KARR, DAVID
>> Sent: Friday, September 02, 2011 6:57 AM
>> To: Maven Users List
>> Subject: Setting proxy information for Surefire
>>
>> I have an integration test run with Surefire using Spring's
>> SpringJUnit4ClassRunner.  I have it loading my applicationContext.xml,
>> but it fails when it tries to load the schemas referenced in the
>> context. I've verified the schema exists at that URL.  I can get it in
>> the browser and also with wget (proxy settings in my environment).
>>
>> I have proxy settings in my settings.xml.  I know they're correct
>> because "mvn" builds at the command line have downloaded many artifacts
>> from external repos.
>>
>> Is there something maven-ish I should be configuring to get this to
>> work?
> I tried adding this block to the plugin config:
>
> 				<systemProperties>
> 				<property>
> 				<name>HTTP_PROXY</name>
> 				<value>${env.HTTP_PROXY}</value>
> 				</property>
> 				</systemProperties>
>
> I verified that the HTTP_PROXY environment variable is a URL in the form "http://proxyhost:proxyport".  I use this same value as the "http_proxy" value in my .wgetrc, and that works fine.
>
> Unfortunately, this didn't fix my problem.  It's still failing to get the schema, and I've verified there is a schema at that URL.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: Setting proxy information for Surefire

Posted by "KARR, DAVID" <dk...@att.com>.
> -----Original Message-----
> From: KARR, DAVID
> Sent: Friday, September 02, 2011 6:57 AM
> To: Maven Users List
> Subject: Setting proxy information for Surefire
> 
> I have an integration test run with Surefire using Spring's
> SpringJUnit4ClassRunner.  I have it loading my applicationContext.xml,
> but it fails when it tries to load the schemas referenced in the
> context. I've verified the schema exists at that URL.  I can get it in
> the browser and also with wget (proxy settings in my environment).
> 
> I have proxy settings in my settings.xml.  I know they're correct
> because "mvn" builds at the command line have downloaded many artifacts
> from external repos.
> 
> Is there something maven-ish I should be configuring to get this to
> work?

I tried adding this block to the plugin config:

				    <systemProperties>
				        <property>
				            <name>HTTP_PROXY</name>
				            <value>${env.HTTP_PROXY}</value>
				        </property>
				    </systemProperties>

I verified that the HTTP_PROXY environment variable is a URL in the form "http://proxyhost:proxyport".  I use this same value as the "http_proxy" value in my .wgetrc, and that works fine.

Unfortunately, this didn't fix my problem.  It's still failing to get the schema, and I've verified there is a schema at that URL.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org