blob: dad4f522f6df87cc5df535de377f4dc09800b8b5 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2005. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Author" content="Lab User">
<link REL="STYLESHEET" HREF="../../book.css" CHARSET="ISO-8859-1" TYPE="text/css">
<title>Update server site map</title>
</head>
<body>
<h1>
Update server site map</h1>
The default Eclipse update server is any URL-accessible server. The default
implementation assumes a fixed-layout server. The content of the server
(in terms of available features and plug-ins) is described in a site map
file, <i>site.xml</i>. This file can be manually maintained, or can be
dynamically computed by the server.
<h3>
Site Map</h3>
The update server URL can be specified as a full URL to the site map file,
or a URL of a directory path containing the site map file (similar to index.html
processing). The site map site.xml format is defined by the following dtd:
<p><tt>&lt;?xml encoding="ISO-8859-1"?&gt;</tt></p>
<p><tt>&lt;!ELEMENT site (description?, feature*, archive*, category-def*)&gt;</tt>
<br><tt>&lt;!ATTLIST site</tt>
<br><tt>&nbsp;&nbsp;&nbsp; type&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
CDATA #IMPLIED</tt>
<br><tt>&nbsp;&nbsp;&nbsp; url&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
CDATA #IMPLIED</tt>
<br><tt>&nbsp;&nbsp;&nbsp; mirrorURL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CDATA #IMPLIED</tt>
<br><tt>&nbsp;&nbsp;&nbsp; availableLocales&nbsp;&nbsp;&nbsp; CDATA #IMPLIED</tt>
<br><tt>&nbsp;&nbsp;&nbsp; digestURL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CDATA #IMPLIED</tt>
<br><tt>&nbsp;&nbsp;&nbsp; associateSitesURL&nbsp;&nbsp; CDATA #IMPLIED</tt>
<br><tt>&nbsp;&nbsp;&nbsp; pack200&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CDATA #IMPLIED</tt>
<br><tt>&gt;</tt></p>
<p><tt>&lt;!ELEMENT description (#PCDATA)&gt;</tt>
<br><tt>&lt;!ATTLIST description</tt>
<br><tt>&nbsp;&nbsp;&nbsp; url&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
CDATA #IMPLIED</tt>
<br><tt>&gt;</tt></p>
<p><tt>&lt;!ELEMENT feature (category*)&gt;</tt>
<br><tt>&lt;!ATTLIST feature</tt>
<br><tt>&nbsp;&nbsp;&nbsp; type&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
CDATA #IMPLIED</tt>
<br><tt>&nbsp;&nbsp;&nbsp; id&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
CDATA #IMPLIED</tt>
<br><tt>&nbsp;&nbsp;&nbsp; version&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
CDATA #IMPLIED</tt>
<br><tt>&nbsp;&nbsp;&nbsp; url&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
CDATA #REQUIRED</tt> <tt>&nbsp;&nbsp;&nbsp; </tt>
<br><tt>&nbsp;&nbsp;&nbsp; patch&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
(false | true) false</tt> <tt>&nbsp;</tt></p><p><tt>&nbsp;&nbsp;&nbsp; os&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CDATA #IMPLIED</tt>
<br><tt>&nbsp;&nbsp;&nbsp; nl&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CDATA #IMPLIED</tt>
<br><tt>&nbsp;&nbsp;&nbsp; arch&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CDATA #IMPLIED</tt>
<br><tt>&nbsp;&nbsp;&nbsp; ws &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
CDATA #REQUIRED</tt>
<br><tt>&gt;</tt></p>
<p><tt>&lt;!ELEMENT archive EMPTY&gt;</tt>
<br><tt>&lt;!ATTLIST archive</tt>
<br><tt>&nbsp;&nbsp;&nbsp; path&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
CDATA #REQUIRED</tt>
<br><tt>&nbsp;&nbsp;&nbsp; url&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
CDATA #REQUIRED</tt>
<br><tt>&gt;</tt></p>
<p><tt>&lt;!ELEMENT category EMPTY&gt;</tt>
<br><tt>&lt;!ATTLIST category</tt>
<br><tt>&nbsp;&nbsp;&nbsp; name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
CDATA #REQUIRED</tt>
<br><tt>&gt;</tt></p>
<p><tt>&lt;!ELEMENT category-def (description?)&gt;</tt>
<br><tt>&lt;!ATTLIST category-def</tt>
<br><tt>&nbsp;&nbsp;&nbsp; name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
CDATA #REQUIRED</tt>
<br><tt>&nbsp;&nbsp;&nbsp; label&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
CDATA #REQUIRED</tt>
<br><tt>&gt;</tt></p>
<p>The element and attribute definitions are as follows:</p>
<ul>
<li>&lt;site&gt; - defines the site map
<ul>
<li>type - optional site type specification. The value refers to a type string
registered via the install framework extension
point. If not specified, the type is assumed to be the default Eclipse
site type (as specified in this document).</li>
<li>url - optional URL defining the update site baseline URL (used to determine
individual &lt;feature&gt; and &lt;archive&gt; location).&nbsp; Can be relative
or absolute. If relative, is relative to site.xml. If not specified, the
default is the URL location of the site.xml file.</li>
<li>mirrorsURL - optional URL pointing to a file that contains update site mirror
definitions. This URL can be absolute or relative to this site. The mirrors file
is described later in this document.</li>
<li>availableLocales - optional list of locales for which digests are available</li>
<li>digestURL - optional URL that points to the directory that contains digests. At runtime,
based on availableLocales one of the digests from directory specified in digestURL will be
selected using the same algorithm that is used to select properties in the class
java.util.ResourceBundle. Digest files should be named digest&lt;locale&gt;.zip where locale is
either empty string (default digest) or locale as defined in java.util.Locale.</li>
<li>associateSitesURL - optional URL that points to the xml file that lists sites that should be open
at the same time as this site</li>
<li>pack200 - This attribute tells the update manager that there may be packed content that it
should download instead of the normal jar. If this attribute is not set, the update manager will
never look for packed content and will always download the normal jar. To get a jar from an update
site that specifies pack200="true", the update manager will first look for a pack.gz file beside
the jar it wants. For example, when downloading foo.jar, the update manager will first look for
foo.jar.pack.gz. If the pack.gz file exists, then it will be downloaded instead of the jar.
Once the pack.gz file is downloaded, it is then unpacked to yield the original jar file.
If the pack.gz file does not exist on the update site, then the normal jar file will be downloaded
as normal.</li>
</ul>
</li>
<li>&lt;description&gt; - brief description as simple text. Intended to be translated.
<ul>
<li>url - optional URL for the full description as HTML. The URL can be specified
as absolute of relative. If relative, the URL is relative to site.xml.
<br>Note, that for NL handling the URL value should be separated to allow
alternate URLs to be specified for each national language.</li>
</ul>
</li>
<li>&lt;feature&gt; - identifies referenced feature archive
<ul>
<li>type - optional feature type specification. The value refers to a type
string registered via the install framework extension
point. If not specified, the type is assumed to be the default feature
type for the site. If the site type is the default Eclipse site type, the
default feature type is the packaged feature type (as specified in this
document).</li>
<li>id - optional feature identifier. The information is used as a performance
optimization to speed up searches for features. Must match the identifier
specified in the feature.xml of the referenced archive (the url attribute).
If specified, the version attribute must also be specified.</li>
<li>version - optional feature version. The information is used as a performance
optimization to speed up searches for features. Must match the version
specified in the feature.xml of the referenced archive (the url attribute).
If specified, the id attribute must also be specified.</li>
<li>url - required URL reference to the feature archive. Can be relative or
absolute. If relative, it is relative to the location of the site.xml file.
<b>Note</b>:
the default site implementation allows features to be accessed without
being explicitly declared using a &lt;feature&gt; entry. By default, an undeclared
features reference is interpreted as "features/&lt;id&gt;_&lt;version&gt;.jar".
<b>Note</b>: for better lookup performance, always define the id and version
attributes.</li>
<li>patch - optional attribute to denote that this is a patch (special type of
feature).
<b>Note</b>: for better lookup performance, always define this attribute.</li>
<li>os - optional operating system specification. A comma-separated list of
operating system
designators defined by Eclipse (see Javadoc for <tt>
org.eclipse.core.runtime.Platform)</tt>. Indicates this feature should only be
installed on one of the specified OS's. If this attribute is not
specified, the feature can be installed on all systems (portable
implementation). This information is used as a hint by the installation and
update support (user can force installation of feature regardless of this
setting). </li>
<li>arch - optional machine architecture specification. A comma-separated list of
architecture designators defined by Eclipse (see Javadoc for <tt>
org.eclipse.core.runtime.Platform)</tt>. Indicates this feature should only be
installed on one of the specified systems. If this attribute is not specified,
the feature can be installed on all systems (portable implementation). This
information is used as a hint by the installation and update support (user can
force installation of feature regardless of this setting). </li>
<li>ws - optional windowing system specification. A comma-separated list of
window system
designators defined by Eclipse (see Javadoc for <tt>
org.eclipse.core.runtime.Platform)</tt>. Indicates this feature should only be
installed on one of the specified WS's. If this attribute is not
specified, the feature can be installed on all systems (portable
implementation). This information is used as a hint by the installation and
update support (user can force installation of feature regardless of this
setting). </li>
<li>nl - optional locale specification. A comma-separated list of locale designators
defined by Java. Indicates this feature should only be installed on a system
running with a compatible locale (using Java locale-matching rules). If this
attribute is not specified, the feature can be installed on all systems
(language-neutral implementation). This information is used as a hint by the
installation and update support (user can force installation of feature
regardless of this setting).</li>
</ul>
</li>
<li>&lt;archive&gt; - identifies referenced "storage" archive (the actual files
referenced via the <tt>&lt;plugin&gt;</tt> or <tt>&lt;data&gt;</tt> elements
in the feature manifest). The site simply manages archives as a path-to-URL
map. The default Eclipse site implementation does not require the &lt;archive&gt;
section to be included in the site map (site.xml). Any archive reference
not explicitly defined as part of an &lt;archive&gt; section is assumed to
be mapped to a url in the form "&lt;archivePath&gt;" relative to the location
of the site.xml file.
<ul>
<li>path - required archive path identifier. This is a string that is determined
by the feature referencing
this archive and is not otherwise interpreted by the site (other than as
a lookup token).</li>
<li>url - required URL reference to the archive. Can be relative or absolute.
If relative, it is relative to the location of the site.xml file.</li>
</ul>
</li>
<li>&lt;category-def&gt; - an optional definition of a category that can be used
by installation and update support to hierarchicaly organize features
<ul>
<li>name - category name. Is specified as a path of name tokens separated by /</li>
<li>label - displayable label. Intended to be translated.</li>
</ul>
</li>
<li>&lt;category&gt; - actual category specification for a feature entry
<ul>
<li>name - category name</li>
</ul>
</li>
</ul>
<p>Note, that in general the feature.xml manifest documents should specify
UTF-8 encoding. For example:</p>
<p><tt>&lt;?xml version="1.0" encoding="UTF-8"?&gt;</tt></p>
<p>Translatable text contained in the site.xml can be separated into site&lt;_locale&gt;.properties
files using Java property bundle conventions. Note that the translated
strings are used at installation time (ie. do not employ the plug-in fragment
runtime mechanism). The property bundles are located relative to the site.xml
location.</p>
<h3>Default Site Layout</h3>
<p><tt>&lt;site root&gt;/</tt>
<br><tt>&nbsp;&nbsp;&nbsp; site.xml</tt>
<br><tt>&nbsp;&nbsp;&nbsp; features/</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; feature archives&nbsp;&nbsp;
(eg. org.eclipse.javatools_1.0.1.jar)</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;featureId&gt;_&lt;featureVersion&gt;/&nbsp;&nbsp;&nbsp;
(optional)</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
non-plug-in files for feature</tt>
<br><tt>&nbsp;&nbsp;&nbsp; plugins/</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; plug-in archives&nbsp;&nbsp;&nbsp;
(eg. org.eclipse.ui_1.0.3.jar)</tt></p>
<h3>
Mirrors File</h3>
<p>The update mirrors file (the one pointed at by the mirrorsURL attribute of
&lt;site&gt;) contains definition for update site mirrors. It format is defined by the following dtd:
</p>
<p><tt>&lt;?xml encoding="ISO-8859-1"?&gt;</tt></p>
<p><tt>&lt;!ELEMENT mirrors (mirror*))&gt;</tt>
<br>&nbsp;</p><p><tt>&lt;!ELEMENT mirror EMPTY&gt;</tt>
<br><tt>&lt;!ATTLIST mirror</tt>
<br><tt>&nbsp;&nbsp;&nbsp; url&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
CDATA #REQUIRED</tt> <tt>&nbsp;&nbsp;&nbsp; </tt>
<br><tt>&nbsp;&nbsp;&nbsp; label&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CDATA #REQUIRED</tt>
<br><tt>&gt;</tt></p>
<ul>
<li>&lt;mirrors&gt; - defines the available update site mirrors</li>
<li>&lt;mirror&gt; - defines a mirror site
<ul>
<li>url - the URL of the mirror site</li>
<li>label - displayable label. Intended to be translated.</li>
</ul>
</li>
</ul>
<h3>Digest File</h3>
<p>Digest files (the ones pointed by the digestURL attribute of
&lt;site&gt;)are zipped xml file with following DDT:</p>
<p><tt>&lt;?xml encoding="ISO-8859-1"?&gt;</tt></p>
<p><tt>&lt;!ELEMENT digest (feature*)&gt;</tt></p>
<p>Where feature definition is the same as in feature manifest.</p>
<h3>
Associate Sites File</h3>
<p>The associate sites file (the one pointed at by the associateSitesURL attribute of
&lt;site&gt;) contains definition of associated sites. Its format is defined by the following dtd:
</p>
<p><tt>&lt;?xml encoding="ISO-8859-1"?&gt;</tt></p>
<p><tt>&lt;!ELEMENT associateSites (associateSite*)&gt;</tt>
<br>&nbsp;</p><p><tt>&lt;!ELEMENT associateSites EMPTY&gt;</tt>
<br><tt>&lt;!ATTLIST associateSite</tt>
<br><tt>&nbsp;&nbsp;&nbsp; url&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
CDATA #REQUIRED</tt> <tt>&nbsp;&nbsp;&nbsp; </tt>
<br><tt>&nbsp;&nbsp;&nbsp; label&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CDATA #REQUIRED</tt>
<br><tt>&gt;</tt></p>
<ul>
<li>&lt;associateSites&gt; - defines the sites that are assoicated with this update site</li>
<li>&lt;associateSite&gt; - defines an associate site
<ul>
<li>url - the URL of the associated site</li>
<li>label - displayable label. Intended to be translated.</li>
</ul>
</li>
</ul>
<h3>Controlling Access</h3>
<p>The default Eclipse site implementation provides support for http access
with basic user authentication (userid and password).</p>
<p>Custom access control mechanisms can be added to base Eclipse in one
of 2 ways:</p>
<ul>
<li>
by supplying server-side logic on the update server (eg. implementing servlets
that compute the site.xml map, and control access to individual archives
based on some user criteria)</li>
<li>
by supplying a custom concrete implementation of the site object (installed
on the client machine, update server specified <tt>&lt;site type=""&gt;</tt>).
The custom concrete site implementation, together with any server-side
logic support the required control mechanisms.</li>
</ul>
<p>Eclipse provides an example demonstrating an implementation of an access
mechanism based on feature key files.
</p>
</body>
</html>