Auto-skip CSP-backport-incompatible ITs for Mojarra 4.0.17+ / 4.1.8+#2153
Merged
BalusC merged 2 commits intoApr 30, 2026
Merged
Conversation
The CSP backport (Mojarra 4.0.17 and 4.1.8) replaces inline event-handler attributes (onclick/onchange/onfocus/...) with trailing <script>mojarra.ael(...)</script> listeners. A handful of HtmlUnit-based 4.0 ITs assert against those now-empty inline attributes and can't be edited: - Issue2439IT (faces22/ajax) — reads input.onchange - Issue2674IT (faces22/ajax) — reads input.onfocus - Issue4331IT, Spec1238IT (faces23/searchExpression) — read input.onchange To avoid hand-passing -Dit.test=... on every run, parse mojarra.version in the validate phase via gmavenplus-plugin and, only when the version falls in 4.0.17+ or 4.1.8+, populate it.test with the exclusion pattern and set failsafe.failIfNoSpecifiedTests=false. Anything else (older Mojarra, 4.2.x, 5.x, or a non-Mojarra impl overriding mojarra.version) runs unfiltered. A user-supplied -Dit.test=... still wins. Lives only inside the glassfish-ci-managed profile, so MyFaces/Tomcat/Payara runs are untouched.
jasondlee
approved these changes
Apr 28, 2026
Contributor
|
Aha, seems we were hit by this right now: So just for the record how the failure looks like :-) - <mojarra.version>4.1.7</mojarra.version>
+ <mojarra.version>4.1.8</mojarra.version> |
Member
Author
|
Or use 4.1.9 instead. See also eclipse-ee4j/mojarra#5723 |
Contributor
Oh, wow, right on time! :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The CSP backport (eclipse-ee4j/mojarra#5606 for Mojarra 4.0.17 and 4.1.8) replaces inline event-handler attributes (onclick/onchange/onfocus/...) with trailing <script>mojarra.ael(...)</script> listeners. A handful of HtmlUnit-based 4.0 ITs assert against those now-empty inline attributes and can't be edited:
To avoid hand-passing -Dit.test=... on every run, parse mojarra.version in the validate phase via gmavenplus-plugin and, only when the version falls in 4.0.17+ or 4.1.8+, populate it.test with the exclusion pattern and set failsafe.failIfNoSpecifiedTests=false. Anything else (older Mojarra, 4.2.x, 5.x, or a non-Mojarra impl overriding mojarra.version) runs unfiltered. A user-supplied -Dit.test=... still wins.
Lives only inside the glassfish-ci-managed profile, so MyFaces/Tomcat/Payara runs are untouched.
cc: @jasondlee
Same PR for 4.0 here: #2152