Le 2025-04-14 à 19 h 43, Romain Manni-Bucau a écrit :

This is not always true, the common case is to inject a mock of an external
service to test an algorithm or alike.

If the service is a public interface, there is no need to patch a module for creating mocks.


I'd like all the JPMS to stay in the same location, hack or not.
I'm fine with both options: put it all in the pom or put it all in
jpms-whatever.hack, but it include all options and dependencies
"scope/target/type/option".

If there is a working proof of concept somewhere, we could compare the alternatives. Currently, we have the `module-info-patch` approach that anyone can test:

 * Download Maven 4.0.0-rc-3
 * Run "mvn install" on the "module-info-patch" branch of
   https://github.com/Geomatys/maven-compiler-plugin
 * For testing on a real project, run "mvn test-compile" on the
   "maven4" branch of https://github.com/Geomatys/sis
     o For browsing the interesting parts, see
       https://github.com/Geomatys/sis/tree/maven4/endorsed
         + The pom.xml file
         + Any src/*/test/module-info-patch.* file
 * Alternatively, anyone should be able to create their small project
   from scratch if
   https://github.com/Geomatys/maven-compiler-plugin/wiki/User-guide is
   clear enough.

If there are alternatives proposals, we need to see examples of what they would look like.

    Martin

Reply via email to