-
Notifications
You must be signed in to change notification settings - Fork 914
add new jakarta faces libraries #9077
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
base: master
Are you sure you want to change the base?
Conversation
42f2fbe to
2b8af95
Compare
2b8af95 to
30ba6cf
Compare
|
Seems like it was a license formatting issue. Hope it's ok now. |
matthiasblaesing
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for looking into this.
The general ideal looks sane to me. I'd like to see a different approach to the way DefaultFaceletLibraries is now half singleton, half instance based. The license file for Faces 4.1 needs a slight update. I left inline comments.
| @@ -0,0 +1,93 @@ | |||
| Name: Jakarta Faces | |||
| Version: 4.1.3 | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to match the filename. I.e. the license file declaring version 4.1.3 should be named jakarta.faces-4.1.3-license.txt and the file jakarta.faces-4.1.5-license.txt should declare version 4.1.5.
| License: EPL-v20 | ||
| Description: Jakarta Faces 4.1.5 | ||
| Origin: Eclipse Foundation (https://repo1.maven.org/maven2/org/glassfish/jakarta.faces/4.1.5/) | ||
| Files: jakarta.faces-4.1.5.jar |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just for information: This is only needed if the license file does not match the target filename. For the latter case take a jar, strip the .jar, append -license.txt and you have a matching name.
| public static synchronized DefaultFaceletLibraries getInstance() { | ||
| if (INSTANCE == null) { | ||
| INSTANCE = new DefaultFaceletLibraries(); | ||
| INSTANCE = new DefaultFaceletLibraries(JsfVersion.JSF_2_3); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes me nervous. Shouldn't the callers of getInstance updated to get correctly versioned variants? You create an instance per Version and get JsfVersion as parameter. Having both singletons and explicitly created instances seems wrong to me.
|
I tried to remove the singleton from DefaultFaceletsLibraries, but it fails when the jsf impl uses the jakarta namespace: Exceptionjava.lang.VerifyError: Bad type on operand stack
Exception Details:
Location:
org/netbeans/modules/web/jsf/editor/facelets/mojarra/ConfigManager.publishPostConfigEvent()V @36: invokevirtual
Reason:
Type 'com/sun/faces/el/ELContextImpl' (current frame, stack[0]) is not assignable to 'javax/el/ELContext'
Current Frame:
bci: @36
flags: { }
locals: { 'org/netbeans/modules/web/jsf/editor/facelets/mojarra/ConfigManager', 'javax/faces/context/FacesContext', 'javax/faces/application/Application', 'com/sun/faces/el/ELContextImpl' }
stack: { 'com/sun/faces/el/ELContextImpl', 'java/lang/Class', 'javax/faces/context/FacesContext' }
Bytecode:
0000000: b800 574c 2bb6 01ce 4d01 2bc0 005d b601
0000010: d2a6 0072 bb01 d659 2cb6 01d8 b701 de4e
0000020: 2d12 582b b601 e12b b601 e73a 0401 1904
0000030: a500 0c2d 1904 b601 ebb6 01f1 2cb6 01f5
0000040: 3a05 1905 be9e 0036 bb01 f959 2db7 01fb
0000050: 3a06 1905 3a07 1907 be36 0803 3609 1509
0000060: 1508 a200 1919 0715 0932 3a0a 190a 1906
0000070: b901 fe02 0084 0901 a7ff e62b c000 5d2d
0000080: b602 042c 2b13 0207 1301 d92c b602 09b1
0000090:
Stackmap Table:
full_frame(@60,{Object[#11],Object[#88],Object[#473],Object[#482],Object[#492]},{})
full_frame(@94,{Object[#11],Object[#88],Object[#473],Object[#482],Object[#492],Object[#841],Object[#505],Object[#841],Integer,Integer},{})
full_frame(@123,{Object[#11],Object[#88],Object[#473],Object[#482],Object[#492],Object[#841]},{})
chop_frame(@131,3)
Should I create a JakartaConfigManager which uses the new classes? Not sure if possible because the class uses com.sun.faces classes coming from javax version... |
This adds new default libraries for JSF/Faces 3.0, 4.0 and 4.1



This also changes the frameworks wizard, now the registered libraries are only selectable if compatible, this screenshot is taken from a project targeting Tomcat 10.1/Jakarta EE 10:
Fixes #8855
^Add meaningful description above
Click to collapse/expand PR instructions
By opening a pull request you confirm that, unless explicitly stated otherwise, the changes -
Please make sure (eg.
git log) that all commits have a valid name and email address for you in the Author field.If you're a first time contributor, see the Contributing guidelines for more information.
If you're a committer, please label the PR before pressing "Create pull request" so that the right test jobs can run.
PR approval and merge checklist:
If this PR targets the delivery branch: don't merge. (full wiki article)