You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "slachiewicz (via GitHub)" <gi...@apache.org> on 2026/10/01 21:03:43 UTC

[PR] Build the parser, parser module and macro managers through ServiceLoader [maven-doxia]

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: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Build the parser, parser module and macro managers through ServiceLoader [maven-doxia]

Posted by "slachiewicz (via GitHub)" <gi...@apache.org>.
slachiewicz commented on PR #1110:
URL: https://github.com/apache/maven-doxia/pull/1110#issuecomment-6023149441

   Not needed: Maven 4 API mojos will inject Sisu components from their plugin realm through `javax.inject` (https://github.com/apache/maven/issues/13326), so the Maven 4 port injects this manager as on Maven 3. Tracked in https://github.com/apache/maven/issues/13309.


-- 
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: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Build the parser, parser module and macro managers through ServiceLoader [maven-doxia]

Posted by "slachiewicz (via GitHub)" <gi...@apache.org>.
slachiewicz closed pull request #1110: Build the parser, parser module and macro managers through ServiceLoader
URL: https://github.com/apache/maven-doxia/pull/1110


-- 
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: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org