Microsoft
Software
Hardware
Network
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.SecurityExceptio
n: Prohibited package name: java.net
at java.lang.ClassLoader.preD
efineClass
(ClassLoad
er.java:48
0)
at java.lang.ClassLoader.defi
neClassCon
d(ClassLoa
der.java:6
26)
at java.lang.ClassLoader.defi
neClass(Cl
assLoader.
java:616)
at java.security.SecureClassL
oader.defi
neClass(Se
cureClassL
oader.java
:141)
at java.net.URLClassLoader.de
fineClass(
URLClassLo
ader.java:
283)
at java.net.URLClassLoader.ac
cess$000(U
RLClassLoa
der.java:5
8)
at java.net.URLClassLoader$1.
run(URLCla
ssLoader.j
ava:197)
at java.security.AccessContro
ller.doPri
vileged(Na
tive Method)
at java.net.URLClassLoader.fi
ndClass(UR
LClassLoad
er.java:19
0)
at java.lang.ClassLoader.load
Class(Clas
sLoader.ja
va:307)
at sun.misc.Launcher$AppClass
Loader.loa
dClass(Lau
ncher.java
:301)
at java.lang.ClassLoader.load
Class(Clas
sLoader.ja
va:248)
at line:
Socket.setSocketImplFactor
y(new MySocketFactory());
When I call by hand:
javac/java -Xbootclasspath/a:net-sock
et-provide
r-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/pl
ugins/mave
n-surefire
-plugin/te
st-
mojo.ht
ml
Random Solutions
How to set value of a dropdown based on another dropdown
stored proc select and update where name field is null
Data Grid view
how to move email items from one folder to another on a schedule based on a date criteria in outlook.
How to monitor ReadyBoost usage?
connecting to mysql from asp.net ERROR
Automatically log into websites programmatically
Values in ASP.NET Radio Button List
fedora 13 can not connect to network
Web Page Building