modules and tests

Robert Scholte rfscholte at apache.org
Fri Nov 25 10:48:37 UTC 2016


On Thu, 24 Nov 2016 15:39:19 +0100, Remi Forax <forax at univ-mlv.fr> wrote:

> setting command line arguments or using a build tool to fiddle them for  
> you is exactly what we do not want here! We want fidelity between the  
> compile time configuration and the runtime configuration. Having to play  
> with -Xpatch at runtime is conceptually exactly like setting the  
> classpath. I don't want to explain to the Java devs that we have  
> fidelity between compile-time and runtime on source code but not on test  
> code.

I agree on this one. I've been thinking about this a lot and I'm wondering  
if this is a Java issue or test-tool issue.
What I see with JUnit is that everything is added to the (class)path. I've  
been wondering if having separate arguments for the main classes and test  
classes would make it possible to prevent the patch argument while  
chaining classloaders.
e.g. java -jar junit.jar -DmainPath=<arg> -DtestPath=<arg> ...<moreArgs>

in Maven terms: mainPath will contain all compile-dependencies, testPath  
will contain all test-dependencies WITHOUT the compile-dependencies.

However, is this enough to support split packages?

Robert


More information about the jigsaw-dev mailing list