sergeyCodenameOne / UberEatsClone

Grub is an UberEats clone. A full-featured cross-platform food delivery app template in Java/Kotlin for Android, iOS, Desktop & Web.
Apache License 2.0
444 stars 218 forks source link

installation issue - compiling the CSS files #15

Closed mizerek closed 1 year ago

mizerek commented 1 year ago

hi there

running ubuntu 22.04 fresh install with JDK 11.017. installed maven, unzipped source, ran mvn install

[ERROR] Failed to execute goal com.codenameone:codenameone-maven-plugin:7.0.36:css (cn1-process-classes) on project grub-common: An error occurred while compiling the CSS files. Inputs: /var/www/order/common/src/main/css/theme.css, output: /var/www/order/common/target/classes/theme.res, merge file: /var/www/order/common/target/css/theme.css -> [Help 1]

shai-almog commented 1 year ago

What's the rest of the error log?

mizerek commented 1 year ago

here's the whole thing:

[INFO] Exception in thread "main" java.lang.ExceptionInInitializerError [INFO] at com.codename1.designer.ResourceEditorApp._main(ResourceEditorApp.java:274) [INFO] at com.codename1.designer.ResourceEditorApp.main(ResourceEditorApp.java:258) [INFO] Caused by: java.awt.HeadlessException: [INFO] No X11 DISPLAY variable was set, but this program performed an operation which requires it. [INFO] at java.desktop/sun.java2d.HeadlessGraphicsEnvironment.getDefaultScreenDevice(HeadlessGraphicsEnvironment.java:58) [INFO] at com.codename1.impl.javase.JavaSEPort.calcRetinaScale(JavaSEPort.java:431) [INFO] at com.codename1.impl.javase.JavaSEPort.(JavaSEPort.java:662) [INFO] ... 2 more [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary for grub 1.0-SNAPSHOT: [INFO] [INFO] grub ............................................... SUCCESS [ 1.120 s] [INFO] grub-cn1libs ....................................... SUCCESS [ 0.130 s] [INFO] CodeRAD ............................................ SUCCESS [ 0.676 s] [INFO] grub-common ........................................ FAILURE [ 10.424 s] [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 12.937 s [INFO] Finished at: 2022-11-23T05:59:27Z [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal com.codenameone:codenameone-maven-plugin:7.0.36:css (cn1-process-classes) on project grub-common: An error occurred while compiling the CSS files. Inputs: /var/www/order.payfrit.com/common/src/main/css/theme.css, output: /var/www/order.payfrit.com/common/target/classes/theme.res, merge file: /var/www/order.payfrit.com/common/target/css/theme.css -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.codenameone:codenameone-maven-plugin:7.0.36:css (cn1-process-classes) on project grub-common: An error occurred while compiling the CSS files. Inputs: /var/www/order.payfrit.com/common/src/main/css/theme.css, output: /var/www/order.payfrit.com/common/target/classes/theme.res, merge file: /var/www/order.payfrit.com/common/target/css/theme.css at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192) at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105) at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957) at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289) at org.apache.maven.cli.MavenCli.main (MavenCli.java:193) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62) at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke (Method.java:566) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282) at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406) at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347) Caused by: org.apache.maven.plugin.MojoExecutionException: An error occurred while compiling the CSS files. Inputs: /var/www/order.payfrit.com/common/src/main/css/theme.css, output: /var/www/order.payfrit.com/common/target/classes/theme.res, merge file: /var/www/order.payfrit.com/common/target/css/theme.css at com.codename1.maven.CompileCSSMojo.executeImpl (CompileCSSMojo.java:175) at com.codename1.maven.AbstractCN1Mojo.execute (AbstractCN1Mojo.java:195) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192) at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105) at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957) at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289) at org.apache.maven.cli.MavenCli.main (MavenCli.java:193) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62) at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke (Method.java:566) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282) at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406) at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347) [ERROR] [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException [ERROR] [ERROR] After correcting the problems, you can resume the build with the command [ERROR] mvn -rf :grub-common

shai-almog commented 1 year ago

The error is:

[INFO] Caused by: java.awt.HeadlessException:
[INFO] No X11 DISPLAY variable was set, but this program performed an operation which requires it.

The JVM is running in headless mode and can't generate the CSS. You need to either setup X11 (Wayland etc.) or set up a substitute. The CSS generation logic needs to load a browser to do some edge cases in CSS parsing. The browser needs the UI toolkit running, etc.