/www/tags/NOV_07_2009/htdocs/users-guide/plugin-implement-building.html
HTML | 41 lines | 41 code | 0 blank | 0 comment | 0 complexity | e4faf8447eb37587cef2fd1569a4176e MD5 | raw file
Possible License(s): BSD-3-Clause, AGPL-1.0, Apache-2.0, LGPL-2.0, LGPL-3.0, GPL-2.0, CC-BY-SA-3.0, LGPL-2.1, GPL-3.0, MPL-2.0-no-copyleft-exception, IPL-1.0
- <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>The build.xml Ant build file</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2"><link rel="start" href="index.html" title="jEdit 4.3 User's Guide"><link rel="up" href="plugin-implement.html" title="Chapter 18. Implementing a Simple Plugin"><link rel="prev" href="plugin-implement-docs.html" title="Plugin Documentation"><link rel="next" href="plugin-implement-reloading.html" title="Reloading the Plugin"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">The build.xml Ant build file</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="plugin-implement-docs.html">Prev</a> </td><th width="60%" align="center">Chapter 18. Implementing a Simple Plugin</th><td width="20%" align="right"> <a accesskey="n" href="plugin-implement-reloading.html">Next</a></td></tr></table><hr></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="plugin-implement-building"></a>The build.xml Ant build file</h2></div></div></div><p>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.</p><p>Publicly released plugins include with their source a makefile in
- XML format for the <span class="application">Ant</span> utility. The format
- for this file requires few changes from plugin to plugin. Here is a
- version of <code class="filename">build.xml</code> that could be used by
- QuickNotepad:</p><div class="informalexample"><pre class="programlisting">
- <project name="QuickNotepad"
- default="build">
- <description>
- This is an ant build.xml file for building the QuickNotepad plugin for jEdit.
- </description>
- <property name="user-doc.xml"
- value="users-guide.xml" />
- <property file="build.properties" />
- <property file="../build.properties" />
- <property name="build.support"
- value="../../../build-support" />
- <import file="${build.support}/plugin-build.xml" />
- </project>
- </pre></div><p>This build file imports another modular build file,
- <code class="literal">plugin-build.xml</code> from the <code class="literal">build-support</code>
- project. It is available as a package you can check out from subversion, or found online in the <a class="ulink" href="https://jedit.svn.sourceforge.net/svnroot/jedit/build-support/trunk/" target="_top">jEdit's
- SVN repository</a>. It contains the common build steps used to build the core jEdit plugins, and some example <code class="literal">build.properties.sample</code> files which you can adapt for use with your development environment.</p><p>Customizing this build file for a different plugin will likely
- only require three changes to build.xml file:</p><div class="itemizedlist"><ul type="disc"><li><p>the name of the project</p></li><li><p>the dependencies of the plugin</p></li><li><p>The extra files that need to be copied into the
- jar.</p></li></ul></div><p>Because this build file and the one of most plugins import a
- <code class="literal">build.properties</code> file from the current and the parent
- directories, it is possible to build most of jEdit's plugins in a
- uniform way by setting the common properties in a single
- <code class="literal">build.properties</code> file, placed in the plugin source's
- parent directory. </p><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Tip</h3><p>For a full discussion of the <code class="filename">Ant</code> file
- format and command syntax, you should consult the <a class="ulink" href="http://jakarta.apache.org/ant/manual/index.html" target="_top">Ant
- documentation</a>, also available through jEdit's help system if you
- installed the Ant Plugin. When editing Ant build files, the XML plugin
- gives you completion tips for both elements <span class="emphasis"><em>and</em></span>
- attributes. The Console plugin provides you with an ANT button which you
- can bind to keyboard actions. In addition, there are the AntFarm and
- Antelope plugins which also proivde you with alternate means to execute
- Ant targets through the Console.</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="plugin-implement-docs.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="plugin-implement.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="plugin-implement-reloading.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Plugin Documentation </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Reloading the Plugin</td></tr></table></div></body></html>