You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Enrico Olivelli (JIRA)" <ji...@apache.org> on 2018/06/23 19:18:00 UTC

[jira] [Comment Edited] (SUREFIRE-1476) useSystemClassLoader=false doesn't work as expected after 2.8.1

    [ https://issues.apache.org/jira/browse/SUREFIRE-1476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16521235#comment-16521235 ] 

Enrico Olivelli edited comment on SUREFIRE-1476 at 6/23/18 7:17 PM:
--------------------------------------------------------------------

I am looking into this.

In current master useSystemClassLoader seems pretty unused.

I will check why it disappeared in 2.9, I hope we won't need to introduce some kind of "useIsolatedClassloader" flag.

As far as I can see [~ikelly] would like to have IsolatedClassLoader even when using forks > 0.

With forks = 0 IsolatedClassLoader is important in order to keep application code "isolated" from Maven classpath, but with forcks > 0 we are in a "forked" JVM....we are adding only the "forked booter" classes to the application, so I still it is not clear to me what we have to protect.

 

I need to go back to the code in BookKeeper when we found this issue


was (Author: eolivelli):
I am looking into this.

In current master useSystemClassLoader seems pretty unused.

I will check why it disappeared in 2.9, I hope we won't need to introduce some find of "useIsolatedClassloader" flag.

As far as I can see [~ikelly] would like to have IsolatedClassLoader even when using forks > 0.

With forks = 0 IsolatedClassLoader is important in order to keep application code "isolated" from Maven classpath, but with forcks > 0 we are in a "forked" JVM....we are adding only the "forked booter" classes to the application, so I still it is not clear to me what we have to protect.

 

I need to go back to the code in BookKeeper when we found this issue

> useSystemClassLoader=false doesn't work as expected after 2.8.1
> ---------------------------------------------------------------
>
>                 Key: SUREFIRE-1476
>                 URL: https://issues.apache.org/jira/browse/SUREFIRE-1476
>             Project: Maven Surefire
>          Issue Type: Bug
>            Reporter: Ivan Kelly
>            Priority: Major
>
> I have a test case where I want to load a bunch of jars in a custom classloader, and check that they are isolated from the classes in the classloader within which the test is running. This is for BC testing elsewhere in my code.
>  
> See
> [https://github.com/ivankelly/bookkeeper/blob/faa9f6db6f6861b9579be441227621bb06f0fac8/tests/integration-tests-utils/pom.xml]
>  
> Run test in that module to see it work correctly. Change the surefire plugin to a newer version to see it fail. The problem seems to be that all dependencies are being added to the classpath of the forked processes, so no matter what happens, they are in the system class loader.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)