XPI Application Directory Layout

The XPI Maven Plug-in requires a special Application Directory Layout ( Example ) inside a Maven XPI Project Directory Layout to work properly. You can change this Layout as described in the Properties document but it's recommendet to use the default values in this early state of this Plug-in. For a better visualization you can browse an example Application Directory Layout generated with the xpi:new goal. Please help extending this section and join our Mailing List for a discussion of a better Layout ;-)

Variable:

Please Note! For a better page layout long directory names are devided with '\\' in two lines.

Directory or file name Content Comment
src/xpi/${pom.artifactId} Mozilla Application This directory typically contains all of the Mozilla application source code.
src/xpi/${pom.artifactId}/content Chrome content The content directory is the home for the XUL files that contain the widgets to be drawn for you application. It is common practice to also place files related to behavior, namely JavaScript files, in this directory.
src/xpi/${pom.artifactId}/content/${pom.artifactId} Mozilla application source code (xul, js, css, rdf) This directory contains the real application sources.
src/xpi/${pom.artifactId}/content/${pom.artifactId}\\

/${pom.artifactId}.js
Mozilla application JavaScript file This is a JavaScript file which controls the behaviour of the application. If generated with the xpi:new goal this is only an empty template.
src/xpi/${pom.artifactId}/content/${pom.artifactId}\\

/contents.rdf
Package Manifest file for the application. The application Manifest file which is used to register the application. If generated with the xpi:new goal this is a ready to go Skeleton and only needs custom changes.
src/xpi/${pom.artifactId}/content/${pom.artifactId}/\\

${pom.artifactId}.xul
Mozilla application XUL file. If generated with the xpi:new goal this is only an empty template.
src/xpi/${pom.artifactId}/locale Chrome locale This directory contains the files that contain localized strings for your package. Most files are DTD files that contain the entities referenced in XUL files. There is a subdirectory for each language, and the naming convention is code-region, such as en-US.
src/xpi/${pom.artifactId}/locale/${locale} One locale of the Mozilla application. Just a conatiner.
src/xpi/${pom.artifactId}/locale/${locale}/\\

${pom.artifactId}
Just a conatiner. Just a conatiner.
src/xpi/${pom.artifactId}/locale/${locale}/\\

${pom.artifactId}/${pom.artifactId}.dtd
The document type definiton for this locale. If generated with the xpi:new goal this is only an empty template.
>src/xpi/${pom.artifactId}/locale/${locale}/\\

${pom.artifactId}/${pom.artifactId}.properties
Message resources for JavaScript files. This file conatins the message resources used from JavaScript. If generated with the xpi:new goal this is only an empty template.
src/xpi/${pom.artifactId}/locale/${locale}/\\

${pom.artifactId}/contents.rdf
Manifest file for this locale. The locale Manifest file which is used to register this locale. If generated with the xpi:new goal this is a ready to go Skeleton and only needs custom changes.
src/xpi/${pom.artifactId}/skin Chrome appearance The term "skin" is an internal name for a theme. The skin directory contains all CSS files and images that contribute to the appearance of the windows. This is a good place to put the application images-in their own subdirectory.
src/xpi/${pom.artifactId}/skin/${pom.artifactId}.css Mozilla application CSS file. This file conatins the Cascading Style Sheets for this skin. If generated with the xpi:new goal this is only an empty template.
src/xpi/${pom.artifactId}/skin/contents.rdf Manifest file for this skin. The locale Manifest file which is used to register this skin. If generated with the xpi:new goal this is a ready to go Skeleton and only needs custom changes.
src/xpi/install/install.js Mozilla application install script. This file contains the install routines for the application. If generated with the xpi:new goal this is a ready to go Skeleton and only needs custom changes.

XPI Application Directory Layout Example

This example uses checky as the ${pom.artifactId} and two locales for ${locale} configured with ${maven.xpi.locales} =de-DE,en-US . You can browse this example directory here .

      
	
     src/xpi
	|
	+ --- checky
	|	|
	|	+ --- content
	|	|	|
	|	|	+ --- checky
	|	|		|
	|	|		+ --- checky.js
	|	|		|
	|	|		+ --- checky.xul
	|	|		|
	|	|		+ --- contents.rdf
	|	|		 
	|	+ --- locale
	|	|	|
	|	|	+ --- en-US
	|	|	|	|
	|	|	|	+ --- checky
	|	|	|		|
	|	|	|		+ --- checky.dtd
	|	|	|		|
	|	|	|		+ --- checky.properties
	|	|	|		|
	|	|	|		+ --- contents.rdf
	|	|	|
	|	|	+ --- de-DE
	|	|		|
	|	|		+ --- checky
	|	|			|
	|	|			+ --- checky.dtd
	|	|			|
	|	|			+ --- checky.properties
	|	|			|
	|	|			+ --- contents.rdf
	|	|
	|	+ --- skin
	|		|
	|		+ --- checky.css
	|		|
	|		+ --- contents.rdf	
	|			
	+ --- install
		|
		+ --- install.js