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

Create new JSP option javaSourceLevel #25494

Merged
merged 6 commits into from
Jan 6, 2024

Conversation

volosied
Copy link
Member

@volosied volosied commented Jun 14, 2023

PR taken from Evan Jenning's #18359.

Current behavior:
The JSP option jdkSourceLevel takes JDK compile level as a string without the decimal. When Liberty is running with up to Java 11, accepted values are "13", "14", "15", "16", "17" and "18" (which represent JDK versions 1.3, 1.4, 1.5, 1.6, 1.7 and 1.8 respectively). Specify anything else and it defaults back to "13". When Liberty is running with Java 12 or higher, the accepted values are "17" and "18".

This change will deprecate jdkSourceLevel, so it will be used to only specify one of "13", "14", "15", "16", "17" and "18". Further, the new JSP parameter javaSourceLevel will be introduced to specify the Java level from 8 on up to the current running Java level (both "8" and "1.8" will be accepted for Java 8 compile level).

Fixes #7183, #20538, #25494, #18169 and #27171

@volosied volosied added release bug This bug is present in a released version of Open Liberty in:Web Components team:Sirius labels Jun 14, 2023
dmuelle
dmuelle previously approved these changes Jun 15, 2023
Copy link
Member

@dmuelle dmuelle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@posmith
Copy link

posmith commented Jun 15, 2023

L2 message review not required

@volosied volosied force-pushed the 7183-javaSourceLevel branch from c627317 to 1522813 Compare June 26, 2023 16:44
@volosied volosied force-pushed the 7183-javaSourceLevel branch from d6df827 to fde3f3c Compare July 17, 2023 20:15
@volosied
Copy link
Member Author

#build

@LibbyBot
Copy link

Your personal build request is at https://wasrtc.hursley.ibm.com:9443/jazz/resource/itemOid/com.ibm.team.build.BuildResult/_W5Zr0CTWEe6G1PEnFHKlyw

Target locations of links might be accessible only to IBM employees.

@LibbyBot
Copy link

The build volosied-25494-20230717-1323
https://wasrtc.hursley.ibm.com:9443/jazz/resource/itemOid/com.ibm.team.build.BuildResult/_W5Zr0CTWEe6G1PEnFHKlyw
completed and has errors or failures.

For help analyzing your personal build, go to https://libh-proxy1.fyre.ibm.com/cognitive/buildAnalysis.html?uuid=_W5Zr0CTWEe6G1PEnFHKlyw

@volosied volosied force-pushed the 7183-javaSourceLevel branch from fde3f3c to cc022d6 Compare July 18, 2023 19:06
@volosied volosied force-pushed the 7183-javaSourceLevel branch 4 times, most recently from c4cbf06 to b0c14c8 Compare July 19, 2023 22:24
@volosied
Copy link
Member Author

#build

@LibbyBot
Copy link

Your personal build request is at https://wasrtc.hursley.ibm.com:9443/jazz/resource/itemOid/com.ibm.team.build.BuildResult/_vrBhgCZ6Ee6G1PEnFHKlyw

Target locations of links might be accessible only to IBM employees.

@volosied volosied force-pushed the 7183-javaSourceLevel branch from fb7180e to 3a7fd55 Compare January 2, 2024 19:58
@volosied
Copy link
Member Author

volosied commented Jan 2, 2024

Java 2 Sec Build: https://wasrtc.hursley.ibm.com:9443/jazz/web/projects/WS-CD#action=com.ibm.team.build.viewResult&id=_pXEDoKmhEe6mAvAMVOSgKw

Build is good, but one warning was missed:

java.lang.Exception: Errors/warnings were found in server jspJava17Server logs:
 <br>[1/2/24, 20:18:37:841 PST] 0000002c com.ibm.ws.jsp                                               W CWWJS0005W: Both javaSourceLevel=17 and jdkSourceLevel=18 are specified. Defaulting to javaSourceLevel=17
	at componenttest.topology.impl.LibertyServer.checkLogsForErrorsAndWarnings(LibertyServer.java:3303)
	at componenttest.topology.impl.LibertyServer.stopServer(LibertyServer.java:3138)

Updated this PR.

@volosied volosied force-pushed the 7183-javaSourceLevel branch from 3a7fd55 to b277eea Compare January 3, 2024 14:26
@volosied
Copy link
Member Author

volosied commented Jan 3, 2024

#build

@LibbyBot
Copy link

LibbyBot commented Jan 3, 2024

Your personal build request is at https://wasrtc.hursley.ibm.com:9443/jazz/resource/itemOid/com.ibm.team.build.BuildResult/_v8xBgKo_Ee6mAvAMVOSgKw

Target locations of links might be accessible only to IBM employees.

@LibbyBot
Copy link

LibbyBot commented Jan 4, 2024

The build volosied-25494-20240103-0704
https://wasrtc.hursley.ibm.com:9443/jazz/resource/itemOid/com.ibm.team.build.BuildResult/_v8xBgKo_Ee6mAvAMVOSgKw
completed and has errors or failures.

For help analyzing your personal build, go to https://libh-proxy1.fyre.ibm.com/cognitive/buildAnalysis.html?uuid=_v8xBgKo_Ee6mAvAMVOSgKw

@volosied
Copy link
Member Author

volosied commented Jan 4, 2024

JSP tests passed -- only unrelated failures.
image

@volosied volosied force-pushed the 7183-javaSourceLevel branch from b277eea to 9d463cd Compare January 5, 2024 19:45
@volosied volosied force-pushed the 7183-javaSourceLevel branch from 8c6fc97 to 0672649 Compare January 5, 2024 19:52
@volosied volosied requested review from pnicolucci and helyarp January 5, 2024 19:55
@volosied
Copy link
Member Author

volosied commented Jan 6, 2024

#libby

1 similar comment
@volosied
Copy link
Member Author

volosied commented Jan 6, 2024

#libby

@LibbyBot
Copy link

LibbyBot commented Jan 6, 2024

Code analysis and actions

DO NOT DELETE THIS COMMENT.
  • 10 product code files were changed.

  • Please describe in a separate comment how you tested your changes.

  • 1 test infrastructure code files were changed.

  • Test failures/errors in the build could be due to these changes.

  • 26 FAT files were changed, added, or removed.

  • Check that the build did not break the affected FAT suite(s).

  • 1 messages files were changed and need an L2 review.

  • @OpenLiberty/message-reviewer Please review.

  • dev/com.ibm.ws.jsp/resources/com/ibm/ws/jsp/resources/messages.nlsprops

  • 2 NLS files were changed and need an ID review.

  • @OpenLiberty/message-reviewer Please review.

  • dev/com.ibm.ws.jsp/resources/com/ibm/ws/jsp/resources/messages.nlsprops

  • dev/com.ibm.ws.jsp/resources/OSGI-INF/l10n/metatype.properties

@volosied volosied requested a review from dmuelle January 6, 2024 19:31
@volosied volosied dismissed dmuelle’s stale review January 6, 2024 19:34

Changes made

@volosied volosied merged commit 2382685 into OpenLiberty:integration Jan 6, 2024
2 checks passed
Copy link

@helyarp helyarp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor changes suggested for messages.nlsprops. I'll add the ID reviewed label now.

jsp.useinmemory.warning=CWWJS0004W: The 'useInMemory' JSP Option is not supported. The JSPs will be compiled and saved on disk instead.
jsp.useinmemory.warning.explanation=This feature was never ported from Traditional WebSphere for historical reasons.
jsp.useinmemory.warning.useraction=Remove the useInMemory option from the server.xml, ibm-web-bnd.xml, or the ibm-web-ext.xmi files.

pages.removed.element.error=CWWJS0005E: The {0} element was removed in Pages 4.0 and therefore is no longer supported.
pages.removed.element.error.explanation=The jsp plugin and related actions were deprecated in Pages 3.1 and removed in 4.0.
pages.removed.element.error.useraction= Remove the jsp plugin, fallback, and params elements from your web app.

jsp.javasourcelevel.warning=CWWJS0006W: The specified javaSourceLevel={0} value exceeds the {1} installed Java level. Therefore, the default Java level is set to {1}.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The warning and explanation would be better if they started with "The"

  • "The {0} value..."
  • "The file cannot ..."

jsp.javasourcelevel.warning.explanation=File cannot be compiled with a higher source than the available JDK level.
jsp.javasourcelevel.warning.useraction=Specify a javaSourceLevel value that is less than or equal to the available JDK level.

jsp.bothsourcelevelset.warning=CWWJS0007W: Both javaSourceLevel={0} and jdkSourceLevel={1} are specified. Defaulting to javaSourceLevel={0}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Put a period after the ending {0} unless the result would be confusing.

jsp.javasourcelevel.warning.useraction=Specify a javaSourceLevel value that is less than or equal to the available JDK level.

jsp.bothsourcelevelset.warning=CWWJS0007W: Both javaSourceLevel={0} and jdkSourceLevel={1} are specified. Defaulting to javaSourceLevel={0}
jsp.bothsourcelevelset.warning.explanation= Only one source level attribute can be used at a time.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the space after the = in the warning, explanation, and useraction unless the space is needed. Other messages don't have the space.

Also, use one space between sentences in the useraction.

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

Successfully merging this pull request may close these issues.

Allow a JSP option to accept java levels to at least 17
7 participants