Hi Jochen,
It is not possible to access package-private classes or members from another module, except by using the `--patch-module` option. But that option should be used only for testing purposes or as temporary patches, not in production.An alternative is to put the classes and methods that you want to share as public members in another package, then export that package using qualified export. For example, if a module A provides a package `foo` and if you want that only module A and B can access that package `foo`, the `module-info.java` file of module A can contains the following declaration: `export foo to B;`. It is the way to allow access to internal classes to only the modules of your choice.It is not always easy to do Java modules in Maven 3, because Maven 3 tries to make automatic choices. This is nice when the choices are what we want, but it becomes difficult otherwise. Maven 4 tries to give control back to developers, but the work is not finished. In particular, while the Maven Compiler plugin is ready, we have not yet updated the Maven Surefire plugin.
Apart from all of the above a good read if you don't already know: https://sormuras.github.io/blog/2018-09-11-testing-in-the-modular-world.html HTH Thorsten
OpenPGP_0x5A54BBB878225E08.asc
Description: OpenPGP public key
OpenPGP_signature.asc
Description: OpenPGP digital signature
