I've seen that in a project with module-info.java, maven adds the modular jars (containing module-info.class or manifest property Automatic-Module-Name ), to the --module-path, and the rest of the jars to the -classpath.
But the spec states:
[...] It does not, however, mean that code in a named module can access types in the unnamed module. A named module cannot, in fact, even declare a dependence upon the unnamed module. This restriction is intentional[...]
From what I know packages from non-modular jars of the classpath are added to the unnamed module.
Since the modular project sources are not allowed to access types from the unnamed module, what is the purpose of adding any jars to the -classpath in the above case?