I added maven-jetty-plugin to my pom.xml
, and execute goal jetty:run-war
. All work fine. But when I want hot-redeploy of project, after some changes on source code, I need to repeat goal package
on my project (I think because I deployed project as .war, not as unassembled webapp).
But when I run package
goal, I get an error: Could not copy webapp sources... [C:\\..\\workspace\\PROJECT_NAME\\target\\PROJECT_NAME-0.0.1-SNAPSHOT
] - It is because files that must be deleted by Maven when executing goal package
are corrupted(busy) by started Jetty server.
How to solve this problem?
Thanks.
Why don't you want to run jetty as maven jetty:run
. And just copy compiled files in directory (Or let IDE do it for you). Also you will be able to change static resources without redeploying application
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.