continuum-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Barrie Treloar" <baerr...@gmail.com>
Subject Building Continuum from behind a firewall or proxy
Date Wed, 01 Nov 2006 00:49:40 GMT
The following failure will occur if you need to access the internet
via a proxy when building continuum:

-------------------------------------------------------------------------------
Test set: org.apache.maven.continuum.core.action.CreateProjectsFromMetadataTest
-------------------------------------------------------------------------------
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.282
sec <<< FAILURE!
testExecute(org.apache.maven.continuum.core.action.CreateProjectsFromMetadataTest)
 Time elapsed: 1.266 sec  <<< FAILURE!
junit.framework.AssertionFailedError: Should not have errors
	at junit.framework.Assert.fail(Assert.java:47)
	at junit.framework.Assert.assertTrue(Assert.java:20)
	at junit.framework.Assert.assertFalse(Assert.java:34)
	at org.apache.maven.continuum.core.action.CreateProjectsFromMetadataTest.testExecute(CreateProjectsFromMetadataTest.java:66)

This is because mungedURL.isValid() calls openConnection() on the URL,
which fails without providing any proxy values.

I tried:
mvn -DproxySet=true -DproxyHost=<my.proxy> -DproxyPort=80 install

But the proxy requires authentication which I think requires code
something like:
URLConnection connection = url.openConnection();
String password = "username:password";
String encodedPassword = base64Encode( password );
connection.setRequestProperty( "Proxy-Authorization", encodedPassword );

Given this is a NTLM microsoft proxy, I have the same problems as
maven itself has.
I've struggled to find docs on the internet that explain how to make
this stuff work transparently. Jakarta Commons HttpClient at least has
support for NTLM
(http://jakarta.apache.org/commons/httpclient/authentication.html) but
it would be nicer if somehow the windows logon credentials were passed
through...

Anyway, my workaround is to disable this test.

Mime
View raw message