Repository navigation
Conversation
|
Don't you need to do this for |
|
Sure. I will update the PR shortly. |
|
Thanks for the PR. However, if we do this, we should do it consistently for all modules. And we can't change it later without breaking compatibility. Regarding the module name to use - I found this answer: https://stackoverflow.com/questions/43192741/how-should-i-name-my-java-9-module So we should probably use the following names:
It's maybe worth to update https://docs.pmd-code.org/latest/pmd_projectdocs_decisions_adr_3.html#project-structure-and-java-base-packages-names (https://github.com/pmd/pmd/blob/main/docs/pages/pmd/projectdocs/decisions/adr-3.md) as well to define and mention module names (and the mapping from maven modules to java modules). We already anticipated that (under consequences):
But it was not requested yet. Now you are the first one to request this... |
| <configuration> | ||
| <!-- overrides the configuration from parent pom: we have here no offline links yet --> | ||
| <offlineLinks combine.self="override"></offlineLinks> | ||
| <excludePackageNames>net.sourceforge.pmd.cache</excludePackageNames> |
There was a problem hiding this comment.
Had to exclude pmd.cache from javadoc, as there are no classes there, but checked that subpackages get included in the javadoc.
That's strange, maybe a bug in javadoc? We have at least a package-info.java file there, so we should not run into such a problem, should we?
There was a problem hiding this comment.
As I understand if module-info.java exist, javadoc goes into module mode and requires classes to be in the package.
Probably package-info.java does not count as a class.
|
Regarding module names: Names are important, so I ask you to confirm your decision, probably after discussing it in the team. I got the request that I should add an automatic-module-name header to all modules creating jar artifacts. OK. I found adr-3.md in the source, so I can change it. I assume there is some decision-making process related to it. What kind of input you need from me? Draft changes in this pull request? In the meantime I assume drafting changes to adr-3 is the way to go, so I will shortly add a commit with that. |
|
The scala artifact naming convention colludes with the java module system. As an example parsers_2.13-4.14.1.jar (a dependency) would become automatic named as parsers.2.13, which is not a valid java module name. Adding automatic-module-name to that would solve the situation, but I guess that for stable names there should be a naming convention in scala for module names. I checked the latest parser, and found neither automatic-module-name header, nor module-info. |
scala and visualforce uses artifact naming conventions clashing with the module system, and their ecosystem does not have module naming convention, so they got no header for now
e678237 to
6ee748d
Compare
|
No regression tested rules have been changed. (comment created at 2025-11-01 11:01:07+00:00 for 6ee748d) |
Describe the PR
Adds Automatic-Module-Name header to the MANIFEST.MF of pmd-core
Had to exclude pmd.cache from javadoc, as there are no classes there, but checked that subpackages get included in the javadoc.
Related issues
Ready?
./mvnw clean verifypasses (checked automatically by github actions)