fix configuration page generation - #12657
Conversation
gnodet
left a comment
There was a problem hiding this comment.
Thanks for tracking down the RC5→RC6 regression in the configuration page generation, @hboutemy.
The approach of adding maven-core and maven-compat as plugin dependencies in the root pom creates a reactor cycle, which is confirmed by CI:
- The
graphprofile auto-activates on non-Windows systems (via<os><family>!windows</family></os>), so the plugin dependency onmaven-core:${project.version}is always visible to the reactor. - This creates the cycle:
maven-api-annotations → maven-api (parent) → maven (root) → maven-core → maven-api-annotations. - The cycle prevents all Maven commands from succeeding on a clean checkout — including the initial
mvn installmentioned in the PR description.
I see you already noted "need more rework" — a possible direction could be moving the configuration page generation to a submodule that sits later in the reactor order (e.g., apache-maven), which can legitimately depend on maven-core without creating a cycle.
This review was generated by an AI agent and may contain inaccuracies. Please verify all suggestions before applying.
Claude Code on behalf of gnodet
| <version>${resolverVersion}</version> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.apache.maven</groupId> |
There was a problem hiding this comment.
Adding maven-core with ${project.version} as a plugin dependency in the graph profile of the root pom introduces a reactor cycle (maven-api-annotations → maven-api → maven → maven-core → maven-api-annotations). Since the graph profile auto-activates on non-Windows, this breaks all Maven commands on a clean checkout.
Consider relocating the page generation step to a leaf module (e.g., apache-maven) that can depend on maven-core without creating a cycle.
|
in fact I'm surprised it worked in the past, but not any more now in addition, looking at https://maven.apache.org/ref/4.0.0-rc-5/maven-configuration.html some parameters are for Maven 4.1.0 but we're still in Maven 4.0.0 |
|
@slawekjaranowski I tried to move the code to I don't really get all this: can you have a look at it, please? |
discovered while working on #12635 that lead to fixing #10961
it worked in RC5 https://maven.apache.org/ref/4.0.0-rc-5/maven-configuration.html
but is broken in RC6 https://maven.apache.org/ref/4.0.0-rc-6/maven-configuration.html
first PR adds necessary dependencies to have the generation step work
(notice: it requires
mvn installbeforemvn site...)sadly, the rendering done after has issues: multi-line documentation breaks markdown table
need more rework