Ant build file to package Firefox's extension

Below is an example of Ant build file to package Firefox's extension.

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project basedir="." default="build" name="yourFirefoxExtName">
  <target name="build">
    <!-- JAR the content of your chrome/ folder -->
    <jar destfile="${}.jar">
      <fileset dir="chrome">
        <exclude name="${}.jar"/>
    <!-- Create XPI file. -->
    <move file="${}.jar" todir="chrome" overwrite="yes" />
    <zip destfile="${}.xpi" basedir=".">
        <include name="chrome/${}.jar"/>
        <include name="chrome.manifest"/>
        <include name="install.rdf"/>
      The content of your XPI file looks like the following:
      ¦   chrome.manifest
      ¦   install.rdf