web applications - No webapp folder in output jar -
i'm building simple web application using vaadin , spring boot. when build using mvn package
, run via java -jar <path_to_jar>
seems work.
but 1 thing puzzles me. when i'm inside project folder , run java -jar target/app.jar
seems working properly. if go outside , run java -jar <full_path_to_jar>
works, theme gone. checked output of chrome inspector , returns 404
/vaadin/themes/mytheme/styles.css?v=7.5.5
how package theme jar?
judging question's title, sounds you've used src/main/webapp
. explained in documentation, shouldn't when building jar:
do not use
src/main/webapp
directory if application packaged jar. although directory common standard, work war packaging , silently ignored build tools if generate jar.
instead, should put static content beneath src/main/resources/static
.
Comments
Post a Comment