slachiewicz opened a new pull request, #1350: URL: https://github.com/apache/maven-site-plugin/pull/1350
`site:run` rendered pages on the JDK HTTP server's own threads. Maven's execution scopes are thread-bound to the Mojo thread, so a Doxia component from a site dependency that injects `MavenProject` (such as the Asciidoctor parser) failed on every page with `OutOfScopeException`, while `site:site` worked. The server now hands its requests to an executor that runs them on the Mojo thread, so pages are rendered one request at a time. `MojoExecutionScope` itself lives in a package Maven does not export to plugins, so entering it from the plugin is not an option. A request that fails with an unexpected exception now gets a 500 with the message and a logged stack trace; before, the JDK server dropped the connection without any output. Fixes #987 Verified: a parser whose constructor injects `MavenProject`, run with `site:run` on Maven 3.9.16 → before: empty reply, `OutOfScopeException` in `DefaultParserManager.getParser`; after: `200 OK` with the injected artifactId in the page. Not run on Maven 4. -- 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]
