jakartaee / faces

Jakarta Faces
Other
109 stars 55 forks source link

Add new TCK tests for 5.0 #1852

Open BalusC opened 1 year ago

BalusC commented 1 year ago

New TCK tests for:

TODO: this isn't working, GlassFish 7 basically complains Mojarra version can't be 5.0.0 or higher.

Caused by: org.osgi.framework.BundleException: Unable to resolve org.glassfish.main.web.weld-integration [228](R 228.0): missing requirement [org.glassfish.main.web.weld-integration [228](R 228.0)] osgi.wiring.package; (&(osgi.wiring.package=com.sun.faces.spi)(version>=4.0.0)(!(version>=5.0.0))) Unresolved requirements: [[org.glassfish.main.web.weld-integration [228](R 228.0)] osgi.wiring.package; (&(osgi.wiring.package=com.sun.faces.spi)(version>=4.0.0)(!(version>=5.0.0)))]

Can you please take a look @arjantijms

BalusC commented 1 year ago

After bumping to GF 7.0.10 it now throws

Caused by: java.lang.NoClassDefFoundError: org/jboss/weld/environment/se/WeldContainer

arjantijms commented 8 months ago

I don't know about 7.0.10. but in general GlassFish (via OSGi/Felix) has automatic protection enabled against updating anything by a major version.

This protection is in META-INF/MANIFEST.MF of each jar via a version range. E.g.

bnd glassfish8/glassfish/modules/weld-integration.jar | grep faces

[...]

 org.glassfish.weld.jsf;uses:="com.sun.faces.spi,jakarta.el,jakarta.faces.application,jakarta.servlet";version="8.0.0"
com.sun.faces.spi;version="[4.1,5)"
jakarta.faces.application;version="[4.1,5)"
jakarta.faces.context;version="[4.1,5)"

You can edit the MANIFEST.MF files manually in each jar, or build GlassFish with an updated pom.xml for the new versions.

dmatej commented 8 months ago

It is a default behavior of OSGI (maven felix plugin). It can be overriden, but increasing major version number usually means "breaking changes". And because OSGI is quite restrictive and respects also transitive dependencies, it causes many issues.

BalusC commented 3 months ago

Still failing with 8.0.0-JDK17-M7.

3. java.lang.IllegalStateException: Unable to resolve
    org.glassfish.main.web.weld-integration [229]
    missing requirement
        &(package = com.sun.faces.spi) (version >= 4.1.0) (!(version >= 5.0.0))

Still unclear how to bypass from app on, I've never really worked with OSGI before.

We basically cannot add/run TCKs for Faces 5.0 until a GlassFish version is available implementing Faces 5.0.

Feels like chicken-egg.

BalusC commented 2 months ago

Can anyone please help me sorting out this? This is blocking me from being able to develop new TCK tests for 5.0 because I'm unable to run them in order to verify if they work fine.