You are viewing a plain text version of this content. The canonical link for it is here.
Posted to doxia-dev@maven.apache.org by Wendy Smoak <ws...@gmail.com> on 2006/11/25 02:18:59 UTC
Doxia macros
I added a new macro under org.apache.maven.doxia.macros.swizzle. It has
/**
* @plexus.component role="org.apache.maven.doxia.macro.Macro"
* role-hint="swizzle"
*/
public class SwizzleMacro
extends AbstractMacro {
...
It's here: http://wiki.wsmoak.net/cgi-bin/wiki.pl?Doxia/SwizzleMacro
I recompiled doxia-core, then added a <dependency> to
maven-site-plugin in pom.xml to convince it to use the new version.
That worked, based on the output of 'mvn site -X' and the println
statements I added to the snippet macro.
But,
%{swizzle|project=STR}
in index.apt just gets me
<p>%<a name="swizzleprojectstr">swizzle|project=STR</a></p>
in the page source, while
%{snippet|id=modello-model|url=http://svn.apache.org/repos/asf/maven/archetype/trunk/maven-archetype/maven-archetype-model/src/main/mdo/archetype.mdo}
works fine
(I'm testing with guide-using-modello.apt in maven-site.)
Neither the existing snippet macro nor my new one would work with 'mvn
site' in maven-war-plugin, btw. In maven-site, the snippet macro
works, but not mine.
Any ideas?
--
Wendy
Re: Doxia macros
Posted by Jason van Zyl <ja...@maven.org>.
On 25 Nov 06, at 3:24 PM 25 Nov 06, Wendy Smoak wrote:
> On 11/24/06, Wendy Smoak <ws...@gmail.com> wrote:
>
>> But,
>> %{swizzle|project=STR}
>> in index.apt just gets me
>> <p>%<a name="swizzleprojectstr">swizzle|project=STR</a></p>
>> in the page source, while
>> %{snippet|id=modello-model|url=http://svn.apache.org/repos/asf/
>> maven/archetype/trunk/maven-archetype/maven-archetype-model/src/
>> main/mdo/archetype.mdo}
>> works fine
>
> Found it... macros in apt must be at the left margin, not indented.
> Now, it works.
>
Woo hoo!
Now you could make a macro archetype, put them in a separate build
and then you could just drop your macro JARs in your ${MAVEN_HOME}/
lib directory and should work :-)
Jason.
> --
> Wendy
>
Re: Doxia macros
Posted by Wendy Smoak <ws...@gmail.com>.
On 11/24/06, Wendy Smoak <ws...@gmail.com> wrote:
> But,
> %{swizzle|project=STR}
> in index.apt just gets me
> <p>%<a name="swizzleprojectstr">swizzle|project=STR</a></p>
> in the page source, while
> %{snippet|id=modello-model|url=http://svn.apache.org/repos/asf/maven/archetype/trunk/maven-archetype/maven-archetype-model/src/main/mdo/archetype.mdo}
> works fine
Found it... macros in apt must be at the left margin, not indented.
Now, it works.
--
Wendy