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
Recommendations for a supersized, powerful laptop
SQL 2005
Using T-SQL Need to return first day of the 34th week last year.
Intraday Quotes
SQL Query - Combine 2 or more lines together
ForeFront Client install loses Windows shares
windows 2008 x64 R2 running on ESXi 4.1 hangs randomly
Hiding child windows from Taskbar
Banana ripening & heat
can't open .docx file