corona-warn-app / cwa-verification-server

Backend implementation of the verification process
Apache License 2.0
343 stars 105 forks source link

Lombok version upgrade required #244

Closed Abdullah-Shahen closed 2 years ago

Abdullah-Shahen commented 3 years ago

Describe the bug

While building the project on my local machine using maven, I faced the following build error: Fatal error compiling: java.lang.IllegalAccessError: class lombok.javac.apt.LombokProcessor (in unnamed module @0x6b578779) cannot access class com.sun.tools.javac.processing.JavacProcessingEnvironment (in module jdk.compiler) because module jdk.compiler does not export com.sun.tools.javac.processing to unnamed module @0x6b578779

After some investigation, I found out, that the error is linked to the used Lombok version (1.18.16).

Expected behaviour

The maven build should run successfully on any machine.

Steps to reproduce the issue

  1. Clone the project (If not already done)
  2. Build the project on your machine using maven. e.g. mvn clean install
  3. Scroll down to see the above mentioned error.

Logs:

[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ cwa-verification-server ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 46 source files to /Users/name/Developer/Open-Source/cwa-verification-server/target/classes
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  5.303 s
[INFO] Finished at: 2021-10-10T16:27:35+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project cwa-verification-server: Fatal error compiling: java.lang.IllegalAccessError: class lombok.javac.apt.LombokProcessor (in unnamed module @0x6b578779) cannot access class com.sun.tools.javac.processing.JavacProcessingEnvironment (in module jdk.compiler) because module jdk.compiler does not export com.sun.tools.javac.processing to unnamed module @0x6b578779 -> [Help 1]

Technical details

Possible Fix

Upgrade to Lombok 1.18.20 (Verified this fix on my machine)

Additional context

I'd like to create a PR for this fix but I cannot push to the CWA Project due to lack of permission (HTTP-403)

f11h commented 2 years ago

Hello @Abdullah-Benomar-Shahen ,

I've created a PR adressing this issue (#259 ). It should be fixed when its merged.

You've stated that you would like to contribute to fix this problem but you do not have required rights. Thats right you are not allowed to directly push to this repository. Please have a look in this guide on how to contribute to OS projects :) https://opensource.guide/how-to-contribute/#opening-a-pull-request

AfamO commented 2 years ago

This possible fix- using Lombok 1.18.20-actually worked in my machine.