The goal of this tutorial is to describe a way to setup Eclipse to be able to :

  • edit web files (javascript, images, ...) in and automatically publish them in a running instance of XWiki without restarting it
  • edit and debug java without restarting XWiki instance

All these tricks helps to improve the programming speed a lot.


  • Knowledges:
    • This tutorial does not explain how Eclipse/JDT works and how to install Eclipse plugins
    • You should already know how to build XWiki using maven and also how maven generally works, how to create pom.xml, etc. You can look at Building XWiki.
    • You should take a look at general XWiki sources repository structure.
  • Tools

Get the source for XWiki

Clone platform repository (see somewhere in your computer different from your Eclipse workspace.

git clone [email protected]:xwiki/xwiki-platform.git

or replace [email protected]:xwiki/xwiki-platform.git by your own fork of platform.

Setting Eclipse

To be able to launch XWiki into Eclipse and debug it we will create a WTP project which will be a mirror of the product web we want to work on. Here it's XWiki Enterprise Manager.

  1. Checkout xwiki-debug-eclipse project
    Clone it from [email protected]:xwiki/xwiki-debug-eclipse.git and look at the README file instructions.
    Make sure to import it as Eclipse project and not as Maven project or it could break several pre-configured properties and it contains Eclipse linked resources based folders/files.
  2. Import and link maven jar projects to debug
  3. Start XE Web Debug Project
  4. Troubleshoots
  5. Enjoy emoticon_smile

Other useful tricks/tools

  • To dynamically validate your java code on XWiki codestyle you should use and configure Eclipse Checkstyle plugin (Note that this is already installed and configured in Yoxos Eclipse distribution for XWiki).
  • Look at DevelopmentTools for a list of usefull development tools.
  • You can use XEclipse to edit wiki pages : XEclipseExtension.


Created by Thomas Mortagne on 2008/04/08 20:14

Get Connected