You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Herve Boutemy (Jira)" <ji...@apache.org> on 2022/12/04 10:28:00 UTC

[jira] [Commented] (DOXIA-677) Macro for printing project properties

    [ https://issues.apache.org/jira/browse/DOXIA-677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17642971#comment-17642971 ] 

Herve Boutemy commented on DOXIA-677:
-------------------------------------

I don't really get what macro you want to introduce, that will do what

but FYI, I lately had a discussion with Mybatis Spring project who wanted exactly that: easy ${project.version} replacement in their site

I proposed an approach based on Velocity (= "replace ## with #[[##]]#, ### with #[[###]]#, ..." ) that they did not like, giving a very good reason = "I prefer to use .md file instead of .vm file cannot render on GitHub UI." (see https://github.com/mybatis/spring/pull/759 for full discussion)

then I proposed an approach using maven-resources-plugin to do the filtering: https://github.com/mybatis/spring/pull/763

notice that the Velocity approach is already documented, even if (as usual) it's not easy to find: https://maven.apache.org/plugins/maven-site-plugin/examples/creating-content.html#common-issues-and-workarounds

> Macro for printing project properties
> -------------------------------------
>
>                 Key: DOXIA-677
>                 URL: https://issues.apache.org/jira/browse/DOXIA-677
>             Project: Maven Doxia
>          Issue Type: New Feature
>            Reporter: Slawomir Jaranowski
>            Priority: Major
>
> Many time we use Velocity only for resolving project properties like:
> {code}
> ${project.version}
> {code}
> Another case is that for Markdown we have conflicts
> Velocity uses # as a prefix for macros and ## as a prefix for comments
> but in Markdown those are used for headers
> So Doxia macro will be useful is such cases.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)