开发者

Adding a bootstrap classpath when testing with Maven

开发者 https://www.devze.com 2023-04-05 04:14 出处:网络
My library requires me to bootstrap the JVM in order to run it. In case you do not know, if you pass a jar to the JVM with the -bootstrap option, you can override (substitute) any Java library impleme

My library requires me to bootstrap the JVM in order to run it. In case you do not know, if you pass a jar to the JVM with the -bootstrap option, you can override (substitute) any Java library implementation like java.lang.String, etc.

So all I need to do is tell Maven that when it runs my tests it include the -bootclasspath option with my jar/classes.

Is that possible with Maven? Maybe maven will have to bootstrap itself, if the JVM is not able to add new bootstrap classes on-the-fly as it is able to add new classes/jar to the class开发者_JAVA百科path?


Have you tried the argLine and the forkMode parameters of the surefire plugin?

0

精彩评论

暂无评论...
验证码 换一张
取 消