[Libreoffice] Extension dependencies

Stephan Bergmann sbergman at redhat.com
Tue Nov 15 06:48:42 PST 2011


On 11/15/2011 01:39 PM, Christophe Strobbe wrote:
> At 09:59 4-11-2011, Stephan Bergmann wrote:
>> Each .oxt extension can carry any number of dependencies, specifying
>> conditions that need to be met by the hosting LO installation for the
>> extension to be successfully deployable (see
>> <http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/Extensions/Dependencies>).
>>
>
> This page links to <http://openoffice.org/extensions/description/2006>,
> which returns an ERROR 404, so even if an extension developer wanted to
> document more detailed dependencies, they would not know what syntax or
> elements to use in their description.xml file.

"http://openoffice.org/extensions/description/2006" is only used as an 
XML namespace name on that page.  URLs used as XML namespace names are 
not generally expected to be dereferencable (and are often not).  (That 
the wiki software used for that page displays that string as a browsable 
link appears to be an unfortunate mis-feature.)

The general syntax for dependencies within description.xml is described 
on that page, in the second-last paragraph (that also contains the 
mis-links).  For the description of individual dependencies, follow the 
link to 
<http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/Extensions/Description_of_XML_Elements#Element_.2Fdescription.2Fdependencies> 
labelled "XML description for description.xml" in the "See also" section 
at the bottom of the page.  (And for the description of individual 
dependencies relative to LO instead of OOo, 
<https://wiki.documentfoundation.org/Development/Extension_Development> 
is the new starting point.)

> I was confronted with this problem just today because a new Java-based
> extension cannot be installed on some Ubuntu systems even though it
> installs without problems on Windows and some other Ubuntu systems.
> The extension manager displayed the following error dialog:
> (com.sun.star.deployment.DeploymentException) { { Message = "An error
> occurred while enabling: accessodf-addon.jar", Context =
> (com.sun.star.uno.XInterface) @a403870 }, Cause = (any) {
> (com.sun.star.registry.CannotRegisterImplementationException) {{ Message
> = "", Context = (com.sun.star.uno.XInterface)} @0 } } } }
>
> It turns out that this issue can be solved with
> sudo apt-get install libreoffice-java-common
>
> So I thought about how to document that dependency in description.xml,
> but I couldn't ... (And libreoffice-java-common or
> openoffice.org-java-common may be rather broad.)

Yes, extension dependencies are currently only able to express 
dependencies on a complete LO installation.  Dependencies that are not 
fulfilled because only a subset of LO functionality is installed are not 
supported.  (And note that what those available subsets are is typically 
also specific to each LO distribution, even if the optional module 
structure in scp2 sets some common ground.)

Stephan


More information about the LibreOffice mailing list