Compiling the Plugin

We have already outlined the contents of the user action catalog, the properties file and the documentation file in our earlier discussion. The final step is to compile the source file and build the archive file that will hold the class files and the plugin's other resources.

Publicly released plugins include with their source a makefile in XML format for the Ant utility. The format for this file requires few changes from plugin to plugin. Here is the version of build.xml used by QuickNotepad and many other plugins:

<project name="QuickNotepad"
         default="build">
    <description>
        This is an ant build.xml file for building the QuickNotepad plugin for jEdit.
    </description>
    
    <import file="../../build-support/plugin-build.xml" />
</project>

This build file imports another modular build file, plugin-build.xml included in the jEdit source tree, after jEdit 4.3pre5. It can be checked out individually, or found online in the jEdit's CVS repository. It contains common build steps for jEdit plugins, and some example properties files which you can adapt for use with your plugin. The file is imported with this line

  <import file="../../plugin-build.xml" />
  

For a full discussion of the Ant file format and command syntax, you should consult the Ant documentation site. Customizing this build file for a different plugin will likely only require three changes: