You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2019/03/11 03:45:04 UTC
[GitHub] [maven-surefire] cvictory commented on issue #222: [SUREFIRE-1647]
Delay load testClass, but to use myown classLoader
cvictory commented on issue #222: [SUREFIRE-1647] Delay load testClass, but to use myown classLoader
URL: https://github.com/apache/maven-surefire/pull/222#issuecomment-471394871
> > I will use my own DefaultLauncher, and we will use my own classLoader. And I need the testClass is loaded by myClassLoader. So I wish the class is lazy load.
>
> How do you configure Surefire to instantiate and use your `DefaultLauncher`, respectively your class loader?
There are something we should do:
1. exclude junit-platform-launcher. I need to use my own junit-platform-launcher.
```
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<classpathDependencyExcludes>
<classpathDependencyExcludes>org.junit.platform:junit-platform-launcher</classpathDependencyExcludes>
</classpathDependencyExcludes>
</configuration>
</plugin>
```
2. Refactor LauncherFactory and define in myown jar. In this class, I will use my own classLoader.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services