0

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.

WelcomeTo
  • 19,843
  • 53
  • 170
  • 286

1 Answers1

1

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

Anton
  • 5,831
  • 3
  • 35
  • 45