gwt-maven-archetypes icon indicating copy to clipboard operation
gwt-maven-archetypes copied to clipboard

Run projet in prod mode with jetty

Open freddyboucher opened this issue 5 months ago • 1 comments

Hi, how to run the project in prod mode ? When I do: mvn clean install -am then run mvn jetty:run -pl *-server -am First I got the following error

Webapp config failure: *-server/target/jetty_overlays is not an existing directory.

So I have to add manually a jetty_overlays folder then when I run again mvn jetty:run -pl *-server -am And open the page, it does not load app.nocache.js

GET http://localhost:8080/app/app.nocache.js net::ERR_ABORTED 404 (Not Found)

To fix this I had to add the webAppSourceDirectory configuration

<plugin>
  <groupId>org.eclipse.jetty</groupId>
  <artifactId>jetty-maven-plugin</artifactId>
  <configuration>
    ...
    <webAppSourceDirectory>target/*-server-1.0-SNAPSHOT</webAppSourceDirectory>
  </configuration>
</plugin>

Thanks

freddyboucher avatar Sep 30 '24 19:09 freddyboucher