brick_addVery easily register fast components defined using scripts
Developed by

Thomas Mortagne

Active Installs4
0 Votes
LicenseGNU Lesser General Public License 2.1

Installable with the Extension Manager


This tool allows registering components in a wiki page by defining a class in script and standard XWiki component annotations like you would in Java.

To do that you need to:

  • add a XWiki.ScriptComponentClass object to a page
  • select the script language you are going to use (default choices currently are Groovy or Python)
  • choose where it's going to be registered (for the current whole wiki, only for the author, for the whole farm)
  • write the component and indicate the role, hint and dependency using the Java annotations (@Component, @Named, @Inject)
  • save and your component is automatically registered

Not that the author of the script needs programming right to use this feature.


See Component Module for more details about XWiki Components.

Use it in an extension

If you plan to use this feature in an extension you should add the module in your extension dependencies.

In Maven, you can add the following to your pom.xml file:


Prerequisites & Installation Instructions

We recommend using the Extension Manager to install this extension (Make sure that the text "Installable with the Extension Manager" is displayed at the top right location on this page to know if this extension can be installed with the Extension Manager).

You can also use the manual method which involves dropping the JAR file and all its dependencies into the WEB-INF/lib folder and restarting XWiki.


Dependencies for this extension (org.xwiki.contrib:scriptcomponent 1.0):


Get Connected