Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

installation issue - compiling the CSS files #15

Closed
mizerek opened this issue Nov 22, 2022 · 3 comments
Closed

installation issue - compiling the CSS files #15

mizerek opened this issue Nov 22, 2022 · 3 comments

Comments

@mizerek
Copy link

mizerek commented Nov 22, 2022

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
Copy link
Collaborator

What's the rest of the error log?

@mizerek
Copy link
Author

mizerek commented Nov 23, 2022

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
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants