-----Original
Message-----
From: devs-bounces(a)xwiki.org [mailto:devs-bounces@xwiki.org] On
Behalf
Of Vincent Massol
Sent: Wednesday, May 13, 2009 1:33 PM
To: XWiki Developers
Subject: Re: [xwiki-devs] Creating a macro component
Hi Glenn,
On May 13, 2009, at 10:22 PM, <glenn_engel(a)agilent.com>
<glenn_engel(a)agilent.com
wrote:
I'm having a difficult time adding a java
macro and getting it to
get invoked.
I first found this page and created my class and created a META-INF/
plexus/components.xml per the 'tutorial' here:
http://dev.xwiki.org/xwiki/bin/view/Drafts/Tutorial+to+Write+a+Macro+in
+the+new+rendering+engine
I then found this tutorial for components
(
http://platform.xwiki.org/xwiki/bin/view/DevGuide/WritingComponents
) and created a META-INF/components.txt file and
added an
@Component("mymacro") annotation to the macro implementation.
Both ways are correct. The annotation way is the newer way of doing
it
though.
However, I am unable to get my macro code to get
called when pages
are rendered.
What version of XE are you using?
I don't get any error at all. The macro just shows up on the page as
I spelled it: {mymacro}