You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Andy Fyfe <af...@bigtribe.com> on 2006/05/15 23:13:52 UTC

surefire vs java.protocol.handler.pkgs

I have some unit tests that depend on a soap server.
To this end I have written my own stub server and
use the java.protocol.handler.pkgs system property
to override the http connection, redirecting connections
to my stub server.

But I can't get this to work with surefire.  I've tried all
of the forking options (a fork is obviously required).

The tests see the system property set to the correct
value, but they fail with a
     java.net.ConnectException: Connection refused
exception -- my protocol handler is not being used.

The sources for my protocol handler are with the
other test sources.  It all works as expected using
maven 1.0.2 and from within eclipse.

I have been able to get this to work by copying
all the test classes, the project classes and a
number of jar files (like junit and log4j) into my
~/Library/Java/Extensions directory (I'm using OSX,
and anything in the Extensions directory is automatically
added to the classpath).  This is clearly not a solution,
but it does suggest it's a classpath problem.

What can I do to get this to work under surefire?

--Andy





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