I am looking for a solution to that too. My workaround was until now to
pick specific classes whose JAR files I needed and do
_class.getResource("/" + _class.getCanonicalName().replace(".", "/") +
".class").toString().replaceAll("-client.jar!",
".jar!").replaceFirst("jar:file:([^!]+).*", "$1")
and append this to java.class.path. Kindofa hack though ...
Stefan
Alexander Klimetschek wrote:
I forgot to mention that the unit test runs perfect in Eclipse, because
the project created by "mvn eclipse:eclipse" includes all test
dependencies as well and the Eclipse jUnit runner puts all of them in
the class path for the test. Would be cool to have the Eclipse project
and mvn test behave the same without two different configurations.
Alex
Am 25.02.2008 um 20:58 schrieb Alexander Klimetschek:
Hi all,
I have a test case which starts another JVM (a derby database server
in network mode). The classpath for the new JVM needs jar files which
are defined as test dependencies (derby is available in the form of
maven artifacts, and I want to test it against the same derby version
against which the actual code is written). The problem is that due to
the surefire boot mechanism, it's not sufficient to read the classpath
of the JVM in which test is running via
System.getProperty("java.class.path").
How can I get access to the classpath of surefire?
Or is there another way to retrieve the path of the jar files defined
in the pom from my junit test class?
Regards,
Alex
--
Alexander Klimetschek
[EMAIL PROTECTED]
--
Alexander Klimetschek
[EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
best regards,
Stefan Seidel
software developer
________________________
VUB Printmedia GmbH
Chopinstraße 4
D-04103 Leipzig
Germany
tel. +49 (341) 9 60 50 07
fax. +49 (341) 9 60 50 92
mail. [EMAIL PROTECTED]
web. www.vub.de
HRB Köln 24015
UStID DE 122 649 251
GF Dr. Achim Preuss Neudorf,
Dr. Christian Preuss Neudorf
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]