Question : maven bootclasspath append

I have built socket provider factory library: net-socket-provider by maven.
How should I configure other module pom.xml dependencies to use net-socket-provider in compile and tests as bootclasspath/a:net-socket-provider-1.0.jar ?

When I configure dependency as system or compile I get:
java.lang.SecurityException: Prohibited package name: java.net
        at java.lang.ClassLoader.preDefineClass(ClassLoader.java:480)
        at java.lang.ClassLoader.defineClassCond(ClassLoader.java:626)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
        at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:248)

at line:
        Socket.setSocketImplFactory(new MySocketFactory());

When I call by hand:
javac/java  -Xbootclasspath/a:net-socket-provider-1.0.jar ....
everything works correctly.

Answer : maven bootclasspath append

depends how you are running your tests, foir example surfire provides options you could use to pass option

http://maven.apache.org/plugins/maven-surefire-plugin/test-mojo.html
Random Solutions  
 
programming4us programming4us