Have mvn jetty:run use the .war package

Hi all,

is it possible to configure the Jetty Maven Plugin to use the .war final package (as I did with Ant) instead of the /target directory?

The reason is that when I do mvn jetty:run the servlet context base directory is set to src/main/webapp/, which does not contain some files I need.
I.e.: my application tries to load WEB-INF/jasper/report.jasper from the servlet context base directory. This file (a compiled JasperReports template) will be put in the final .war package in the proper directory when running mvn package, but will not be found under src/main/webapp/WEB-INF/jasper/report.jasper when running mvn jetty:run.

Thanks for your help,
MZ

I’m not entirely sure what exactly you want to achieve but may be it has sense to look at jetty plugin:
https://www.eclipse.org/jetty/documentation/9.4.x/jetty-maven-plugin.html
goals run-war or run-exploded may be what you need

Denis, mvn jetty:run-war was the answer.

Thanks,
MZ