[ https://issues.apache.org/jira/browse/MSITE-1000?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17828482#comment-17828482 ]
Konrad Windszus edited comment on MSITE-1000 at 3/19/24 6:52 PM: ----------------------------------------------------------------- I think the most flexible way is to introduce a configuration leveraging {{Xpp3Dom}} and https://github.com/eclipse/sisu.plexus/blob/master/org.eclipse.sisu.plexus/src/main/java/org/codehaus/plexus/component/configurator/ComponentConfigurator.java (similar to what Maven does internally in https://github.com/apache/maven/blob/267de063eec17111688fd1a27d4e3aae6c8d0c51/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultMavenPluginManager.java#L717). That way the actual parameter names depend on the underlying parser and the injection would work the same as for Mojo parameters. This would just require {{doxia-site-tools}} to allow to pass a callback in the format {{Consumer<Parser> parserConfigurator}}. was (Author: kwin): I think the most flexible way is to introduce a configuration leveraging {{Xpp3Dom}} and https://github.com/eclipse/sisu.plexus/blob/master/org.eclipse.sisu.plexus/src/main/java/org/codehaus/plexus/component/configurator/ComponentConfigurator.java. That way the actual parameter names depend on the underlying parser and the injection would work the same as for Mojo parameters. This would just require {{doxia-site-tools}} to allow to pass a callback in the format {{Consumer<Parser> parserConfigurator}}. > Allow parametrisation of Doxia parser per file > ---------------------------------------------- > > Key: MSITE-1000 > URL: https://issues.apache.org/jira/browse/MSITE-1000 > Project: Maven Site Plugin > Issue Type: New Feature > Components: doxia integration > Reporter: Konrad Windszus > Assignee: Konrad Windszus > Priority: Major > > Currently only the attributes used for rendering the site can be > parameterized in > https://maven.apache.org/plugins/maven-site-plugin/site-mojo.html#attributes. > There is no possibility to configure the parser in > https://github.com/apache/maven-doxia-sitetools/blob/dacaa552c1b8e89eed84db0f43b6b0a72be91d0c/doxia-site-renderer/src/main/java/org/apache/maven/doxia/siterenderer/DefaultSiteRenderer.java#L322 > per document. > This would be nice in the context of > https://issues.apache.org/jira/browse/DOXIA-722 where generation of anchors > should be switched on/off for certain documents. Also generation of comments > may be desirable for certain documents. > I propose the following additional plugin goal parameter: > {code} > <parserConfigurations> > <parserConfiguration> > <patterns> > <pattern>**/apt/**</pattern> > </patterns> > <emitAnchorsForIndexableEntries>false</emitAnchorsForIndexableEntries> > <emitComments>true</emitComments> > </parserConfiguration> > <parserConfigurations> > {code} > where {{parserConfigurations}} is an array of a complex type with (include) > patterns on the source path (String array) and boolean methods for features. > -- This message was sent by Atlassian Jira (v8.20.10#820010)