English 中文(简体)
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?

最佳回答

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?

问题回答

暂无回答




相关问题
Java 6 annotation processing configuration with Ant

I have a custom annotation and it s processor & processorFactory. How do I configure my Ant build file such that: The annotation processor is applied on annotated classes and generates source ...

How do I customise date/time bindings using JAXWS and APT?

Im using JAXWS 2.1.7, using some classes to run through JAXWS s apt to generate the WSDL. For dates, I use @XmlSchemaType(name="time") private Date wakeupTime; and this generates a schema ...

Eclipse compiler with APT

What is the correct way to call the Eclipse compiler with an APT processor from Java? I am using the following Maven dependency for the compiler <dependency> <groupId>org.eclipse.jdt....

Generating equals / hashcode / toString using annotation

I believe I read somewhere people generating equals / hashcode / toString methods during compile time (using APT) by identifying which fields should be part of the hash / equality test. I couldn t ...

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 ...

apt warning: no annotation processor found

I am just teaching myself about web services right now and trying to run a helloWorld. I think that to setup all of the web service stuff I need to run apt. I am running it like this: apt ...

热门标签