Konrad Windszus created FELIX-5100:
--------------------------------------

             Summary: PackageAdmin WebConsole tab "Dependency Finder" always 
exposes the first maven dependency found in the bundle
                 Key: FELIX-5100
                 URL: https://issues.apache.org/jira/browse/FELIX-5100
             Project: Felix
          Issue Type: Bug
          Components: Web Console
    Affects Versions: webconsole-packageadmin-plugin 1.0.2
            Reporter: Konrad Windszus
            Priority: Minor


To look up which maven dependency can be used for a certain package, the Maven 
GAV information is extracted from the first "pom.properties" within 
"META-INF/maven" of that bundle 
(https://github.com/apache/felix/blob/trunk/webconsole-plugins/packageadmin/src/main/java/org/apache/felix/webconsole/plugins/packageadmin/internal/WebConsolePlugin.java#L280)
That does 
a) only work for bundles which have been created with the maven-bundle-plugin
b) only work in case the bundle does not embed other things

For example if you deploy 
httpcore-osgi 
(https://repo1.maven.org/maven2/org/apache/httpcomponents/httpcore-osgi/4.4.4/httpcore-osgi-4.4.4.pom)
 which embeds two JARsthe the "pom.properties" of one embedded jar 
(httpcore-nio) is found first in the bundle whenever you look for any package 
being exported by the bundle, e.g. "org.apache.http".
That algorithm should be more robust by additionally checking for the packaging 
"bundle" in the according "pom.xml" in case there are multiple "pom.properties" 
found!



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to