slachiewicz opened a new pull request, #1110: URL: https://github.com/apache/maven-doxia/pull/1110
`DefaultParserModuleManager`, `DefaultParserManager` and `DefaultMacroManager` gain a static `fromServiceLoader(ClassLoader)` that builds them from `META-INF/services` instead of a Sisu container. A plugin written to the Maven 4 API cannot inject Sisu components from its own jars; with these it can create the managers and bind them with a `@Provides` method. The Sisu wiring is unchanged. Parsers, modules and macros are keyed by their `@Named` value, as Sisu does, and each manager holds one instance per implementation, matching the `@Singleton` components. The parser factory also wires a `MacroManager` built from the same loader and the `SinkWrapperFactory` providers into each parser, as Sisu injects them. A provider that cannot be loaded is skipped with a warning. `MarkdownParser` now creates its `MarkdownHtmlParser` itself when nothing injects one. `ServiceLoaderSupport` is public only so the three factories in different packages can share it. Each module's `ServiceLoaderManagersTest` checks that the services files list the same classes as the generated Sisu index. Same approach as apache/maven-scm#1418; context in apache/maven#13302. Verified: `mvn verify` → 690 tests (27 new), full reactor green. -- 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]
