Yes, precisely. It's not because your library works when you use class directory + resources, that once packaged, it still works. And since there's a recommendation to use mrjars to package module-info.class in the case of a library targetting both classpath (pre java 9 and java 9) and module path (java 9+), it's important to check both. Before, you could afford unit testing only with the class directory variant, but that's not so evident anymore.
2018-03-27 10:29 GMT+02:00 Alan Bateman <alan.bate...@oracle.com>: > On 27/03/2018 08:15, Cédric Champeau wrote: > >> Dual testing is a minimum. In practice, it depends on the kind of tests. >> Typically, before JDK 9 for unit tests you never needed a jar to execute >> unit tests. Maven happens to built it, but in practice a class directory + >> resources is enough >> > This hasn't changed. You can put directories containing the test classes + > resources on the class path as before. When testing modules you can patch a > module to add the test classes (and resources) that are compiled into a > directory, no need for either the module or the tests to be packaged as JAR > files. > > Maybe your comment is about testing libraries that are Multi-Release JARs? > > -Alan. >