Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0054588Openbravo ERPA. Platformpublic2024-02-06 15:162024-02-08 15:22
shuehner 
Triage Platform Base 
normalminorhave not tried
closedfixed 
5
 
 
Core
No
0054588: Update ecj compile jar in eclipse-warnings to be able to check up to jdk21, keep older ecj for use with 11
Currently the eclipse-warnings repo
https://gitlab.com/openbravo/tools/ci/eclipse-warnings [^]

Is restricting the 'compliance' to java version parameter to a max 13 (so checking against jdk13).

We should update the ecj compiler in there to be able to check up to the latest jdk 21 (LTS)

Updating to ecj>4.27 requires to run the tool with java17 itself.

Always using ecj-4.30.jar (running with java17) causes warnings/errors when being used for old backoffice versions which do not support 17 cleanly or at all (i.e. jdk15 nashorn removal).
Check CI output for i.e. mod-merged-jdk21-pg15 job and notice output for eclipse-warnings artifact showing:

     [echo] Compiling. Compliance level 13...
Change logic to auto-detect java version used to run eclipse-warnings check.
When running java11 keep using existing older ecj-4.15.jar
otherwise use newer ecj-4.30.jar

As we only test/support java 11,17,21, (higher) this 11 or not check satifies ecj-4.30.jar being used with >=Java17

Also update compliance.max setting depending on the ecj version selected (13 vs 21)
No tags attached.
Issue History
2024-02-06 15:16shuehnerNew Issue
2024-02-06 15:16shuehnerAssigned To => Triage Platform Base
2024-02-06 15:16shuehnerModules => Core
2024-02-06 15:16shuehnerTriggers an Emergency Pack => No
2024-02-06 15:16shuehnerIssue generated from0054458
2024-02-06 15:17shuehnerDescription Updatedbug_revision_view_page.php?rev_id=27467#r27467
2024-02-06 15:34hgbotNote Added: 0160303
2024-02-08 15:22hgbotResolutionopen => fixed
2024-02-08 15:22hgbotStatusnew => closed
2024-02-08 15:22hgbotNote Added: 0160487
2024-02-08 15:22hgbotNote Added: 0160488

Notes
(0160303)
hgbot   
2024-02-06 15:34   
Merge Request created: https://gitlab.com/openbravo/tools/ci/eclipse-warnings/-/merge_requests/6 [^]
(0160487)
hgbot   
2024-02-08 15:22   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/tools/ci/eclipse-warnings [^]
Changeset: c3ae85dc0f726d202d64f3c3e1deee091ea7c5d0
Author: Stefan Huehner <stefan.huehner@openbravo.com>
Date: 06-02-2024 15:25:35
URL: https://gitlab.com/openbravo/tools/ci/eclipse-warnings/-/commit/c3ae85dc0f726d202d64f3c3e1deee091ea7c5d0 [^]

Fixed ISSUE-54588: Add newer ecj jar to support checking up to jdk21

- Current ecj-4.15.jar version allows to test up to jdk13 only
- Add newer ecj-4.30.jar which allows test up to jdk21
- Auto-select which jar to be used based on java version used to call
  ant
  - For Java>11 use ecj-4.30
    - It requires to be run with Java>=17. As we only test Java LTS
      version the 'not 11' condition is enough to ensure >=17
    - This allows us to test with compliance.max up to jdk21
    - Also switch to passing --release XX parameter to define compliance
      level.
  - For java11 keep using ecj-4.15.jar as we did before
    - Required for using it with old backoffice version we do not work
      cleanly / at all with Java>=17
    - That avoids warnings/compile errors checking i.e. <21Q1 still
      using Nashorn (removing in jdk15+)
    - Keep compliance.max as 13 (as before) in this case
- Conditional implemented with ant:if available with ant >=1.9.1
  System Requirements has >=1.9.2, even old Ubuntu 14.04 has 1.9.3

---
A ecj-4.30.jar
M build-eclipse.xml
---
(0160488)
hgbot   
2024-02-08 15:22   
Merge request merged: https://gitlab.com/openbravo/tools/ci/eclipse-warnings/-/merge_requests/6 [^]