When using jetty-maven-plugin during development of a web application with the command
mvn jetty:run
. I need to use some static resources which I DO NOT want to put in
src/main/webapp
. I put DEV resources into
src/test/webapp
instead. But jetty does not load these resources by default. So the following jetty-maven-plugin configuration show how to provide static resources.
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<configuration>
<webAppConfig>
...
<resourceBases>
<resourceBase>src/main/webapp</resourceBase>
<resourceBase>src/test/webapp</resourceBase>
</resourceBases>
...
</webAppConfig>
</configuration>
</plugin>
Thank you, but I want something more specific, a way to add only one folder, not an entire one, something like this is possible:
ReplyDeletesrc/main/webapp
src/test/webapp/onlyThisFolder
Of course you can set the folder you want but all the subfolder will be available.
Delete