Request for a release of Maven Surefire

2023-11-30 Thread David Lloyd
Would it be possible to request that a committer initiate a release of
Maven Surefire? There are a couple of bugfixes that are blocking releases
of a couple of Red Hat projects and it would be good to get them cleared up
before everyone disappears for the holidays.

Thanks!

-- 
- DML • he/him


Re: Request for a release of Maven Surefire

2023-12-01 Thread David Lloyd
On Thu, Nov 30, 2023 at 1:40 PM Michael Osipov  wrote:

> On 2023/11/30 16:54:44 David Lloyd wrote:
> > Would it be possible to request that a committer initiate a release of
> > Maven Surefire? There are a couple of bugfixes that are blocking releases
> > of a couple of Red Hat projects and it would be good to get them cleared
> up
> > before everyone disappears for the holidays.
>
> I need to merge one more PR and then I will do the release.
>

Great, thank you!

-- 
- DML • he/him


Re: JPMS support, refactored proposal

2024-01-02 Thread David Lloyd
Apologies if this was already covered somewhere else, but would (or could)
path accumulation support multi-release JAR layouts for all cases (whether
it be modular or class-path JARs or filesystem paths)?

On Tue, Jan 2, 2024 at 10:13 AM Martin Desruisseaux <
martin.desruisse...@geomatys.com> wrote:

> Hello all
>
> Following the recommendations in the "Guidance on Maven 4 API issue"
> thread, I refactored the proposal. The new commits (only 2 at this time)
> replace the previous ones.
>
>
> Commit 1
>
> The first commit [1] adds the following constants in the API:
>
>   * In Type interface: POM, JAR, CLASSPATH_JAR, MODULAR_JAR,
> JAVA_SOURCE, JAVADOC, TEST_JAR (see note below for December 14 change).
>   * In DependencyProperties interface: FLAG_MODULE_PATH_CONSTITUENT,
> FLAG_PATCH_MODULE.
>
> The isAddedToModulePath() method is no longer introduced. Instead, this
> commit deprecates isAddedToClasspath() methods because checking this
> boolean value is not sufficient for determining if a dependency should
> be on the classpath.
>
> The change in the MavenProject class are only factorization for reducing
> code duplication and should not have behavioural impact. It is a
> side-effect of the previous version of JPMS support proposal, with the
> new methods removed.
>
> Note: I noticed that a commit on December 14th removed the POM, JAR,
> etc. constants from the Type interface. So I suspect that my first
> commit needs to be changed, but I'm not sure how. Where those constants
> are supposed to be now, or has the "type" approach changed?
>
>
> Commit 2
>
> The second commit [2] add a new "enumeration" in the API: PathType. This
> is actually implemented as a class for allowing extensions, but should
> be understood as an enumeration. The enumeration contains the following
> values:
>
>   * CLASSES for the --class-path option
>   * MODULES for the --module-path option
>   * UPGRADE_MODULES for the --upgrade-module-path option
>   * PROCESSOR_CLASSES for the --processor-path option
>   * PROCESSOR_MODULES for the --processor-module-path option
>   * AGENT for the -agentpath option
>   * DOCLET for the -doclet option
>   * TAGLET for the -tagletpath option
>   * patchModule(String moduleName) for the --patch-module option
>
> The latter is the reason why this enumeration cannot be a
> java.lang.Enum. Another reason is for allowing plugins to define their
> own enumeration values. Then, this commit add a new method in
> DependencyResolverResult:
>
> Map> getDispatchedPaths();
>
> Above method is like getPaths(), but returns a distinct List for
> each PathType instead of a single list mixing all kinds of path. The
> PathType of each dependency is fully determined by the
> DependencyProperties, which are themselves determined by the Type (at
> least before the December 14th commit), except in the following cases:
>
>   * If the type is "jar" instead of "classpath-jar" or "modular-jar",
> then an heuristic rule similar to Maven 3 is applied.
>   * If the type is "test-jar", a more complex analysis is done for
> inferring the --patch-module option value.
>   * The main and test output directories also needs some analysis for
> inferring which Java 9+ compiler layout is used (package hierarchy
> versus module hierarchy).
>
> Finally, this commit adds an implementation of above methods. In the
> DefaultDependencyResolver class, the DefaultDependencyResolverResult
> inner class has been extracted as a top-level class for making room for
> more development. Then the resolve(DependencyResolverRequest) has been
> refactored, but this refactoring should not change the way that the
> existing `dependencies` and `paths` collections were populated. Then new
> codes were added for populating the above-cited `dispatchedPath` map.
>
> This is not yet tested, but before working on tests and would like to
> know what need to be changed (I suspect some changes will be needed,
> e.g. regarding Type constants).
>
>  Thanks,
>
>  Martin
>
>
> [1]
> https://github.com/Geomatys/maven/commit/d05c51bd0f5fa5610b744ef66f159128303a67d7
> [2]
> https://github.com/Geomatys/maven/commit/322dffddeb18d7acaea4a3670966dd5f8aeb4add
>


-- 
- DML • he/him


Re: Proposal: new default directory layout for modular project

2025-05-15 Thread David Lloyd
I'll start by saying that it definitely should not be 3, because you will
not be able to tell by structure (for certain) whether a directory
constitutes a module or whether it is some other kind of resource.

As someone who has been at least somewhat involved with the JPMS since the
beginning, and who has many projects which are modular already, I do not
think that it is necessary, useful, or wise to support multi-module
compilation from Maven or any other build tool. It is incompatible with MR
JAR production (which is far more useful and common in my experience) or
any other kind of layered compilation, and many of the advantages of this
style of compilation can be simulated in other ways. It really feels like
this is something that is being proposed because it's possible, not because
it is useful (or at least, useful enough to justify breaking useful
existing assumptions that a user or plugin developer could make).

On Thu, May 15, 2025 at 11:34 AM Martin Desruisseaux <
martin.desruisse...@geomatys.com> wrote:

> Hello all
>
> Currently, the default directory for source code in Maven 4 is:
>
> src/${scope}/${lang}
>
> Where ${scope} is "main" or "test" and ${lang} is "java" or "resources".
> However, in the case of a multi-modules JPMS projects, we need to add
> the module name somewhere. Notes:
>
>   * This change applies only to multi-modules projects. Non-modular
> projects, or modular projects with only one module, will see no change.
>   * The output directory of a multi-modules project also changes: it
> becomes target/classes/${module} where ${module} is inserted by
> javac itself. So the addition of a ${module} directory is an
> invention of this proposal.
>
> Three proposals have been discussed on the pull request #2278:
>
>  1. src/${module}/${scope}/${lang}
>  2. src/${lang}/${module}/${scope}
>  3. src/${scope}/${lang}/${module}
>
> Proposals 1 and 3 are the same as the current Maven convention with only
> ${module} added either at the beginning or at the end. Proposal 2 is
> more disruptive, but produces the most compact directory trees and takes
> in account the fact that each language has its own concept of modules
> with its own naming conventions. Proposals 1 and 3 are more
> conservative, with proposal 1 seing modules as a kind of sub-projects
> (files related to the same module are kept together) and proposal 3
> rather seing the module system as an extension of the package system.
> These 3 proposals are described in more details there, together with
> examples:
>
>
> https://cwiki.apache.org/confluence/display/MAVEN/Default+directory+for+modular+projects
>
> What peoples think that the default should be?
>
>  Martin
>
>

-- 
- DML • he/him