Eclipse Platform
Installation and Update
*** WORK IN PROGRESS ***
Revision Date: 03/29/2002 11:32 AM - Version: 2.0.7
Change History:
-
2.0.7
-
support explicit xml markup for primary features
-
2.0.6
-
install handler markup changes
-
2.0.5
-
updates to security section
-
2.0.4
-
general text cleanup
-
<feature><group> support removed (will not be in Eclipse
2.0)
-
arch= support added to <feature> and <feature><plugin>
-
os=/ arch=/ ws=/ nl= added to <fetaure><data>
-
<site url=""> new semantics
-
corrected errors in native installer link support
-
defined callback query strings for browser-triggered processing
Table of Contents
Introduction
Changes
from 1.0
Concepts
Framework
Packaging Conventions
Feature
Archive
Plug-In
Archive
Packaging
NL
Translated
Feature Information
Translated
Plug-In Information
Packaging
Target-Specific Support
Packaging Attribution Information
Packaging Non-Plug-In Files
Custom Install Handling
Security
Considerations
Update Server
Site Map
Default
Site Layout
Controlling
Access
Eclipse Install
Default
Install Layout
"Unmanaged"
Plug-Ins
Using
Native Platform Installers
Runtime Considerations
Primary
Feature
Multiple
Launch Configurations
Trial
Support
Browser-Triggered
Installation
Introduction
This document outlines the support for managing the delivery of function
within the Eclipse platform.
Changes from R1.0
This section describes the major design changes from the R1.0 Installation
and Update support and supplies rationale for each design change.
-
extendable framework
In R2.0 Eclipse defines an extendable framework for installation and
update, allowing the support for alternate packaging and site management
schemes. R2.0 supplies a default concrete implementation of this framework.
-
feature support
In R2.0 the concept of a component and configuration
is merged into feature. Features define the packaging structure
for a group of related plug-ins, plug-in fragments, and optionally non-plug-in
files. Features are treated purely as an installation and packaging construct.
They do not play a role during Eclipse plug-in execution. Features do not
nest. They are simply an inclusive "manifest" of the plug-ins, fragments
and other files that make up that feature. If features are logically made
up of plug-ins from "sub-features", the top-level feature "manifest" must
be fully resolved at packaging time.
-
default feature archive format
R1.0 components were packaged as a single Java .jar containing the
component manifest as well as the actual plug-in files. The problem with
this approach is lack of granularity at download time. In R2.0, the feature
archive consists of multiple separate .jars - one .jar per plug-in and
fragment, plus one .jar for the actual feature information. The Installation
and Update support selectively downloads only those jars required for the
installation.
-
site map
Default Eclipse update server must contain a site map file (site.xml).
This is an evolution of the R1.0 install.index support. The rationale for
using a structured site defined by the map rather than a "free form" web
site, is the ability to present a consistent installation experience for
the user. Also, this provides the necessary structure for discovery of
available updates. Additional support for "free form" browsing may be considered
in future work.
-
using native install/ uninstall
The primary mechanism for installing and updating Eclipse features
is the built-in installation and update support. Some products may instead
choose to use native installer technology (eg. MSI, RPM, etc) to deliver
Eclipse features. However, native installers do not implement the required
support for understanding the Eclipse installation structure. In particular,
the native uninstallers will, by default, remove plug-in files that were
installed using the native installer without regard to these plug-ins being
needed by other features. As a result, features installed using native
installers must be written into private product-specific installation location
and not the shared Eclipse installation location. The shared Eclipse is
made aware of the produce-specific location via an installed "link file".
-
custom install handling
In many cases the standard installation handling supplied by Eclipse
is not be sufficient to handle various custom requirements. To accommodate
this, R2.0 Eclipse supports custom install handlers packaged as part of
the feature and executed during the feature installation.
-
path naming conventions
R1.0 mandated the use of the various identifiers and versions inside
the packaged archives (eg. directory path names for plug-ins). This approach
has proven to be ackward and error prone. In 2.0, the packaging requirements
no longer mandate that path names of packaged files precisely reflect the
contained identifiers and versions. The properly identified install subdirectories
are created by the Eclipse support during the installation and update process
based on the archive content (rather than explicit jar path structure set
up at packaging time)
-
support for multiple launch points
R2.0 provides support for defining multiple launch points with different
configuration (incl. different "product" customization) against the same
Eclipse installation
-
browser-triggered installation
R2.0 allows feature install to be triggered from a web-browser form.
A button on a browser form (through an associated script) can cause a running
instance of Eclipse to perform the installation action
Concepts
Plug-in
Eclipse developers build plug-ins. Plug-ins are the base units of execution
recognized by the Eclipse runtime environment. In general, plug-ins are
not exposed to users that select function during installation or update.
The reason is that plug-in boundaries are established by developers for
development reasons (like function reuse) and present the wrong level of
granularity in terms of what the user sees as the unit of function.
While plug-ins are being developed (ie. are frequently being changed),
their internal file structure will reflect what is convenient to the developer.
This will generally depend on the particular development tool being used.
Typically, however, the developer will likely setup the plug-in to execute
from a directory tree containing exposed .class files, rather than executing
from a .jar (requires an extra step to create the .jar and we all know
developers hate extra steps). Also, at this stage the developer does not
pay particular attention to plug-in versioning information, because the
plug-in is continually changing.
However, when the plug-in is ready to be packaged, it needs to be converted
to a form suitable for packaging and installation. Typically it means creation
of the runtime .jar(s) and removing any development-time files (source,
exposed .class files, etc). It also means updating the plugin.xml manifest
with the formal plug-in version and reflecting the version in the plug-in
directory name (see "Concurrent Plug-In Version Support" for details).
Plug-in Fragment
Plug-in Fragments (or simply Fragments) allow independent packaging
of certain aspects of the base plug-in. This includes (but may not be limited
to) translated resources for the plug-in, OS-specific or windowing-system-specific
code. At runtime, fragments are logically merged into the base plug-in.
From a packaging point of view, the install and update support does not
really differentiate between plug-ins and their related fragments.
Feature
A feature is an installation packaging mechanism used to define a group
of versioned plug-ins and/or plug-in fragments plus non-plug-in files that
is used to deliver some user function. Features are exposed to users as
part of the packaging and installation process, because they represent
a unit of function selection. Features also represent a unit of installation.
Features carry a version identifier.
Features are packaged as a feature archive, referencing the required
plug-ins, plug-in fragments and optional non-plug-in files. The feature
archives are placed on an update server for download and installation by
the Eclipse update manager, or they can be used as the input into a formal
packaging process using one of the "traditional" installer technologies.
The format of the feature archive is described later.
Framework
The 2.0 installation and update support is provided as a framework that
allows custom implementations to be supplied for its key elements. In particular,
the following can be supplied:
-
concrete implementations of feature (IFeature interface) that can be used
to support alternate packaging schemes. New concrete feature types are
registere via the "org.eclipse.update.featureTypes" extension point.
-
concrete implementations of site (ISite interface) that can be used to
support alternate site layout, or site behavior. New concrete site types
are registered via the "org.eclipse.update.siteTypes" extension point.
-
each feature can specify a custom install handler as part of its feature
manifest. Install handlers (IInstallHandler interface) are dynamically
invoked as part of the installation process to handle non-plugin data,
plus perform other custom processing allowed by the framework.
Eclipse provides default implementations of feature and site. These are
described in the rest of this document.
| Note: The reminder of this document describes the default concrete
implementation of the framework delivered with Eclipse. It specifies the
structure of the default feature implementation, as well as the default
site implementation, plus the corresponding xml files (feature.xml and
site.xml). Providers of alternate concrete implementations can extend
parts or all of the default Eclipse implementation. This includes providing
a mechanism for dynamic computation of the site map (site.xml) |
Packaging Conventions
Default feature packages consist of several related files:
-
exactly one jar containing the feature manifest and related files. This
one is refered to as the "feature archive"
-
zero or more jars containing the feature plug-ins. These are refered to
as the "plug-in archives"
-
zero or more non-plug-in files associated with the feature. They are used
by feature custom install handlers and contain data not interpreted by
Eclipse
Feature Archive
The feature packaging information is placed into a separate Java .jar.
Standard Java jar facilities are used for constructing feature archives.
Feature archives reference separately packaged plug-in archives (see next
section) and non-plug-in files.
Features are identified using a structured identifier based on the provider
internet domain name. For example, organization eclipse.org may produce
feature org.eclipse.javatooling. The character set used for feature identifiers
is as specified for plug-in identifiers (see reference information describing
the plug-in manifest).
The recommended convention for naming the feature archives is
<id>_<version>.jar
Where <id> is the feature identifier and <version>
is the full version identifier contained in the respective feature.xml.
Note that this is a recommended convention that minimizes chance of collisions,
but is not required by the Eclipse architecture. For example, the following
are valid feature archive names
org.eclipse.javatooling_1.0.3.jar
org.eclipse.pde_2.0.jar
my_feature.jar
Internally, each feature archive is packaged relative to its feature
directory (but not including the directory path element). The archive has
the following structure
feature.xml
feature<_locale>.properties (see "Translated Feature Information")
other feature files and subdirectories (TBD)
META-INF/
Java jar manifest and security files
The feature install.xml format is defined by the following dtd:
<?xml encoding="ISO-8859-1"?>
<!ELEMENT feature (install-handler?, description?, copyright?,
license?, url?, includes*, requires?, plugin*, data*)>
<!ATTLIST feature
id
CDATA #REQUIRED
version
CDATA #REQUIRED
label
CDATA #IMPLIED
provider-name CDATA #IMPLIED
image
CDATA #IMPLIED
os
CDATA #IMPLIED
arch
CDATA #IMPLIED
ws
CDATA #IMPLIED
nl
CDATA #IMPLIED
primary
(true | false) "false"
application CDATA #IMPLIED
>
<!ELEMENT install-handler EMPTY>
<!ATTLIST install-handler
url
CDATA #IMPLIED
library
CDATA #IMPLIED
handler
CDATA #IMPLIED
>
<!ELEMENT description (#PCDATA)>
<!ATTLIST description
url
CDATA #IMPLIED
>
<!ELEMENT copyright (#PCDATA)>
<!ATTLIST copyright
url
CDATA #IMPLIED
>
<!ELEMENT license (#PCDATA)>
<!ATTLIST license
url
CDATA #IMPLIED
>
<!ELEMENT url (update?, discovery*)>
<!ELEMENT update EMPTY>
<!ATTLIST update
url
CDATA #REQUIRED
label
CDATA #IMPLIED
>
<!ELEMENT discovery EMPTY>
<!ATTLIST discovery
url
CDATA #REQUIRED
label
CDATA #IMPLIED
>
<!ELEMENT includes EMPTY>
<!ATTLIST includes
id
CDATA #REQUIRED
version
CDATA #REQUIRED
>
<!ELEMENT requires (import+)>
<!ELEMENT import EMPTY>
<!ATTLIST import
plugin
CDATA #REQUIRED
version
CDATA #IMPLIED
match
(perfect | equivalent | compatible | greaterOrEqual) "compatible"
>
<!ELEMENT plugin EMPTY>
<!ATTLIST plugin
id
CDATA #REQUIRED
version
CDATA #REQUIRED
fragment (true
| false) "false"
os
CDATA #IMPLIED
arch
CDATA #IMPLIED
ws
CDATA #IMPLIED
nl
CDATA #IMPLIED
download-size CDATA #IMPLIED
install-size CDATA #IMPLIED
>
<!ELEMENT data EMPTY>
<!ATTLIST data
id
CDATA #REQUIRED
os
CDATA #IMPLIED
arch
CDATA #IMPLIED
ws
CDATA #IMPLIED
nl
CDATA #IMPLIED
download-size CDATA #IMPLIED
install-size CDATA #IMPLIED
>
The element and attribute definitions are as follows:
-
<feature> - defines the feature
-
id - required feature identifier (eg. com.xyz.myfeature)
-
version - required component version (eg. 1.0.3)
-
label - optional displayable label (name). Intended to be translated.
-
provider-name - optional display label identifying the organization providing
this component. Intended to be translated.
-
image - optional image to use when displaying information about the feature.
Specified relative to the feature.xml.
-
os - optional operating system specification. A comma-separated list of
os designators defined by Eclipse (see Javadoc for org.eclipse.core.boot.BootLoader).
Indicates this feature should only be installed on one of the specified
os 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).
-
arch - optional machine architecture specification. A comma-separated list
of architecture designators defined by Eclipse (see Javadoc for org.eclipse.core.boot.BootLoader).
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).
-
ws - optional windowing system specification. A comma-separated list of
ws designators defined by Eclipse (see Javadoc for org.eclipse.core.boot.BootLoader).
Indicates this feature should only be installed on one of the specified
ws 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).
-
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).
-
primary - optional indication specifying whether this feature can be used
as a primary feature. Default if false
(not a primary feature).
-
application - optional identifier of the Eclipse application that is to
be used during startup when the declaring feature is the primary
feature. The application identifier must represent a valid application
registered in the org.eclipse.core.runtime.applications extension
point. Default is org.eclipse.ui.workbench.
-
<install-handler>
-
url - optional URL used for browser-triggered installation handling.
-
library - optional .jar library containing the install handler classes.
If specified, the referenced .jar must be contained in the feature archive.
It is specified as a path within the feature archive, relative to the feature.xml
entry. If not specified, the feature archive itself is used to load the
install handler classes. This attribute is only interpreted if class
attribute is also specified
-
handler - optional identifier of the install handler. The value is interpreted
depending on the value of the library attribute. If library
is specified, the value is interpreted as a fully qualified name
of a class contained in the specified library. If library
is not specified, the value is is interpreted as an extension identifier
of an extension registered in the org.eclipse.update.installHandlers
extension point. In either case, the resulting class must implement the
IInstallHandler
interface. The class is dynamically loaded and called at specific points
during feature processing. The handler has visibility to the API classes
from the update plug-in, and Eclipse plug-ins required by the update plugin.
-
<description> - brief component description as simple text. Intended
to be translated.
-
url - optional URL for the full description as HTML. The URL can be specified
as absolute of relative. If relative, it is assumed to be relative to (and
packaged in) the feature archive. Note, that for NL handling the URL value
should be separated to allow alternate URLs to be specified for each national
language.
-
<copyright> - feature copyright as simple text. Intended to be translated.
-
url - optional URL for the full description as HTML. The URL can be specified
as absolute of relative. If relative, it is assumed to be relative to (and
packaged in) the feature archive. Note, that for NL handling the URL value
should be separated to allow alternate URLs to be specified for each national
language.
-
<license> - feature "click-through" license as simple text. Intended
to be translated. It is displayed in a standard dialog with [Accept] [Reject]
actions during the download/ installation process.
-
url - optional URL for the full description as HTML. The URL can be specified
as absolute of relative. If relative, it is assumed to be relative to (and
packaged in) the feature archive. Note, that for NL handling the URL value
should be separated to allow alternate URLs to be specified for each national
language.
-
<url> - optional URL specifying site(s) contain feature updates, or
new features
-
<update> - URL to go to for updates to this feature
-
url - actual URL
-
label - displayable label (name) for the referenced site
-
<discovery> - URL to go to for new features. In general, a provider
can use this element to reference its own site(s), or site(s) of partners
that offer complementary features. Eclipse uses this element simply as
a way to distribute new site URLs to the clients
-
url - actual URL
-
label - displayable label (name) for the referenced site
-
<includes> - optional reference to a nested feature that is considered
to be part of this feature. Nested features must be located on the same
update site as this feature
-
<id> - required nested feature identifier
-
<version> - required nested feature version
-
<requires> - optional feature dependency information. Is expressed in
terms of plug-in dependencies. If specified, is enforced by the installation
and update support at the time of installation
-
<import> - dependency entry. Specification and processing is a subset
of the <import> specification in plugin.xml
-
plugin - identifier of dependent plug-in
-
version - optional plug-in version specification
-
match - optional matching rule. Valid values and processing are as follows:
-
if version attribute is not specifies, the match attribute (if specified)
is ignored.
-
perfect - dependent plug-in version must match exactly the
specified version.
-
equivalent - dependent plug-in version must be at least at
the version specified, or at a higher service level (major and minor version
levels must equal the specified version).
-
compatible - dependent plug-in version must be at least at
the version specified, or at a higher service level or minor level (major
version level must equal the specified version).
-
greaterOrEqual - dependent plug-in version must be at least
at the version specified, or at a higher service, minor or major level.
-
<plugin> - identifies referenced plug-in
-
id - required plug-in identifier (from plugin.xml)
-
version - required plug-in version (from plugin.xml)
-
fragment - optional specification indicating if this entry is a plug-in
fragment. Default is "false"
-
os - optional operating system specification. A comma-separated list of
os designators defined by Eclipse (see Javadoc for org.eclipse.core.boot.BootLoader).
Indicates this entry should only be installed on one of the specified os
systems. If this attribute is not specified, the entry 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 entry regardless of this setting).
-
arch - optional machine architecture specification. A comma-separated list
of architecture designators defined by Eclipse (see Javadoc for org.eclipse.core.boot.BootLoader).
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).
-
ws - optional windowing system specification. A comma-separated list of
ws designators defined by Eclipse (see Javadoc for org.eclipse.core.boot.BootLoader).
Indicates this entry should only be installed on one of the specified ws
systems. If this attribute is not specified, the entry 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 entry regardless of this setting).
-
nl - optional locale specification. A comma-separated list of locale designators
defined by Java. Indicates this entry should only be installed on a system
running with a compatible locale (using Java locale-matching rules). If
this attribute is not specified, the entry 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 entry
regardless of this setting).
-
download-size - optional hint supplied by the feature packager, indicating
the download size in KBytes of the referenced plug-in archive. If not specified,
the download size is not known (Implementation Note: the implementation
needs to distinguish between "not known" and 0 size)
-
install-size - optional hint supplied by the feature packager, indicating
the install size in KBytes of the referenced plug-in archive. If not specified,
the install size is not known (Implementation Note: the implementation
needs to distinguish between "not known" and 0 size)
-
<data> - identifies non-plugin data that is part of the feature
-
id - required data identifier in the form of a relative path.
-
os - optional operating system specification. A comma-separated list of
os designators defined by Eclipse (see Javadoc for org.eclipse.core.boot.BootLoader).
Indicates this entry should only be installed on one of the specified os
systems. If this attribute is not specified, the entry 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 entry regardless of this setting).
-
arch - optional machine architecture specification. A comma-separated list
of architecture designators defined by Eclipse (see Javadoc for org.eclipse.core.boot.BootLoader).
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).
-
ws - optional windowing system specification. A comma-separated list of
ws designators defined by Eclipse (see Javadoc for org.eclipse.core.boot.BootLoader).
Indicates this entry should only be installed on one of the specified ws
systems. If this attribute is not specified, the entry 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 entry regardless of this setting).
-
nl - optional locale specification. A comma-separated list of locale designators
defined by Java. Indicates this entry should only be installed on a system
running with a compatible locale (using Java locale-matching rules). If
this attribute is not specified, the entry 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 entry
regardless of this setting).
-
download-size - optional hint supplied by the feature packager, indicating
the download size in KBytes of the referenced data archive. If not specified,
the download size is not known (Implementation Note: the implementation
needs to distinguish between "not known" and 0 size)
-
install-size - optional hint supplied by the feature packager, indicating
the install size in KBytes of the referenced data archive. If not specified,
the install size is not known (Implementation Note: the implementation
needs to distinguish between "not known" and 0 size)
When interacting with
the update site, the feature implementation maps the <plugin>
and <data> elements into path identifiers used by the site
to determine the actual files to download and install. The default feature
implementation supplied by Eclipse constructs the path identifiers as follows:
-
<plugin> element results in a path entry in the form "plugins/<pluginId>_<pluginVersion>.jar"
(for example, "plugins/org.eclipse.core.boot_1.0.3.jar")
-
<data> element results in a path entry in the form "features/<featureId>_<featureVersion>/<dataId>"
(for example, "features/com.xyz.tools_2.3.1/examples.zip")
Note, that in general the feature.xml manifest documents should specify
UTF-8 encoding. For example
<?xml version="1.0" encoding="UTF-8"?>
Translatable text contained in the feature.xml can be separated into
feature<_locale>.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).
Plug-In Archive
Plug-ins and plug-in fragments are individually packaged as separate Java
.jars. Standard Java jar facilities are used for constructing plug-in archives.
There is no distinction made between a plug-in archive containing a plug-in
and one containing a plug-in fragment.
The recommended convention for naming the plug-in archives is
<id>_<version>.jar
Where <id> is the plug-in or fragment identifier and <version>
is the full version identifier contained in the respective plugin.xml or
fragment.xml. Note that this is a recommended convention that minimizes
chance of collisions, but is not required by the Eclipse architecture.
For example, the following are valid plug-in archive names
org.eclipse.platform_1.0.3.jar
org.eclipse.ui.nl_2.0.jar
my_plugin.jar
Internally, each plug-in archive packages all the relevant plug-in or
fragment files relative to its plug-in or fragment directory (but not including
the directory path element). The archive has the following structure
plugin.xml *OR* fragment.xml
other plug-in or feature files and subdirectories
META-INF/
Java jar manifest and security files
Packaging NL
In Eclipse, translated plug-in information is packaged either together
with the base plug-in, or as a plug-in fragment. At runtime, Eclipse locates
the translations for the required locale. The use of fragments allows translations
to be added to the runtime without the need to repackage the base plug-ins.
This mechanism cannot be used for translating the actual packaging information
that is part of the installation xml files. Consequently the standard Java
translation conventions are used for the packaging information, and all
necessary translations must be available at the time the feature is packaged.
Translated Feature Information
Note: This section describes the conventions used for translating
the information contained within the feature manifest. It allows for the
update client to select the correctly localized strings from the update
server. This section specifically does not describe localization of individual
plug-ins.
Several of the attributes within the feature manifest are strings intended
for display through user interfaces. To facilitate translation, these attribute
values use the convention defined for translatable attributes of plugin.xml.
Strings beginning with % up to the first space are treated as resource
identifier keys (without the %) and looked up in a properties file. For
example
label="%cfg Tool Feature for Linux"
results in a resource lookup in the correct property file with key "cfg".
If no property files are supplied, or the key is not found the default
string value (following the %key) is used.
The property files are named as feature_<locale>.properties using
the Java resource bundle naming conventions. Within the feature archive
.jar they are placed in the same directory as their corresponding feature.xml
file.
Implementation Note: When accessing the resource bundles the
Eclipse installation and update code should create a class loader for accessing
the translated string. This way, the standard locale lookup algorithm implemented
by Java is automatically used.
ResourceBundle b;
ClassLoader l;
l = new URLClassLoader(new URL[] {<targetDirectoryURL>}, null);
b = ResourceBundle.getBundle("feature",Locale.getDefault(),l);
The resulting resource bundle can be used in IPluginDescriptor.getResourceString(String,ResourceBundle)
to actually return the correct translated string for the manifest attribute.
Translated Plug-In Information
No change from 1.0. Translated plug-in information should be packaged as
plug-in fragments.
Packaging Target-Specific
Support
No change from 1.0. Target-specific plug-in support (os, ws) should be
packaged as plug-in fragments.
Packaging Attribution Information
| Note: the current definition in this section is still subject
to change. It currently describes the general approach for placement of
attribution information, but not its final format for 2.0 |
There are 3 types of attribution information that can be supplied in
a packaged feature
-
individual plug-in attribution information
-
platform attribution information (base Eclipse platform, other "layered"
platforms)
-
"feature" attribution information
In all cases, the information is supplied as part of a plugin. The reason
is that the plugin fragment support can be used to independently supply
additional translations of the attribution information. The installation
and update support does not specify the format of the attribution information.
This is specified by the Eclipse workbench support that makes use of this
information.
Packaging Non-Plug-In Files
Arbitrary non-plug-in files can be included as part of the feature definition
using the <data> elements. Non-plug-in files typically also
requires specification of a custom install handler. In general, the Eclipse
support only downloads the referenced non-plug-in files and calls the custom
install handler to perform any actual installation steps.
Eclipse does not specify the format of the non-plug-in files.
Custom Install Handling
Custom install handlers are written as a Java class and are packaged as
part of the feature archive. The installer
must implement the IInstallHandler interface (in most cases will
extend the BaseInstallHandler abstract helper class which implements
IInstallHandler).
When required, the install handler is dynamically loaded by the installation
and update code, and is called at specific points during its processing.
The install handler code has visibility to classes from the installation
and update support plug-in, and its prerequisite plug-ins.
Implementation Note: the detailed list of visible prerequisite
plug-ins is still evolving. It is expected to include org.eclipse.core.boot
and
org.eclipse.core.runtime
in all cases, plus org.eclipse.ui and org.eclipse.swt
when running with full workbench (ie. not "headless mode"). Also, it would
be useful to always expose org.eclipse.core.ant so that build
scripts can be used as part of the install handler implementation.
The IInstallHandler interface supports the following methods [Implementation
Note: the detailed definition of the IInstallHandler interface is still
evolving. The description below is not an API specification (simply a functional
description)]:
-
install-initiated - the install handler is called after a feature was selected
for installation, but before any files were downloaded. It is intended
to implement any custom click-through or user registration dialogs. The
base implementation of this method supplied with the abstract class BaseInstallHandler
performs
the default click-through processing using the license text supplied as
part of the feature manifest. On return this method indicates success (installation
continues) of failure (installation is aborted).
(Implementation Note: if both class and url
attributes are specified, the "install-initiated" method is not called.
Instead, the specified url is assumed to perform the function of this method,
triggering the actual installation from the browser)
-
install-downloaded - the install handler is called after all the required
feature files were downloaded (feature, plugins, data) but before the actual
installation is performed. The install handler is expected to perform verification
of the non-plug-in data files (eg. security), or any other pre-install
processing. On return this method indicates success (installation
continues) or failure (installation is aborted).
-
install-completion - the install handler is called after the feature information
and the plug-ins were installed. It is expected to complete the installation
of any non-plug-in data that was part of the feature. On return this method
indicates success (returns custom install log) or failure (installation
is aborted). On failure, the install handler is expected to perform any
required cleanup.
-
uninstall-initiated - the install handler is called when a feature is selected
for removal, but before any of the standard uninstall processing has taken
place. It is passed the custom install log created by the install handler
install-completion step.
-
uninstall-completion - the install handler is called on completion of the
standard uninstall steps. It is passed the custom install log created by
the install handler install-completion step.
In addition, the install handler can also provide implementations of methods
dealing with feature-specific "key file"
handling.
Note, that as a general practice, install handlers should be provided
in their own jars (even though they could be just exposed in the feature
archive jar). The jar should be signed, and sealed.
Security Considerations
The general approach is to use base Java jar signing for the feature and
plug-in archive .jars.
Features are verified as follows:
-
download and verify the feature archive (use base Java jar verification)
-
for each plug-in archive
-
verify the archive jar content (use base Java jar verification)
-
verify plug-in id and version from <plugin> entry in feature
manifest matches downloaded plugin.xml
-
for each non-plugin file
-
call install handler to verify file
In general, when processing signed jars, the user will be prompted for
each unrecognized certificate. The response choices will include aborting
the installation (originator is not trusted), continuing the installation
(originator is trusted for this installation).
Update Server
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, site.xml. This file can be manually maintained, or can be
dynamically computed by the server.
Site Map
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:
<?xml encoding="ISO-8859-1"?>
<!ELEMENT site (description?, feature*, archive*, category-def*)>
<!ATTLIST site
type
CDATA #IMPLIED
url
CDATA #IMPLIED
>
<!ELEMENT description (#PCDATA)>
<!ATTLIST description
url
CDATA #IMPLIED
>
<!ELEMENT feature (category*)>
<!ATTLIST feature
type
CDATA #IMPLIED
url
CDATA #REQUIRED
>
<!ELEMENT archive EMPTY>
<!ATTLIST archive
path
CDATA #REQUIRED
url
CDATA #REQUIRED
>
<!ELEMENT category EMPTY>
<!ATTLIST category
name
CDATA #REQUIRED
>
<!ELEMENT category-def (description?)>
<!ATTLIST category-def
name
CDATA #REQUIRED
label
CDATA #REQUIRED
>
The element and attribute definitions are as follows:
-
<site> - defines the site map
-
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).
-
url - optional URL defining the update site baseline URL (used to determine
individual <feature> and <archive> location). 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.
-
<description> - brief description as simple text. Intended to be translated.
-
url - optional URL for the full description as HTML. The URL can be specified
as absolute of relative. If relative, If relative, is relative to site.xml.
Note, that for NL handling the URL value should be separated to allow
alternate URLs to be specified for each national language.
-
<feature> - identifies referenced feature archive
-
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).
-
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.
Note: the default site implementation allows features to be accessed
without being explicitly declared using a <feature> entry. By default,
an undeclared features reference is interpreted as "features/<id>_<version>.jar"
-
<archive> - identifies referenced "storage" archive (the actual files
referenced via the <plugin> or <data> 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 <archive>
section to be included in the site map (site.xml). Any archive reference
not explicitly defined as part of an <archive> section is assumed to
be mapped to a url in the form "<archivePath>" relative to the location
of the site.xml file.
-
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).
-
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.
-
<category-def> - an optional definition of a category that can be used
by installation and update support to hierarchicaly organize features
-
name - category name. Is specified as a path of name tokens separated by
/
-
label - displayable label. Intended to be translated.
-
<category> - actual category specification for a feature entry
Note, that in general the feature.xml manifest documents should specify
UTF-8 encoding. For example
<?xml version="1.0" encoding="UTF-8"?>
Translatable text contained in the site.xml can be separated into site<_locale>.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.
Default Site Layout
<site root>/
site.xml
features/
feature archives
(eg. org.eclipse.javatools_1.0.1.jar)
<featureId>_<featureVersion>/
(optional)
non-plug-in files for feature
plugins/
plug-in argives
(eg. org.eclipse.ui_1.0.3.jar)
Controlling Access
The default Eclipse site implementation provides support for http access
with basic user authentication (userid and password).
Custom access control mechanisms can be added to base Eclipse in one
of 2 ways:
-
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)
-
by supplying a custom concrete implementation of the site object (installed
on the client machine, update server specified <site type="">).
The custom concrete site implementation, together with any server-side
logic support the required control mechanisms.
Eclipse provides an example demonstrating an implementation of an access
mechanism based on feature key files.
Eclipse Install
Default Install Layout
<install root>/
install/
features/
<featureId>_<version>/
feature.xml
other feature files
META-INF/
META-INF-ECLIPSE/
plugins/
<pluginORfragmentId>_<version>/
plugin.xml or fragment.xml
other plugin or fragment files
META_INF/
Implementation Note: we will go back to the original design of
not splitting out fragments (ie. plugin and fragments go into the same
install location)
"Unmanaged" Plug-Ins
Eclipse supports a concept of "unmanaged" plug-ins. These are plug-ins
that were directly installed into the Eclipse file tree without being part
of a feature (eg. developer unzipping plug-in archive directly into the
Eclipse file tree).
Eclipse runtime recognizes these plugins during startup and loads the
plug-in information into the runtime registry following the standard plug-in
binding rules. The update support also recognizes the presence of this
new plug-in, but since this plug-in is not part of any feature it cannot
be updated using the update support (hence "unmanaged"). Unmanaged plug-in
that become referenced by a feature as a result of some future installation
or update action become "managed" (can be updated as part of the feature).
Unmanaged plug-ins are not displayed as part of the installation and
update UI.
Using Native Platform Installers
The Eclipse installation contains plugins that can be shared across multiple
features. When installing and uninstalling features using the Eclipse installation
and update support, these relationship are correctly maintained. Only one
copy of any version of a plug-in is used.
However, when using native platform installers, performing native uninstall
creates problems because plug-ins would be removed without regard to any
sharing relationships. As a result, Eclipse does not allow plug-ins
to be installed using native installers into the shared installation tree.
Instead, native installers must establish their own installation root directory.
The subdirectory structure is the same as defined for base Eclipse. The
private root directory is logically linked into the shared Eclipse installation
via a link file installed by the native installer. The file path for the
link file is <configRoot>/links/. The <configRoot>
location
is computed by Eclipse relative to the launch configuration
file. By default, this is the install/ directory in the shared
Eclipse installation tree.
The name of the link file is not specified by Eclipse. The name is determined
by the native installer. To minimize the potential for naming collisions,
it is recommended that the file name contain the identifier and version
of the feature being installed by the native installer. For example, <featureId>_<featureVersion>.properties.
The file content is in the form of a Java properties file, with the following
properties defined:
path=[r|rw] install-path[,[r|rw] install-path]*
The property path is a comma-separated list of optionally annotated
install paths. The property value install-path is a full file
path to the installation directory root, specified in local OS format.
The optional annotation r or rw indicates whether Eclipse
update support should allow the specified location to be used for updates.
Default is no updates allowed (r).
Eclipse does not manage the linked directories in any way. It simply
detects their existence by the presence of the link files, and includes
the linked plug-ins during the platform startup. The native installer is
responsible for uninstalling the link when the corresponding directory
is removed. Eclipse runtime ignores any links that cannot be resolved.
Runtime Considerations
Primary Feature
The Eclipse installation is a shared program structure. Over time, it is
likely to contain multiple installed featues, each potentially specifying
feature attribution information that can be used to customize the Eclipse
UI in a "product-specific" way (splash screen, icons, window titles, etc).
However, only one feature can actually contribute the "product-specific"
customization information during Eclipse startup. This feature is refered
to as the "primary feature". Other features can contribute plug-ins, but
their feature attribution information is not used.
For each separate Eclipse launch point (eg. desktop icon representing
separate "product-specific" launch instances of Eclipse), the startup
configuration information can designate a different feature as the
primary feature. Alternatively, the primary feature can be specified via
a command-line argument (-feature <id>). This way, multiple
launch points can be defined to execute from the same Eclipse installation,
and each be customized in a "product-specific" way.
Multiple Launch Configurations
Eclipse supports use of multiple launch configurations. Each configuration
file maintains an annotated list of directories and plugins to use during
startup. The location of the configuration file can be specified using
a command-line argument (-configuration <url>). If specified,
but the specified file is not found, a new configuration file is created
at that location. The configuration files are not intended to be edited
manually. They are maintained by the Eclipse Update Manager support.
By default, Eclipse uses the following search sequence to locate the
configuration file (if none was specified on the command line):
-
current directory (Java user.dir property)
-
user home directory (Java user.home property)
-
the install/ directory in the shared installation tree
If a configuration file is located using the above sequence, it is used.
Otherwise a new configuration file is created in the install/
directory in the shared installation tree.
Trial Support
Eclipse 2.0 provides base enabling for creation of "trial use" plug-ins
(eg. time limited, function limited, use count limited, etc). There are
a couple of basic issues in suplying an implementation of trial support
as part of the Eclipse framework:
-
Eclipse is an open-source project. Any scheme implemented by Eclipse would
be easy to defeat (ie. anyone can see the implementation, and modify the
code to disable the limits)
-
there are many different proprietary schemes in use by various existing
products, with no clear candidate for common implementation
Consequently the actual implementation of the trial support is left to
the plug-ins (can implement scheme of their choice, does not need to expose
the solution). However, Eclipse 2.0 supports a notion of a "key file".
From Eclipse point of view, a "key file" is just an opaque file understood
by the plug-in code. Eclipse provides common mechanisms for installing
and managing key files as part of a feature, as well as an API for
accessing the key file from an executing plug-in. Each plug-in that supports
trial use is responsible for interpreting the key file and implementing
the appropriate usage limits. In a typical functional feature, the trial
use checking would typically be implemented only by one plug-in that represents
the common entry point into the user function. The startup() method of
that plug-in class includes the code to access the key file and perform
the usage checks.
Custom install handler supplied
with a feature can also implement methods for dealing with key files. In
particular, methods to validate key file being installed, to verify new
key file represents a valid upgrade, to handle "limit reached" processing,
and to return current use state (eg. time remaining) suitable for display.
Eclipse provides an example demonstrating an implementation of a trial
use plug-in.
Browser-Triggered Installation
There are 2 scenarios supported where a "free form" html web can be integrated
into the installation and update support and browsed using a browser (embedded
or external, depending on the platform). In both cases, additional information
is supplied by Eclipse to the browser through an extra query string passed
with the URL to the browser.
-
when navigating the site URL (defined by <description url="siteUrl">
in <site>), an extra query string is added to the actual URL.
The full URL is in the form <siteUrl>?eclipse=<eclipse-callback-url>
-
when navigating the install handler URL (defined by <install-handler
url="handlerUrl"> in <feature>), an extra query string
is added to the actual URL. The full URL is in the form <handlerUrl>?eclipse=<eclipse-callback-url>&id=<featureId>&version=<featureVersion>
(where the id and version arguments correspond to the
currently selected feature)
Eclipse supports a URL-based callback mechanism that allows feature installation
or update to be triggered from a browser running on the local host
of the executing Eclipse instance. The callback URL is supplied as part
of the query string at the points where Eclipse triggers "free form" web
browsing. On callback, the query string associated with the callback URL
specifies the actual installation arguments (added by the browser). The
full callback URL must be in the form <eclipse-callback-url>?base=<siteUrl>&feature=<featureUrl>&featureType=<type>.
The parameters base, feature and featureType
correspond to site.xml elements <site url="">, <feature
url=""> and <feature type=""> respectively.