You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Konrad Windszus (Jira)" <ji...@apache.org> on 2020/09/16 15:14:00 UTC

[jira] [Updated] (FELIX-5100) PackageAdmin WebConsole tab "Dependency Finder" always exposes the first maven dependency found in the bundle

     [ https://issues.apache.org/jira/browse/FELIX-5100?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Konrad Windszus updated FELIX-5100:
-----------------------------------
    Description: 
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-dev/blob/dba0764803da2b9228876fc1b2d4e8acc9115ed2/webconsole-plugins/packageadmin/src/main/java/org/apache/felix/webconsole/plugins/packageadmin/internal/WebConsolePlugin.java#L320)
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 JARs the 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!

  was:
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-dev/blob/dba0764803da2b9228876fc1b2d4e8acc9115ed2/webconsole-plugins/packageadmin/src/main/java/org/apache/felix/webconsole/plugins/packageadmin/internal/WebConsolePlugin.java#L320)
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!


> 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-dev/blob/dba0764803da2b9228876fc1b2d4e8acc9115ed2/webconsole-plugins/packageadmin/src/main/java/org/apache/felix/webconsole/plugins/packageadmin/internal/WebConsolePlugin.java#L320)
> 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 JARs the 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
(v8.3.4#803005)