[英]Maven-Jetty-Plugin. Hot redeploy .war
I added maven-jetty-plugin to my pom.xml
, and execute goal jetty:run-war
. 我将maven-jetty-plugin添加到了
pom.xml
,并执行了目标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). 但是,当我想要热重新部署项目时,在对源代码进行一些更改之后,我需要在项目上重复目标
package
(我认为是因为我将项目部署为.war,而不是未组装的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. 但是,当我运行
package
目标时,出现一个错误: Could not copy webapp sources... [C:\\..\\workspace\\PROJECT_NAME\\target\\PROJECT_NAME-0.0.1-SNAPSHOT
]-这是因为必须删除文件当启动目标package
被启动的Jetty服务器损坏(繁忙)时,由Maven编写。
How to solve this problem? 如何解决这个问题呢?
Thanks. 谢谢。
Why don't you want to run jetty as maven jetty:run
. 您为什么不想要像
maven jetty:run
一样运行码头? And just copy compiled files in directory (Or let IDE do it for you). 只需将编译后的文件复制到目录中即可(或让IDE为您完成)。 Also you will be able to change static resources without redeploying application
另外,您将能够更改静态资源而无需重新部署应用程序
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.