+1 to drop any magic by default in a new major, seems the most reliable for end users.
Romain Manni-Bucau @rmannibucau <https://twitter.com/rmannibucau> | Blog <https://rmannibucau.metawerx.net/> | Old Blog <http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> | LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book <https://www.packtpub.com/application-development/java-ee-8-high-performance> Le mar. 12 sept. 2023 à 12:37, Martin Desruisseaux < martin.desruisse...@geomatys.com> a écrit : > 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 > >