slawekjaranowski opened a new pull request, #13308:
URL: https://github.com/apache/maven/pull/13308

   ## What
   
   `maven-plugin-api/src/main/mdo/lifecycle.mdo` declares:
   
   ```
   xml.schemaLocation="https://maven.apache.org/xsd/lifecycle-${version}.xsd";
   <id>lifecycle-mappings</id>
   ```
   
   Modello builds the generated file name from the model `<id>`, so 
`modello:xsd` produced `lifecycle-mappings-1.0.0.xsd`, which does not match the 
`schemaLocation` advertised in the model, nor the name the schema is actually 
published under on the website 
(https://maven.apache.org/xsd/lifecycle-1.0.0.xsd).
   
   Until now the mismatch was papered over by renaming the file by hand when 
copying it to the site.
   
   ## How
   
   Change `<id>` to `lifecycle`. This is the value already used on `master` 
(`api/maven-api-plugin/src/main/mdo/lifecycle.mdo`), so the two lines converge.
   
   The model `<id>` only affects the file names produced by the xsd, xdoc and 
jsonschema generators — it has no effect on generated Java code. The xdoc page 
therefore becomes `lifecycle.html` instead of `lifecycle-mappings.html`, and 
the menu entry in `maven-plugin-api/src/site/site.xml` is updated accordingly.
   
   `<name>LifecycleMappings</name>` is deliberately **not** touched: it drives 
the generated class names (`LifecycleMappingsXpp3Reader`, …), so changing it 
would break source compatibility in the 3.x line. On `master` it was changed 
together with the id, but that happened as part of the Maven 4 Plugin API 
rework (23bca281fc, MNG-7947), where such a break was acceptable.
   
   ## Verification
   
   - `mvn verify -pl maven-plugin-api` — BUILD SUCCESS
   - after regenerating, 
`target/generated-site/resources/xsd/lifecycle-1.0.0.xsd` is byte-identical to 
the currently published `lifecycle-1.0.0.xsd`, so the published schema content 
does not change — only the generated file name
   - `target/generated-site/xdoc/lifecycle.xml` matches the updated site link
   - no remaining references to `lifecycle-mappings` in the tree
   
   ## Note
   
   `maven-3.9.x` carries the same mismatch; happy to open a separate backport 
if that line is still taking such changes.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to