Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API 2.1 excludes EE 10 versions in Manifest #310

Closed
arjantijms opened this issue Nov 4, 2022 · 6 comments · Fixed by #311
Closed

API 2.1 excludes EE 10 versions in Manifest #310

arjantijms opened this issue Nov 4, 2022 · 6 comments · Fixed by #311

Comments

@arjantijms
Copy link

The Manifest of the latest 2.1 API (RC6) contains the following import line:

Import-Package: jakarta.enterprise.util;version="[3.0,4)",jakarta.inje
 ct;version="[2.0,3)",jakarta.json;version="[2.0,3)"

This will fail on EE 10 OSGi environments such as GlassFish 7:

org.glassfish.embeddable.GlassFishException: Unable to resolve
    org.glassfish.main.webservices.connector [217]
    missing requirement
        &(package = org.glassfish.web.deployment.descriptor) (version >= 7.0.0) (!(version >= 8.0.0))
        caused by:
            Unable to resolve
                org.glassfish.main.web.glue [123]
                missing requirement
                    &(package = org.omnifaces.jwt.servlet) (version >= 2.0.0) (!(version >= 3.0.0))
                    caused by:
                        Unable to resolve
                            org.omnifaces.jwt [195]
                            missing requirement
                                &(package = org.eclipse.microprofile.jwt) (version >= 2.0.0) (!(version >= 3.0.0))
                                caused by:
                                    Unable to resolve
                                        org.eclipse.microprofile.jwt [117]
                                        missing requirement
                                            &(package = jakarta.enterprise.util) (version >= 3.0.0) (!(version >= 4.0.0)))]]]
@sberyozkin
Copy link
Contributor

@Emily-Jiang Hi, what is the right fix here such that it is consistent with other MP specs ? I believe OpenLiberty also has some OSGI constraints ?

@Emily-Jiang
Copy link
Member

@Emily-Jiang Hi, what is the right fix here such that it is consistent with other MP specs ? I believe OpenLiberty also has some OSGI constraints ?

Since MP JWT 2.1 works with Jakarta EE 9.1 and it uses the "Compile low, run high", this spec primarily works with EE 9.1 but also works with Jakarta EE 10 Core Profile. In Open Liberty, we did manifest rewrite to allow the bundlised version working with EE 10. I think we can fix this in the bnd.bnd to make the version range inculde EE 10 range if necessary.

@radcortez
Copy link
Contributor

I agree that it should be open to allow "compile low, run high", but it doesn't seem consistent with the discussion on the ML when @dblevins brought this up.

If we enforce a minimum on EE 10 at the platform level, then all platform specifications should also enforce the minimum requirements.

@Emily-Jiang
Copy link
Member

I agree that it should be open to allow "compile low, run high", but it doesn't seem consistent with the discussion on the ML when @dblevins brought this up.

If we enforce a minimum on EE 10 at the platform level, then all platform specifications should also enforce the minimum requirements.

It does operate on "compile low, run high". However, the manifest was not opened up for EE 10, as normally major version changes could break things. Since we have tested JWT 2.1 works with EE 10, its manifest can be relaxed to embrace CDI 4.0. I have done a PR to fix this.

@Emily-Jiang
Copy link
Member

Emily-Jiang commented Nov 7, 2022

@sberyozkin @arjantijms I have provided a PR #311 to fix this.

@arjantijms
Copy link
Author

In Open Liberty, we did manifest rewrite to allow the bundlised version working with EE 10.

Incidentally, we have a manifest rewriter available in GlassFish as well. But using it always feels like a hack, and if possible we like to avoid using it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants