Le mar. 15 avr. 2025 à 01:10, Martin Desruisseaux <
martin.desruisse...@geomatys.com> a écrit :

> 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.
>

Depends if exported or not, but if it is an interface or abstract class
just to enable the module itself pluggability and testability you still
need to do some homework.
As of today it works - without jpms - so we are going to support JPMS we
should not have much regressions IMHO, in particular when we know how to
handle them (threads from end of 2023 gave most solutions even if not neat
with maven at that time).


>
>
> > 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.
>

I'm not sure how to read that but putting your file in the pom is not crazy
for a build system based on a pom.xml file, is it?
The feedback on ^^ is exactly that: it is not consistent with maven.
What would you say if I do a PR, merge in rc4 and say: ok, now you put your
dependencies in src/main/dependencies.txt, your plugins in
src/main/plugins.d/myplugin.txt and so on?
This is my only concern about your proposal and the fact to put JVM option
in the pom was debated before the type change passed - whatever we like it
or not, now it is passed there is no real debate to have jvm options there
as well IMHO.


>
>      Martin
>
>

Reply via email to