Vaadin Eclipse Plugin: "Unable to locate WebContent folder"

Hello everyone,

we are using Vaadin’s Eclipse Plugin for a Vaadin Project (with gradle as build tool). Every time I start up Eclipse, or after I perform a clean build, I get the following error from Eclipse in a popup window:


‘Building workspace’ has encountered a problem.
Errors occured during the build.

The detail view of the problem reveals:


Errors running builder ‘Addon Styles Builder’ on project ‘com.example.vaadinwebapp’
Unable to locate WebContent folder. Ensure the project is a dynamic web project.

Well… the project definitly is a dynamic web project. It has the dynamic web project facet (version 3.0) plus the vaadin facet.

Our project structure looks like this:

src/main/java
src/main/resources
src/main/webapp

  • VAADIN
  • VAADIN.themes
  • VAADIN.widgetsets
  • META-INF

Is there something wrong with our structure? We try to go entirely without web.xml files.

I’d be grateful for any advice, that error message does not seem to cause any trouble (app runs just fine), but it’s really annoying and it makes me feel uneasy.

Kind regards,

Martin

If the dynamic web facet is configured correctly to use src/main/webapp as the WebContent directory, this should work. Perhaps we have forgotten a hard-coded WebContent path somewhere in the theme update part of the Eclipse plug-in, though - if so, please
create a ticket
about the issue.

In the meanwhile, you could simply remove the add-on theme builder from the project configuration - it is only used to automatically update addons.scss when add-on JARs with a theme listed in the manifest are added to the project.

Hi,

thanks for the response. I’m not entirely sure if my project facet is set up correclty. In “Project → Properties → Deployment Assembly”, the folder “src/main/webapp” has it’s “Deploy Path” set to “WEB-INF/classes”. Is that correct?

The addon styles builder aside, everything else seems to work just fine, including running the Vaadin app via “Run As → Run On Server”.

So I’m not certain if it’s a bug, or just a mistake in my setup. Either way, I followed your advice and disabled the builder for now.

Thanks,

Martin

If I remember correctly, the deployment assembly for a WAR project should normally map src/main/webapp to “/” - it is common to have a WEB-INF directory (as well as META-INF and possibly VAADIN for some static resources) inside src/main/webapp.

When deploying it to WEB-INF/classes, static resources probably work thanks to a classpath search fallbac strategy, but some other things might not work.