[ 
https://issues.apache.org/jira/browse/TOMEE-4710?focusedWorklogId=1043629&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-1043629
 ]

ASF GitHub Bot logged work on TOMEE-4710:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 23/Sep/26 19:19
            Start Date: 23/Sep/26 19:19
    Worklog Time Spent: 10m 
      Work Description: jungm opened a new pull request, #2947:
URL: https://github.com/apache/tomee/pull/2947

   Fixes TOMEE-4710, generates 
lib/org/apache/catalina/util/ServerInfo.properties in the TomEE server bundle
   
   Other options considered:
   | Option | Why not |
   |---|---|
   | Flat `lib/tomee-server-info.jar` | Tomcat reads `lib/*.jar` in filesystem 
order, so the jar needs an explicit `common.loader` entry in 
`catalina.properties`. Users who keep their own `catalina.properties` silently 
lose it, and opting out takes two edits. |
   | Rewrite `ServerInfo.properties` inside `catalina.jar` | Smallest code, but 
`catalina.jar` no longer matches Apache's published checksums. |
   | Reflection / `Unsafe` on `ServerInfo.serverInfo` | JDK 12+ can't set 
`static final` fields via reflection. `Unsafe` warns at every startup since JDK 
24 and will be blocked. |
   | Java agent adding a generated jar to the system classpath at startup | 
Only works with `-javaagent`, writes a jar on every startup, and `catalina.sh 
version` wouldn't show it. |
   | Transform `ServerInfo` bytecode via the agent | Still patching Tomcat 
code, just at runtime. |
   
   Think this approach is the least code and least intrusive yet allows us to 
keep the TomEE version everywhere Tomcat shows its version (startup log, error 
pages etc)




Issue Time Tracking
-------------------

            Worklog Id:     (was: 1043629)
    Remaining Estimate: 0h
            Time Spent: 10m

> Don't patch catalina.jar just to print TomEE Version
> ----------------------------------------------------
>
>                 Key: TOMEE-4710
>                 URL: https://issues.apache.org/jira/browse/TOMEE-4710
>             Project: TomEE
>          Issue Type: Improvement
>            Reporter: Markus Jung
>            Priority: Major
>             Fix For: 11.0.0
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> This feels kind of hacky and breaks checksums, could throw users off that 
> want to validate the content of lib/



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to