[
https://issues.apache.org/jira/browse/ARTEMIS-3544?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17435980#comment-17435980
]
Benjamin Graf edited comment on ARTEMIS-3544 at 10/29/21, 6:05 PM:
-------------------------------------------------------------------
Yes, it's an example for the javax.persistence package but it should be the
same.
{{Because JCP specifications always try to maintain compatibility with earlier
versions, you should specify only the minimum package version for a javax.*
package and leave the upper boundary open. For example, suppose that a future
version of WebSphere® Application Server has a default JPA provider that
implements a version of JPA later than Version 2.0. In this case, the
application server can export the javax.persistence package at that later
version and still be resolved by applications that are written to work with JPA
1.0 or 2.0. Similarly, the following example import statement can resolve
against any version of the javax.persistence package at 1.0 or higher:
Import-Package: javax.persistence;version="1.0"}}
or have a look in [OSGi
spec|https://docs.osgi.org/specification/osgi.core/8.0.0/framework.module.html#d0e2270]
was (Author: graben):
Yes, it's an example for the javax.persistence package but it should be the
same.
{noformat}
Because JCP specifications always try to maintain compatibility with earlier
versions, you should specify only the minimum package version for a javax.*
package and leave the upper boundary open. For example, suppose that a future
version of WebSphere® Application Server has a default JPA provider that
implements a version of JPA later than Version 2.0. In this case, the
application server can export the javax.persistence package at that later
version and still be resolved by applications that are written to work with JPA
1.0 or 2.0. Similarly, the following example import statement can resolve
against any version of the javax.persistence package at 1.0 or higher:
Import-Package: javax.persistence;version="1.0"
{noformat}
> HawtIO Plugin OSGi import packages
> ----------------------------------
>
> Key: ARTEMIS-3544
> URL: https://issues.apache.org/jira/browse/ARTEMIS-3544
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Components: osgi, Web Console
> Affects Versions: 2.19.0
> Reporter: Benjamin Graf
> Priority: Minor
> Time Spent: 10m
> Remaining Estimate: 0h
>
> The build of artemis-plugin (HawtIO plugin) actually generates package import
> of javax.servlet with a narrow version range
> {noformat}javax.servlet;version="[2.6,3)"{noformat}
> even it is build against a 3.0 servlet API dependency. It might be better to
> export it like this
> {noformat}javax.servlet;version="2.6"{noformat} via osgi.import property
--
This message was sent by Atlassian Jira
(v8.3.4#803005)