WebContent Folder

Hi everybody,

i´m trying to run a vaadin 7 maven project with a custom theme but i cant find the vaadin/webcontent folder with the styles.css file.

can anybody help me?

Maven project don’t have a WebContent folder. The theme normally is inside the src/main/resources/VAADIN/themes/ folder.

As far as I know, it’s under [tt]
src/main/webapp
[/tt], not [tt]
resources
[/tt]. The resources are stuff that will be available from class loader, but hidden from web access.

The Vaadin Maven archetypes create that directory and a theme template.

But thanks noting anyhow.

Ok i looked into it again and it seems like back in Vaadin 6 the maven archetypes created the theme in src/main/resources and this still works in Vaadin 7 (I have a migrated project in which this is the case) but the newly created archetypes put the themes in the src/main/webapp/ folder.

So i’m guessing both ways would work but to be more consistent with newly created projects you should use the one in src/main/webapp as Marko suggested.

ok thanks for your help but i´ve only found the folders
src/main/wepapp/META-INF and src/main/wepapp/WEB-INF

there is no vaadin folder

I think some archetypes don’t include a themes folder right away but you can create it yourself. The structure would be like this:
src/main/webapp/VAADIN/themes/YourTheme/styles.css

When you then add something like:
@Theme(“YourTheme”)
in your UI class it should pick up the css.