According to the guide, adding new components to XWiki involves putting the jar file into XE_WAR_HOME/WEB-INF/lib
. However I seem to then need to restart tomcat before I can use the new component. Is there a way around this restart? The component manager manages to install new components from a repository without restarting tomcat, so it seems possible in principle...
On a related point, even restarting tomcat doesn't appear to update an existing component if I replace a jar with an updated version with the same name. So can I explicitly trigger a reload in this case?
The guide has been updated in the mean time and show how todo this.
Note: Currently the following does not work when using jetty as container; see bug report at: http://jira.xwiki.org/browse/XWIKI-12781
In a nutshell: add your local maven repo to the
xwiki.properties
:(the other two lines are needed to re-add the "default" repos)
In the Wiki UI, install the Extension Tweak
Then for each build cycle:
mvn install
my.extension.group:my-extension-id
and version - ie.0.1-SNAPSHOT
)Because I didn't want to limit my answer to copying the "Howto" in the guide, here is a small script that should do the "reinstall" part (i.e. use it after running
mvn install
) for you:If you want to use this script, your must disable CSRF-Protection in
xwiki.properties
by setting:csrf.enabled = false
. (Alternatively you could modify the script by reading the csrf-token from the HTML in the response.)The script has no error handling. If you see no update after executing it, perform the steps outlined above to figure out what went wrong.