[xwiki-users] Adding velocity tools

Vincent Massol vincent at massol.net
Mon May 19 12:08:35 CEST 2008


Hi Sachin,

On May 19, 2008, at 11:52 AM, Sachin Mittal wrote:

>
> Hi,
> I wish to add some velocity tools which can be using from my velocity
> context.
> To start with I would like to add some generic tools like ListTool  
> provided
> by org.apache.velocity.tools.generic.

This is already included in 1.4.

> In future I would also like to add my custom tools.
>
> So is there any way that I can add these to xwiki via some config  
> files and
> use them in my .vm templates or wiki code.

In 1.4 you can do that by editing the components.xml file in xwiki- 
velocity jar (you can put a copy of it in web-inf/classes).  
Alternatively it might be possible to edit plexus.xml to provide an  
override of what's defined in components.xml but I haven't tried it yet.

Again please note that this has not been tested yet so I don't know  
precisely how to configure it but it should be possible.

Thanks
-Vincent



More information about the users mailing list