Hello again

What about the following proposal for addressing MNG-7855?

 * Long term solution would be to change the POM model by expanding the
   <dependency> section for controlling on an individual basis how to
   handle each dependency.
 * Short term solution would be to add a configuration element in all
   Maven plugins executing Java code (maven-surefire-plugin,
   exec-maven-plugin, other?) for specifying the *default* rule for
   class-path versus module-path dispatching. That default rule would
   be used when the <dependency> section does not specify how to handle
   a specific dependency.

The maven-surefire-plugin already provide the following option:

   <configuration>
      <useModulePath>true</useModulePath>
   </configuration>

I propose to deprecate the use of "true" or "false" values and replace them by the following enumeration values:

 * never — equivalent to the current "false" value: put everything on
   the class-path, including modularized dependencies.
 * autoIfModularizedProject — equivalent to the current "true" value.
   Same as "auto" but enabled only if the project is itself
   modularized. Provided for compatibility with current behavior, but I
   would not recommend that mode.
 * auto — determined automatically from whether the dependency is
   modularized. This is what the default mode should have been in my
   opinion.
 * always — unconditionally put everything on the module-path, even
   non-modularized dependencies. Yes it works, and sometime is desirable.

What would be the process for moving forward? Do I need to write the proposal in some Change Request form? Or do I prepare a pull request directly? In the later case, can someone point me to the Surefire code to edit?

    Thanks,

        Martin

[1]https://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html#usemodulepath

Reply via email to