A possible improvement to Maven default behaviour (when no option is
provided by the user) could be as below. The current rule followed by
Maven is to put a JAR on the module-path if and only if the two
following conditions are true:
1. The JAR is JPMS
2. The application using that JAR is itself JPMS
I think that condition 2 should be simply dropped by default, but that
would be an incompatible change. So an alternative could be to add the
following rule:
* If the JAR declares services in `module-info.class` without
repeating them in `META-INF/services`, then those services are never
going to work on the class-path. Always put this JAR on the
module-path, no matter if the application using it is JPMS or not.
Inconvenient: it would complexify yet more the current set of rules.
Martin