Re: How to fix MNG-7855 (dependencies wrongly put on class-path rather than module-path)?

2023-09-12 Thread Romain Manni-Bucau
+1 to drop any magic by default in a new major, seems the most reliable for end users. Romain Manni-Bucau @rmannibucau | Blog | Old Blog | Github | LinkedIn

Re: How to fix MNG-7855 (dependencies wrongly put on class-path rather than module-path)?

2023-09-12 Thread Martin Desruisseaux
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

Re: How to fix MNG-7855 (dependencies wrongly put on class-path rather than module-path)?

2023-09-12 Thread Martin Desruisseaux
Le 2023-09-12 à 07 h 16, Henning Schmiedehausen a écrit : Maven spends a lot of time trying to deal with corner cases and I am not sure that we get them right. The thing is that putting a JAR on the module-path versus class-path can change application behaviour, no matter if JPMS or not.

Re: How to fix MNG-7855 (dependencies wrongly put on class-path rather than module-path)?

2023-09-11 Thread Romain Manni-Bucau
Hi, Le mar. 12 sept. 2023 à 09:16, Henning Schmiedehausen < henn...@schmiedehausen.org> a écrit : > I am not sure that we have to. I think that the discussion got derailed by > disagreement about the "automatic module name" entry in a jar. > > My interpretation of JEPS-261 is, that there are

Re: How to fix MNG-7855 (dependencies wrongly put on class-path rather than module-path)?

2023-09-11 Thread Henning Schmiedehausen
I am not sure that we have to. I think that the discussion got derailed by disagreement about the "automatic module name" entry in a jar. My interpretation of JEPS-261 is, that there are only two things: - JPMS modules, which have a module-info.class file at the root of the implementation jar -

Re: How to fix MNG-7855 (dependencies wrongly put on class-path rather than module-path)?

2023-09-05 Thread Romain Manni-Bucau
Le mar. 5 sept. 2023 à 14:12, Martin Desruisseaux < martin.desruisse...@geomatys.com> a écrit : > Le 2023-09-04 à 16 h 44, Romain Manni-Bucau a écrit : > > > I'd say open issues for the related plugins, several are known to be > > used (not sure about javadoc but others should). > Is the

Re: How to fix MNG-7855 (dependencies wrongly put on class-path rather than module-path)?

2023-09-05 Thread Martin Desruisseaux
Le 2023-09-04 à 16 h 44, Romain Manni-Bucau a écrit : I'd say open issues for the related plugins, several are known to be used (not sure about javadoc but others should). Is the class-path/module-path management duplicated by all modules? I do not know Maven internal, but I though that it

Re: How to fix MNG-7855 (dependencies wrongly put on class-path rather than module-path)?

2023-09-04 Thread Romain Manni-Bucau
Le lun. 4 sept. 2023 à 18:34, Martin Desruisseaux < martin.desruisse...@geomatys.com> a écrit : > Le 2023-09-03 à 16 h 53, Romain Manni-Bucau a écrit : > > > Think command line tuning is already possible. > This if true for many parameters, but not for class-path / module-path > as far as I can

Re: How to fix MNG-7855 (dependencies wrongly put on class-path rather than module-path)?

2023-09-04 Thread Martin Desruisseaux
Le 2023-09-03 à 16 h 53, Romain Manni-Bucau a écrit : Think command line tuning is already possible. This if true for many parameters, but not for class-path / module-path as far as I can see. It is easy to add parameters that were not added by Maven. But it is difficult to change parameters

Re: How to fix MNG-7855 (dependencies wrongly put on class-path rather than module-path)?

2023-09-03 Thread Romain Manni-Bucau
Think command line tuning is already possible. Pom changes are possible but mainly in build pom, not really in central pom until we invent a jpms.pom we add at deploy time (which is a bad idea) so yes but does not help you. Le dim. 3 sept. 2023 à 12:58, Martin Desruisseaux <

Re: How to fix MNG-7855 (dependencies wrongly put on class-path rather than module-path)?

2023-09-03 Thread Martin Desruisseaux
Hello Le 2023-09-03 à 06 h 15, Romain Manni-Bucau a écrit : The thing is you can't rely on the pom to know if you use a JPMS or not module cause most libs will not fill that and even if, then you never know if consumer wants that. The POM change proposal is not for specifying if a dependency

Re: How to fix MNG-7855 (dependencies wrongly put on class-path rather than module-path)?

2023-09-03 Thread Martin Desruisseaux
Le 2023-09-02 à 21 h 15, Henning Schmiedehausen a écrit : This is the piece that really makes me sad. We tend to get lost in "rightness" discussions and don't show pragmatism. In this case we have an opinion-free, objective criterion: make possible to pass to Java tools (java, javac, javadoc…)

Re: How to fix MNG-7855 (dependencies wrongly put on class-path rather than module-path)?

2023-09-02 Thread Romain Manni-Bucau
Hi, The thing is you can't rely on the pom to know if you use a JPMS or not module cause most libs will not fill that and even if, then you never know if consumer wants that. So you are stucked by design on being explicit on 200 entries paths with pom updates or not. So only way to build right

Re: How to fix MNG-7855 (dependencies wrongly put on class-path rather than module-path)?

2023-09-02 Thread Henning Schmiedehausen
On Sat, Sep 2, 2023 at 2:57 AM Martin Desruisseaux < martin.desruisse...@geomatys.com> wrote: > Hello Henning > > That migration would have been impossible with Maven, so we had to > switch to Gradle. Even then it was difficult, but it could be made much > easier with more adequate tooling

Re: How to fix MNG-7855 (dependencies wrongly put on class-path rather than module-path)?

2023-09-02 Thread Martin Desruisseaux
Hello Henning Thanks for sharing your experience. I agree that migrating a Maven project to JPMS can be difficult, and in some cases impossible with Maven (but possible with Gradle). However I believe that it is a Maven problem rather than a JPMS issue. JPMS is quite pleasant to use on the

Re: How to fix MNG-7855 (dependencies wrongly put on class-path rather than module-path)?

2023-09-01 Thread Henning Schmiedehausen
You will get zero participation in that case. I have one mailbox with my mailing lists that I check from time to time. If a discussion is not there, I will not go and look for it. Neither to a bug tracker (dozens of projects and hundreds of issues with discussions) nor a chat system where tens of

Re: How to fix MNG-7855 (dependencies wrongly put on class-path rather than module-path)?

2023-09-01 Thread Henning Schmiedehausen
Hello fellow Maven & JPMS struggler! I summarized the state of things for Jdbi here: https://github.com/jdbi/jdbi/blob/master/JPMS-SUPPORT.md My current belief is that there is no good path forward for projects to transition from non-JPMS to JPMS unless you are willing to rework your maven

Re: How to fix MNG-7855 (dependencies wrongly put on class-path rather than module-path)?

2023-08-29 Thread Elliotte Rusty Harold
On Mon, Aug 28, 2023 at 12:25 PM Martin Desruisseaux wrote: > > > Meta-point: it's easier to keep long term track of discussions like > > this if they're in the issue tracker instead of the mailing list. > > We have https://issues.apache.org/jira/browse/MNG-7855. Should it be a > wiki or a

Re: How to fix MNG-7855 (dependencies wrongly put on class-path rather than module-path)?

2023-08-28 Thread Martin Desruisseaux
Le 28/08/2023 à 14:24, Martin Desruisseaux a écrit : Rational: a direct dependency may be known to be compatible with both the class-path and module-path (e.g. it may duplicate "module-info" into "META-INF/services/"), but maybe some transitive dependencies are not. Another argument for

Re: How to fix MNG-7855 (dependencies wrongly put on class-path rather than module-path)?

2023-08-28 Thread Martin Desruisseaux
Le 28/08/2023 à 13:30, Elliotte Rusty Harold a écrit : > On Mon, Aug 28, 2023 at 8:49 AM Martin Desruisseaux wrote: >>   * Long term solution would be to change the POM model by expanding the >> section for controlling on an individual basis how to >> handle each dependency. > > How

Re: How to fix MNG-7855 (dependencies wrongly put on class-path rather than module-path)?

2023-08-28 Thread Elliotte Rusty Harold
On Mon, Aug 28, 2023 at 8:49 AM Martin Desruisseaux wrote: > > Hello again > > What about the following proposal for addressing MNG-7855? > > * Long term solution would be to change the POM model by expanding the > section for controlling on an individual basis how to > handle each

Re: How to fix MNG-7855 (dependencies wrongly put on class-path rather than module-path)?

2023-08-28 Thread Martin Desruisseaux
Hello again What about the following proposal for addressing MNG-7855? * Long term solution would be to change the POM model by expanding the section for controlling on an individual basis how to handle each dependency. * Short term solution would be to add a configuration element in

How to fix MNG-7855 (dependencies wrongly put on class-path rather than module-path)?

2023-08-26 Thread Martin Desruisseaux
Hello all MNG-7855 [1] is a quasi-blocker issue (at least a major impediment) for migration to JPMS. I can try to provide a patch, but I'm not familiar with Maven internal and would need guidance. Another issue is that fixing this bug probably requires the addition of a new option, which