Hi Jo,
I can not use the parent class loader since that would render the whole exercise useless. The whole point is not using the standard classloader otherwise it is impossible to unload classes. Remember, I want to test static blocks ( static { some code } ) . So I need fresh copies of my class for every single test. That's why I use the ReloadableClassLoader. This custom classloader does not use the normal commandline but the 'java.class.path' system property to determine the classpath. Retrieving this system property reveals only one classpath entry. K:\DevTools\maven\maven-2.0.6\boot\classworlds-1.1.jar Thus all entries in the classpath reported by 'mvn -X' do not show up here. An alternative to using 'java.class.path' is fine with me, but from where can I programmatically retrieve the classpath to feed to the custom classloader. Is it possible to get the classpath from the active classloader? Regards, Minto -----Oorspronkelijk bericht----- Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Namens Vandermeeren, Jo Verzonden: vrijdag 8 juni 2007 14:49 Aan: Maven Users List Onderwerp: Re: Classpath issues with maven 2.0.6 On 6/8/07, [EMAIL PROTECTED] < [EMAIL PROTECTED]> wrote: > > Snippet of the "mvn test -X" ouput: > ================================== > <snip> > [DEBUG] Test Classpath : > [DEBUG] K:\Sources\Prefs\memoryprefs\target\test-classes > [DEBUG] K:\Sources\Prefs\memoryprefs\target\classes > [DEBUG] K:\Sources\Prefs\memoryprefs\target\classes > [DEBUG] K:\Sources\Prefs\memoryprefs\target\test-classes > [DEBUG] > K:\Repositories\maven2\.m2\repository\junit\junit\4.3.1\junit-4.3.1.ja > r > [DEBUG] > K:\Repositories\maven2\.m2\repository\org\slf4j\slf4j-simple\1.4.0\slf > 4j > -simple-1.4.0.jar > [DEBUG] > K:\Repositories\maven2\.m2\repository\org\slf4j\slf4j-api\1.4.0\slf4j- > ap > i-1.4.0.jar > <snap> > Hi Minto I have reduced your output to show nothing but the test classpath that is defined by your project. As you can see, both target/classes and target/test-classes are included. (Twice, it seems.. kind of strange..) Also your dependencies are listed. The only stuff that is appended by Eclipse are the eclipse jars.. Note that compilation and running tests in Eclipse is done by Eclipse itself, not by Maven. If your custom classloader uses the system classloader for delegation, there is no way to catch the additional libararies. Since the sourceode of the classloader is already in your project, you might as well adjust it. Try using the context classloader as a parent instead. Cheers Jo DISCLAIMER De informatie in deze e-mail is vertrouwelijk en uitsluitend bestemd voor de geadresseerde. Indien u niet de geadresseerde bent, wordt u er hierbij op gewezen, dat u geen recht heeft kennis te nemen van de rest van deze e-mail, deze te gebruiken, te kopieren of te verstrekken aan andere personen dan de geadresseerde. Indien u deze e-mail abusievelijk hebt ontvangen, brengt u dan alstublieft de afzender op de hoogte, waarbij u bij deze gevraagd wordt het originele bericht te vernietigen. Politie Amsterdam-Amstelland is niet verantwoordelijk voor de inhoud van deze e-mail en wijst iedere aansprakelijkheid af voor en/of in verband met alle gevolgen en/of schade van een onjuiste of onvolledige verzending ervan. Tenzij uitdrukkelijk het tegendeel blijkt, kunnen aan dit bericht geen rechten worden ontleend. Het gebruik van Internet e-mail brengt zekere risicos met zich. Daarom wordt iedere aansprakelijkheid voor het gebruik van dit medium door de Politie Amsterdam-Amstelland van de hand gewezen. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]