4

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:

enter image description here

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.

siulkilulki
  • 1,054
  • 1
  • 10
  • 18
  • 1
    **1** How are you running your app? **2** What does your target dir look like, does it publish all your files? **3** Looks like IJ does not _see_ your `wbapp` folder as an application resources dir. Try reimporting your project by clicking the refresh button in the maven tool window. It should change the folder icon and hopefully publish your files. – Morfic Mar 22 '16 at 15:01
  • **1** By clicking green triangle in intellij. When I hover my mouse over it, it says (Run 'Tomcat 8.0.32') Inside Run/Debug Configurations under "Tomcat Server"/"Tomcat 8.0.32" it says also that before launch Make: Build 'ProjectMeetingManager:war exploded' artifact **2** http://postimg.org/gallery/1pf4xtn8y/f31fe345/ **3** Tried reimporting as you said. Icon not changed. **solved** Manually marking directory as resources root solved it. Did it like that: right click on webapp folder, then mark directory as, then choose resources root. – siulkilulki Mar 22 '16 at 15:51
  • Anyway thanks @Morfic. You steered me towards answer :) – siulkilulki Mar 22 '16 at 15:53

1 Answers1

7

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.

siulkilulki
  • 1,054
  • 1
  • 10
  • 18