mavenaptdoxia

Placeholder substitution in a Maven APT page


I am working on Maven site documentation for some related projects, and I want to create a hyperlink from one site's documentation to another sites documentation. The wrinkle is that the URL for the link target depends on a Maven property.

I tried this:

{{{http://example.com/site/project-${some-prop}/some.html}the documentation}}

but the ${some-prop} placeholder doesn't get replaced, and the APT processor then gets confused by the first '}'. Escaping the { and } characters (e.g. $\{some-prop\} ) doesn't help, and the following doesn't work either:

{{http://example.com/site/project-${some-prop}/some.html}}

Is there some other way that I can accomplish this task? For example, is there a way to define a Doxia macro that could be used to substitute a URL that had the placeholder expanded?


Solution

  • Are you using version 2.0-beta-6 or later of the site plugin? Also, does your apt filename ends with a .vm extension (as described in the filtering section of Creating Content?