Where should I put unit tests when migrating a Java 8 project to Jigsaw
I am currently testing to migrate a Java 8 application to Java 9 / Jigsaw, using jdk-9+149. The project has been laid out in standard Maven directory layout, i.e. having src/main/java , src/test/java , etc. As soon as I add the module-info.java to src/main/java , maven-compiler-plugin fails throwing a NullPointerException. This is because it expects to find a module-info for the test directory, too. So, as far as I can see, the options are: keep test classes in a separate module, which means they can only access exported packages of the main module. move test classes into the main module,