Vaadin 7 + MPR CSS issue in production mode

When I run jetty:run-exploded -Pproduction with my Vaadin 7 app running under MPR, I get the following error in my log and my website does not look right. I know from [here]
(https://vaadin.com/docs/v13/flow/migration/6-theming.html#new-css-based-themes-no-sass) that SASS is no longer needed for Flow, but I thought, since it works fine in non-production mode, it would work in production mode. This type of issue is not documented at all under the MPR tutorial. In fact, it is highly implied by [this page]
(https://vaadin.com/docs/v13/mpr/configuration/legacy-theme.html#using-your-custom-theme) that it should work. So I am a little confused. Please advise.

Error:

Jun 26, 2019 12:24:24 PM com.vaadin.server.VaadinServlet serveOnTheFlyCompiledScss
INFO: Request for /VAADIN/themes/mobiwms/styles.css not handled by sass compiler while in production mode

Picture of wrong looking website, running in production mode, with jetty:run-exploded -Pproduction:

Picture of good looking website, in dev mode with mvn jetty:run:

And finally, the good looking website, in dev mode, with jetty:run-exploded:

Have you compiled the theme? In development mode Vaadin 7 compiles the theme on the fly, so that could be one reason.

Can you check that styles.css is packaged in your WAR file in correct place?

So if you are right, if I do a mvn clean package ( not production mode ), the corresponding war file should have the same problem as mvn clean package -Pproduction, shouldn’t it?

Well, that worked. Here are the steps I followed:

  1. mvn clean
  2. Built theme with “build theme” button in Eclipse
  3. mvn package -Pproduction

Of course, if I wanted the dev mode, I had to do mvn clean again, which is fine.

For whatever reason, whenever I “build theme” via eclipse, it causes eclipse to not like my pom. Simply running Maven->Update Project fixes this issue. No idea what caused it.

Now, I am confused as to why this is not a problem with dev mode war file, but I guess this is not a show stopper, so ignoring for now.

Update: mvn clean vaadin:update-theme -U package -Pproduction does not work. So far, I have to do each step separately, cannot do it in one mvn command. Not sure why, but the 3 steps are pretty easy, plus “Update Project” step.