How to hot deploy when developing rendering macros in Java?

Dear XWiki community,

I’m very new in the world of XWiki development.
I want to develp a rendering macro in Java.
Therefore, I’ve created a new Maven project in Eclipse by using the Maven archetype “xwiki-rendering-archetype-macro”.
Calling “maven install” works properly.
I have a local XWiki instance running, and when I copy the macro jar to WEB-INF/lib directory and restart the local XWiki server than things are working fine.
The solution by using my local maven repository “~/.m2/repository” and XWiki’s extension manager did not work in my environment (maybe I have some configuration issue here).
Nevertheless, the two mentioned deployment methods are both not really suitable for a nice developer experience.
So my question: Is there a way of developing rendering macros in Java with some kind of “Hot deployment” where the deployment will basically be perfomed automatically within seconds without any server restart and without having to do copy deployment artifacts manually?

Thank you very much in advance.

There’s no solution that works in seconds. We need to work on that…

See also Loading...

What I usually do:

  • Use the extension manager to upgrade the extension
  • In the extension’s pom.xml upgrade the version (e.g. from 1.0 to 1.0.1, then 1.0.2, etc) so that the extension manager proposes an upgrade
  • Rebuild with maven and then in the admin UI, upgrade the extension

See https://www.xwiki.org/xwiki/bin/view/Documentation/DevGuide/Tutorials/CreatingExtensions/#HUsingtheExtensionManager