Problem running build in fresh Ubuntu machine

Hi,
I am getting the following error when building in fresh machine:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app-global:compileJava'. log.txt (19.8 KB)

this is the java version after running apt install default-jre

java --version
openjdk 10.0.2 2018-07-17
OpenJDK Runtime Environment (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.4)
OpenJDK 64-Bit Server VM (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.4, mixed mode)

this is my build command:
/opt/gradle/gradle-4.10.2/bin/gradle --info --stacktrace -b build.gradle buildUberJar

log.txt (19.8 KB)
thanks

Please try to create and build en empty Java project first. Most likely you have problem with JDK installation

thanks. Can you tell me whats the appropreate ubuntu command for that?
Thanks

Hi,

The error relates to the Lombok and Java 10.
Error:

Caused by: java.lang.ClassNotFoundException: com.sun.tools.javac.code.TypeTags
        at lombok.launch.ShadowClassLoader.loadClass(ShadowClassLoader.java:373)
        at lombok.javac.JavacTreeMaker$SchroedingerType.getFieldCached(JavacTreeMaker.java:156)
        at lombok.javac.JavacTreeMaker$TypeTag.typeTag(JavacTreeMaker.java:244)
        at lombok.javac.Javac.<clinit>(Javac.java:154)
        ... 165 more

Perhaps Lombok doesn’t support Java 10/11. See Unable to use Lombok with Java 11 - Stack Overflow

Also CUBA 6.* supports only Java 8.

Do you have a tutorial of how to build a build machine?
Thanks

Please execute command: sudo apt-get install openjdk-8-jdk, and set JAVA_HOME variable. Unfortunately there is no documentation for creating build machine.

1 Like