Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [orbit-dev] osgi.bnd, imports and declared dependencies

On Wed, 2020-04-22 at 21:15 +0000, Homer, Tony wrote:
> I’m working on the Import-Package section of osgi.bnd for
> org.mandas.docker-client_3.2.1 and have a question.
> When ebr generates the versions list at the top of osgi.bnd, it
> appears to make its list by parsing the dependencies section of
> pom.xml for the artifact.
> In the case of org.mandas.docker-client_3.2.1 I get *versions-list*
> as shown below.
> I manually parsed the imports from the sources of org.mandas.docker-
> client_3.2.1 and got *imports-list* as shown below.
> For the imports which are provided by declared dependencies, I
> believe I can just make the list and use the declared version – no
> problem there.
> What about the imports which are not coming from declared
> dependencies, for example “org.apache.http”?
> Do I still list them in Import-Package?
> Can I omit the “;version=” clause for those items?

Is it assumed that httpcomponents-core would be provided by the runtime
environment? Keep in mind that the upstream build doesn't prepare their
content to be used in an OSGi runtime so the pom dependencies can
sometimes be deceptive.

If the library will clearly be utilized then, I would definitely
include it with a version range for httpcomponents that would be used
from Orbit. Leaving out the version range makes it unbounded which can
lead to all sorts of unexpected behaviour down the road.

Roland Grunberg

Back to the top