XPI Goals

This document describes the supplied goals that are available when using the XPI Plug-in with Maven.

Please refer to the Integration document for more information on how to integrate these goals into your project.

The build file utilizes various properties for default and user-configurable settings. All XPI Plug-in properties are described in the Properties document. The rest of this document assumes your project follows the standard Project Directory Layout ; however, it is possible to override many of these defaults.

XPI Goals

Goal Description
xpi Build a Mozilla Application distribution.
xpi:init Initialize the file system.
xpi:xpi Build and package xpi file.
xpi:src Build source distribution files in zip, tar and tar.gz format.
xpi:src:tar Build source distribution files in tar and tar.gz format.
xpi:src:zip Build src source distribution file in zip format.
xpi:new Create a new XPI Project and Application Directory Layout.

xpi

The xpi target builds and packages a complete Mozilla Application distribution.

This target calls the following targets in given order:

  • xpi:init to initialize the file system and create all needed directories.
  • xpi:xpi to build and package the installable xpi file.
  • xpi:src to build and package the source distribution files.

xpi:init

The xpi:init target creates all needed directories for the build as described in Generated XPI Project Directory Layout . The directories are created in ${maven.xpi.build.dir} .

xpi:xpi

The xpi:xpi target generates the xpi file for the project. The file is produced in the ${maven.xpi.build.dir} /xpi-plugin-xpi directory and has a name based on the ${maven.xpi.final.name} property.

The content of the xpi file includes:

Item Description
install.js The installation file for the application which is placed in the root of the xpi file.
application jar The Mozilla application jar file which is placed in the root of the xpi file and has a name based on ${pom.artifactId} .jar which is located in ${maven.xpi.build.dir} /xpi-plugin-jar.

xpi:src

The xpi:src target generates the src file packages in zip, tar and tar.gz format for the project distribution.

The files are produced in the ${maven.xpi.build.dir} /xpi-plugin-tar and ${maven.xpi.build.dir} /xpi-plugin-zip directory and have a name based on the ${maven.xpi.src.tar.final.name} , ${maven.xpi.src.gzip.final.name} and ${maven.xpi.src.zip.final.name} property.

xpi:src:tar

The xpi:src:tar target generates the src file packages in tar and tar.gz format for the project distribution.

The files are produced in the ${maven.xpi.build.dir} /xpi-plugin-tar directory and have a name based on the ${maven.xpi.src.tar.final.name} and ${maven.xpi.src.gzip.final.name} property.

The content of the src files include:

Item Description
install/install.js The installation file for the application located in ${maven.xpi.build.dir} /xpi-plugin/install directory.
Source xul, js, css and rdf files The Mozilla application src diretory located in the ${maven.xpi.build.dir} /xpi-plugin/ ${pom.artifactId} directory.

xpi:src:zip

The xpi:src target generates the src file package in zip format for the project distribution.

The file is produced in the ${maven.xpi.build.dir} /xpi-plugin-zip directory and has a name based on the ${maven.xpi.src.gzip.final.name} property.

The content of the src file includes:

Item Description
install/install.js The installation file for the application located in ${maven.xpi.build.dir} /xpi-plugin/install directory.
src xul, js and rdf files The Mozilla application src diretory located in the ${maven.xpi.build.dir} /xpi-plugin/ ${pom.artifactId} directory.

xpi:new

The xpi:new target generates a basic skeleton for a Mozilla application based on the Maven POM .

The Application Directory Layout is placed in ${maven.xpi.src} and has the name ${pom.artifactId} . For a more verbose documentation see Application Directory Layout Example and browse the Example Directory . The ${maven.xpi.locales} property can be changed to whatever language should be supported by the application.

This is only a basic skeleton at the moment but will be extended in the future.

The files generated are:

  • Manifest files (content.rdf)
  • Install file (install.js)
  • CSS, JS and XUL templates (*.js, *.css, *.xul)