vaadin / eclipse-plugin

Vaadin Plugin for Eclipse
https://vaadin.com/eclipse
16 stars 8 forks source link

Themes should be Valo based #745

Closed Wnt closed 7 years ago

Wnt commented 7 years ago

When creating a theme using new Vaadin theme wizard, the resulting theme is reindeer based. When using with Vaadin 8 reindeer is not on even classpath by default, so this results in theme compilation failure:

[ERROR] Aug 23, 2017 5:08:06 PM com.vaadin.sass.internal.handler.SCSSErrorHandler severe
[ERROR] SEVERE: Import '../reindeer/reindeer.scss' in '/path_to_my_project/src/main/webapp/VAADIN/themes/my-new-theme/styles.scss' could not be found
[ERROR] Aug 23, 2017 5:08:06 PM com.vaadin.sass.internal.handler.SCSSErrorHandler severe
[ERROR] SEVERE: Mixin Definition: reindeer not found
[ERROR] Compiling theme "VAADIN/themes/my-new-theme" failed
org.codehaus.mojo.gwt.shell.JavaCommandException: Command [[
/bin/sh -c '/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/bin/java' '-Xmx1G' 'com.vaadin.sass.SassCompiler' '/path_to_my_project/src/main/webapp/VAADIN/themes/my-new-theme/styles.scss' '/path_to_my_project/src/main/webapp/VAADIN/themes/my-new-theme/styles.css'
]] failed with status 1
    at org.codehaus.mojo.gwt.shell.JavaCommand.execute(JavaCommand.java:330)
    at com.vaadin.integration.maven.CompileThemeMojo.processTheme(CompileThemeMojo.java:65)
    at com.vaadin.integration.maven.AbstractThemeMojo.doExecute(AbstractThemeMojo.java:43)
    at org.codehaus.mojo.gwt.shell.AbstractGwtShellMojo.execute(AbstractGwtShellMojo.java:182)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    at org.apache.maven.lifecycle.internal.MojoExecutor.executeForkedExecutions(MojoExecutor.java:352)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:197)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8.357 s
[INFO] Finished at: 2017-08-23T17:08:06+02:00
[INFO] Final Memory: 14M/247M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.vaadin:vaadin-maven-plugin:8.1.0:compile-theme (default) on project hello-basics: Compiling theme "VAADIN/themes/my-new-theme" failed: Command [[
[ERROR] /bin/sh -c '/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/bin/java' '-Xmx1G' 'com.vaadin.sass.SassCompiler' '/path_to_my_project/src/main/webapp/VAADIN/themes/my-new-theme/styles.scss' '/path_to_my_project/src/main/webapp/VAADIN/themes/my-new-theme/styles.css'
[ERROR] ]] failed with status 1

Can make especially new users quite frustrated as this prevents the jetty:run configuration to start up the application.

samie commented 7 years ago

Maybe this should be fixed in archetype which are used to initialize the project?

hesara commented 7 years ago

Archetypes already use valo, but the new theme wizard is separate from them. The theme wizard should use valo as the base theme when Vaadin 7.3 or later is detected in the project, and reindeer otherwise. If it does not work for Vaadin Framework 8, there is some problem either in the project structure or in the version detection logic.

Was the project a new one created from an archetype? Which one? Or created some other way?

Wnt commented 7 years ago

I originally noticed this in a custom built project, but the same happens in a Vaadin plugin created archetype application based projects. E.g. in the attached project.

Eclipse plugin version is 4.0.0.final

themetest.zip

themetest_with_plugin_created_broken_theme.zip