Closed bmarwell closed 6 months ago
@bmarwell Thank you for bringing this to our attention. We will have to look into this further in order to answer your specific questions.
It completely ignores the server.xml properties which are both valid:
<jspEngine javaSourceLevel="21" />
or
@bmarwell Was there a second part to this comment?
It completely ignores the server.xml properties which are both valid:
<jspEngine javaSourceLevel="21" />
or@bmarwell Was there a second part to this comment?
I fixed the formatting to reveal this..
Related issue we may want to consider when fixing this issue - #1467
Thanks for fixing the formatting. Quick question: can I somehow use another plugin to compile JSPs?
Quick question: can I somehow use another plugin to compile JSPs?
I don't think so. I have a fix up for review and can create a snapshot by EOB today. Will you be able to test it @bmarwell ?
Does the plugin actually update the web.xml file as other plugins do?
No, it only copies the compiled jsp class files into the application binary.
Do JSP files compiled with compile-jsp work on other application servers or does it compile against the OpenLiberty API?
It compiles with the jsp-2.2 / jsp-2.3 feature from OpenLiberty.
Quick question: can I somehow use another plugin to compile JSPs?
I don't think so. I have a fix up for review and can create a snapshot by EOB today. Will you be able to test it @bmarwell ?
Sadly no, I don't have access to the source code of that app. I'll check with my colleagues tomorrow if they can do it.
The fix is in the 3.10.3-SNAPSHOT
. If I don't receive any feedback on the fix, I will go ahead and publish a minor fix release including the fix on Wednesday most likely.
The fix is in the
3.10.3-SNAPSHOT
. If I don't receive any feedback on the fix, I will go ahead and publish a minor fix release including the fix on Wednesday most likely.
will build and distribute here momentarily
@bmarwell I saw some feedback in the support case that maven.compiler.source
no longer works? I have a test case specific for that and it is passing. Can the developer of the app post a pom.xml snippet of how the maven.compiler.source
is getting specified so I can try to recreate?
Couple of points:
javaSourceLevel
attribute on the jspEngine
element. So if something other than a LTS release is specified in the maven.compiler.source
or maven.compiler.release
, the compile-jsp
goal is not going to work correctly. Do we need to add hard-coded logic to adjust the java version specified to the nearest LTS? For example, if you specify maven.compiler.release = 22
should we automatically use javaSourceLevel="21"
? This seems like it would be problematic which is why I did not address it in my PR.
Hi,
when migrating to 11/17, we caught an error in the CompileJspMojo logic:
https://github.com/OpenLiberty/ci.maven/blob/9b96fb6bd9190eebd4cc2928639ba86f18702135/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/jsp/CompileJspMojo.java#L94
Potential issues
it tries to read "source" from the maven war plugin. However:
maven.compiler.release
seems ignored which is the better option, if set.<jspEngine javaSourceLevel="21" />
or<jspEngine jdkSourceLevel="18" />
While both work, the current docs only mention "javaSourceLevel" to avoid confusion: jdkSourceLevel uses "18" for "1.8" or simply "8" and does not go beyond that.
Recommended changes
Other changes
Breaking changes
Other things to be aware of
I found that jsp-level (2.2/2.3) could have been read from server.xml as well. You might want to open another ticket for this.