> Hi there,
> 
> I am currently using Maven and am running into a bit
> of a problem.
> 
> Using Maven, I unit test a piece of code that
> leverages an implementation of
> java.util.prefs.Preferences.
> 
> To do so, I set the java.util.prefs.PreferencesFactory
> to my custom implementation. All of this resides under
> my usual target/classes and target/test-classes.
> 
> The issue is that the Sun Preferences implemetation
> uses:
> 
> try 
> {
>   factory = (PreferencesFactory)
>     Class.forName(factoryName, false,
>     ClassLoader.getSystemClassLoader()).newInstance();
> }
> 
> Now, how do I get the Maven dependencies in the System
> class loader.

You can specify an artifact to be loaded by the root (Maven) classloader by
adding the 
<properties><classloader>root</classloader></properties> at the same level
as your artifact dependency elements.  
 
> As anyone run in that problem before?
> 
> Regards,
> 
> David Le Strat.
> 
> 
> __________________________________
> Do you Yahoo!?
> New Yahoo! Photos - easier uploading and sharing. 
http://photos.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to