Skip to content

Add support for automatic module name#521

Draft
dmlloyd wants to merge 1 commit into
apache:masterfrom
dmlloyd:autoname-4.x
Draft

Add support for automatic module name#521
dmlloyd wants to merge 1 commit into
apache:masterfrom
dmlloyd:autoname-4.x

Conversation

@dmlloyd

@dmlloyd dmlloyd commented Jan 14, 2026

Copy link
Copy Markdown

Fixes #520 for the 4.x branch.

Following this checklist to help us incorporate your
contribution quickly and easily:

  • Your pull request should address just one issue, without pulling in other changes.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Each commit in the pull request should have a meaningful subject line and body.
    Note that commits might be squashed by a maintainer on merge.
  • Write unit tests that match behavioral changes, where the tests fail if the changes to the runtime are not applied.
    This may not always be possible but is a best-practice.
  • Run mvn verify to make sure basic checks pass.
    A more thorough check will be performed on your pull request automatically.
  • You have run the integration tests successfully (mvn -Prun-its verify).

If your pull request is about ~20 lines of code you don't need to sign an
Individual Contributor License Agreement if you are unsure
please ask on the developers list.

To make clear that you license your contribution under
the Apache License Version 2.0, January 2004
you have to acknowledge this by using the following check-box.

@slachiewicz

Copy link
Copy Markdown
Member

@desruisseaux aby comment on this?

@desruisseaux

Copy link
Copy Markdown
Contributor

My initial comment was on #520. There are also useful replies below it. I see two aspects to consider:

A first aspect is that this feature can be seen as a shortcut making possible to write in 3 lines of pom.xml code what currently requires 7 lines. However, I think that having many ways to do the same thing can be a source of confusion. If configuring the automatic module name in a poml.xml file was difficult, it would be a strong argument in favour of an alternative way. But if (except for the second aspect below) it only saves 4 lines of code, I tend to value more the consistency aspect even at the cost of a little bit of verbosity.

A second aspect is that apparently, the current way is difficult if we want to set the automatic module name through a property on the command-line. But I agree with @elharo comment that module name should be part of the versioned code, and therefore be written in the pom.xml if it cannot be written in module-info.java. If nevertheless there is really a strong demand for setting the module name from the command line, I would be more in favour of investigating why the current approach does not work and if it could be fixed.

@slachiewicz slachiewicz marked this pull request as draft June 14, 2026 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add easy support for automatic module name

3 participants