slachiewicz commented on issue #13302: URL: https://github.com/apache/maven/issues/13302#issuecomment-5914096491
### maven-reporting-impl PR: apache/maven-reporting-impl#254. Status: **blocked**, compiles but cannot render. 5.0.0-SNAPSHOT, Java 17. Verified locally: `mvn verify` with Maven 4.0.0-rc-7, JDK 21 → 3 unit tests pass (3 before); ITs 1 of 6 pass (6 before). Spotless clean. Only `setup-reporting-plugin`, which builds a v4 report mojo, passes. - `use-as-direct-mojo*` (4 ITs): `A required class was missing … org/apache/maven/execution/MavenSession`. A v4 plugin realm does not see maven-core, and Doxia's `SiteTool`/`SiteRenderer` signatures need `MavenProject`, `RepositorySystemSession` and a Maven 3 `Artifact`. - `use-as-site-report`: maven-site-plugin 3.22.0 fails with `Cannot cast CustomReportFactory to org.apache.maven.plugin.Mojo`, because the site plugin only accepts v3 mojos as reports. **Public API changes** - `AbstractMavenReport`: `extends AbstractMojo` → `implements org.apache.maven.api.plugin.Mojo`; `MavenProject` → `Project`; `MavenSession`/`MojoExecution` → injected v4 `Session`/`MojoExecution`; v4 `Log`. - Removed the protected fields `reactorProjects`, `repoSession`, `remoteProjectRepositories`, `siteTool` and `siteRenderer`, in favour of `getReactorProjects()`, `getSiteTool()` and `getSiteRenderer()`. - Subclasses must use `org.apache.maven.api.plugin.annotations` and maven-plugin-plugin 4.x. - `AbstractMavenReportRenderer` unchanged. **Gaps** - Doxia site tools expose Maven 3 types, so they can't be called from a v4 mojo. See maven-doxia-sitetools (wave 2). - Doxia components are Sisu components. v4 DI `@Inject` gives "No binding … SiteTool", and `Lookup.lookup(SiteTool.class)` does not see plugin-realm Sisu components. - No v4 site or report lifecycle: maven-site-plugin looks reports up as v3 mojos. - `org.apache.maven.api.Plugin` has no `getId()` (minor). **Consumers that break:** every report plugin that extends `AbstractMavenReport`: site, surefire-report, jxr, changelog, changes, checkstyle, javadoc, pmd, project-info-reports, artifact, dependency, invoker, plugin-report. **Recommendation:** keep reporting-impl on the Maven 3 API until doxia-sitetools and maven-site-plugin move. Porting in the order sitetools → site plugin → reporting-impl → reporting-exec is the only order that works. -- 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]
