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
PHP hosting transfer problem
VB.NET 2008 Get resource file as IO.Stream
Export mailbox excluding contacts
Add text to text box based on click of checkbox...
editing CSV file in VB. Visual Studio 2010 used.
How to forcefully apply the Group policy to all the computers in SBS 2008 environment ?
How to Prevent tampering with table data?
Not a single group-group function
How do I automatically move to the next cell when I enter a single-digit number?
Calling PHP Function from Javascript - Ext-JS