Vaadin can't find my themes

感情迁移 提交于 2019-12-12 11:45:20

问题


I've got below error:

INFO: Requested resource [/VAADIN/themes/mytheme/styles.css] not found from filesystem or through class loader. Add widgetset and/or theme JAR to your classpath or add files to WebContent/VAADIN folder.

I'm using intellij. Here is my folder structure:

My mytheme.scss:

@import "../valo/valo.scss";
@mixin mytheme {
    @include valo;
    .v-button {
        color: blue;
        background: yellow;
    }
}

My styles.scss:

@import "mytheme.scss";
@import "addons.scss";
.mytheme {
    @include mytheme;
    @include addons;
}

My web.xml: http://wklej.org/id/2144139/

My pom.xml: http://wklej.org/id/2144140/

I have compiled scss like in docs https://vaadin.com/docs/-/part/framework/themes/themes-compiling.html#themes.compiling.maven and I'm not in production mode.

I don't know what I'm doing wrong.


回答1:


Manually marking directory as resources root solved it.

Did it like that in Intellij:

  1. Right click on webapp folder
  2. then "Mark Directory As"
  3. then choose "Resources Root"

It's surprising that simply marking the folder solves the problem.



来源:https://stackoverflow.com/questions/36157728/vaadin-cant-find-my-themes

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!