[BUILD-319] Lombok 1.16.18 hinders compilation with Java 10 Created: 05/Jul/18 Updated: 14/Nov/18 Resolved: 14/Nov/18 |
|
| Status: | Closed |
| Project: | Build |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Neutral |
| Reporter: | Christoph Meier | Assignee: | Unassigned |
| Resolution: | Obsolete | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Template: |
|
||||||||
| Acceptance criteria: |
Empty
|
||||||||
| Date of First Response: | |||||||||
| Epic Link: | Build on JDK11+ | ||||||||
| Description |
|
Projects which are using Lombok org.projectlombok:lombok:jar:1.16.18 cannot be build with Java 10. (I have not tried it out with Java 9).
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:compile (default-compile) on project magnolia-privacy-cookie-manager: Fatal error compiling: java.lang.ExceptionInInitializerError: com.sun.tools.javac.code.TypeTags
The issue is known and already tackled and solved by lombock, see java.lang.ClassNotFoundException: com.sun.tools.javac.code.TypeTags #1651. Upgrading to lombok 1.18.0 seems to resolve the problem (only partially)?
mvn clean install -DskipTests -Dcheckstyle.skip=true -Dcargo.maven.skip
is successful, the modules can be built. However, a build attempt which includes the tests still fails. See error log on gist. |
| Comments |
| Comment by Mikaël Geljić [ 06/Jul/18 ] |
|
The test errors are NPEs in commons-lang; they are resolved by upgrading from 3.6 to 3.7 (which we already did on bom 5.7). We could use more recent libs and magnolia module versions in test scope (or proceed w/ extraction of the test-framework, providing an up-to-date jackrabbit/magnolia environment for RepositoryTestCases). |
| Comment by Mikaël Geljić [ 19/Oct/18 ] |
|
cmeier I just reopened and edited obsolete info on the epic, but then I guess we can close this one now |
| Comment by Mikaël Geljić [ 14/Nov/18 ] |
|
cmeier I think I finally got it, though privacy module still depends on Magnolia 5.6 as a baseline compatibility version. So that's where it gets the lombok version from. Tells me we should separate runtime libraries from build-time ones, and use a separate BOM for these (if not manage in parent POMs). At any rate, updating 3rd-party-bom to 6.0-SNAPSHOT gets the newer lombok version now (since $ mvn -v Apache Maven 3.5.3 (3383c37e1f9e9b3bc3df5050c29c8aff9f295297; 2018-02-24T20:49:05+01:00) Maven home: /usr/local/apache-maven-3.5.3 Java version: 11, vendor: Oracle Corporation Java home: /Library/Java/JavaVirtualMachines/jdk-11.jdk/Contents/Home Default locale: fr_FR, platform encoding: UTF-8 OS name: "mac os x", version: "10.14.1", arch: "x86_64", family: "mac" $ mvn clean test-compile ... [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] Magnolia Privacy (Parent POM) 1.0.2-SNAPSHOT ....... SUCCESS [ 2.760 s] [INFO] Cookie manager ..................................... SUCCESS [ 9.748 s] [INFO] Visitor manager .................................... SUCCESS [ 4.970 s] [INFO] magnolia-privacy-form .............................. SUCCESS [ 12.000 s] [INFO] magnolia-privacy-ui ................................ SUCCESS [ 7.528 s] [INFO] magnolia-privacy-sample 1.0.2-SNAPSHOT ............. SUCCESS [ 7.515 s] [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 45.994 s [INFO] Finished at: 2018-11-14T15:17:06+01:00 [INFO] ------------------------------------------------------------------------ |