[
https://issues.apache.org/jira/browse/CONFIGURATION-639?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15474847#comment-15474847
]
Oliver Heger commented on CONFIGURATION-639:
--------------------------------------------
Agreed. Can you provide a patch for the plugin configuration? Or commit it
immediately?
Thanks!
> OSGi Import-Package declaration not complete regarding optional dependencies
> ----------------------------------------------------------------------------
>
> Key: CONFIGURATION-639
> URL: https://issues.apache.org/jira/browse/CONFIGURATION-639
> Project: Commons Configuration
> Issue Type: Bug
> Affects Versions: 2.1
> Environment: OSGi-container
> Reporter: Rico Neubauer
> Labels: commons-configuration, osgi
> Attachments: s1.txt, s2.txt
>
>
> common-configuration2's pom.xml correctly defines optional dependencies like
> vfs2 or spring with <optional>.
> However, it does only declare a subset of those as optional OSGi-dependencies:
> {code:xml}
> <!-- Explicitly declare optional dependencies for the OSGi manifest. -->
> <commons.osgi.import>
> org.apache.commons.beanutils.*;resolution:=optional,
> org.apache.commons.codec.*;resolution:=optional,
> org.apache.commons.jxpath.*;resolution:=optional,
> org.apache.xml.resolver.*;resolution:=optional,
> javax.servlet.*;resolution:=optional,
> org.apache.commons.jexl2.*;resolution:=optional,
> org.apache.commons.vfs2.*;resolution:=optional,
> *
> </commons.osgi.import>
> {code}
> See https://github.com/apache/commons-configuration/blob/trunk/pom.xml for
> both above.
> Due to the missing "resolution:=optional, commons-configuration2 cannot be
> deployed in an OSGi-environment not providing the optional bundles.
> Example error on deploy:
> {code}
> Unable to resolve Module[org.apache.commons.configuration:2.1.0]: missing
> requirement [Module[org.apache.commons.configuration:2.1.0]] package;
> (package=org.springframework.beans.factory)
> {code}
> Please have a look if you agree and add the missing instructions for the
> remaining optional dependencies.
> Manually fixed Import-package statement looks like this (disregarding
> line-breaks):
> {code}
> Import-Package:
> javax.naming,javax.servlet;resolution:=optional,javax.sql,javax.xml.parsers,javax.xml.transform,javax.xml.transform.dom,javax.xml.transform.stream,org.apache.commons.beanutils;resolution:=optional,org.apache.commons.codec.binary;resolution:=optional,org.apache.commons.jexl2;resolution:=optional,org.apache.commons.jxpath;resolution:=optional,org.apache.commons.jxpath.ri;resolution:=optional,org.apache.commons.jxpath.ri.compiler;resolution:=optional,org.apache.commons.jxpath.ri.model;resolution:=optional,org.apache.commons.lang3;version="[3.3,4)",org.apache.commons.lang3.builder;version="[3.3,4)",org.apache.commons.lang3.concurrent;version="[3.3,4)",org.apache.commons.lang3.mutable;version="[3.3,4)",org.apache.commons.lang3.text;version="[3.3,4)",org.apache.commons.lang3.text.translate;version="[3.3,4)",org.apache.commons.logging;version="[1.2,2)",org.apache.commons.logging.impl;version="[1.2,2)",org.apache.commons.vfs2;resolution:=optional,org.apache.commons.vfs2.provider;resolution:=optional,org.apache.xml.resolver;resolution:=optional,org.apache.xml.resolver.helpers;resolution:=optional,org.apache.xml.resolver.readers;resolution:=optional,org.apache.xml.resolver.tools;resolution:=optional,org.springframework.beans.factory;resolution:=optional,org.springframework.core.env;resolution:=optional,org.springframework.core.io;resolution:=optional,org.springframework.util;resolution:=optional,org.w3c.dom,org.xml.sax,org.xml.sax.helpers
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)