How to Set-Up a Development Environment for Oxygen XML WebApp Component Plugins

This procedure describes a development environment that can be used to increase your productivity in writing plugins for the Oxygen XML WebApp Component.

You will need a recent Eclipse EE.
Developing a plugin for the Oxygen XML WebApp Component might require repetitive coding-testing cycle. Since the process of building a whole SDK project requires a full Maven build, the whole process might prove to be time consuming. The following procedure provide a faster alternate way of testing the plugin:
  1. Setup an SDK sample project as described in the oXygen XML SDK tutorial.
  2. Create a new plugin project as a sub-module of the oxygen-sample-plugins module (from the SDK) or start from one of the existing sample plugins.
  3. Follow these instructions to run the Oxygen XML WebApp Component in a Tomcat server.
  4. Look in the Tomcat logs (or in the console) for a line like "Loading plugins from: ${path}" and note the path of the plugins folder.
  5. In the plugins folder, create a sub-folder with a name of your choice (for example, myplugin).
  6. In that folder (myplugin), create a plugin.redirect file that contains the path to your plugin project (created in step 2) on a single line.
  7. Import your plugin project in Eclipse.
    1. Click File > Import.
    2. Choose Existing Maven Project.
    3. Browse for the location of your plugin.
  8. Modify the plugin.xml file to add a library reference to the directory where Eclipse places the compiled output.
    With the default setup of a Maven project, this step requires that you add the following element:
    <library name="target/classes/"/>
  9. You can now open a document in the Oxygen XML WebApp Component and it will automatically load your plugin.
    Every time you make changes to the plugin sources, you will need to restart the Oxygen XML WebApp Component.
Once you are happy with the result, you need to add the plugin back in your SDK project and follow these instructions to perform a final testing of the project.