[英]Debug Tomcat deployed code with cargo plugin
Can anyone please tell how to debug the code in eclipse with Cargo(Tomcat) plugin? 任何人都可以告诉如何使用Cargo(Tomcat)插件调试eclipse中的代码?
We are using Java 8, Tomcat 8, eclipse Juno in Windows 7 OS. 我们在Windows 7操作系统中使用Java 8,Tomcat 8,eclipse Juno。
One other thing I want to mention is, we don't have control to modify Tomcat scripts as the tomcat is freshly getting installed from Nexus repository(or from local repo cache) for every execution of mvn -P dev clean package cargo:run
. 我要提到的另一件事是,我们无法控制修改Tomcat脚本,因为每次执行
mvn -P dev clean package cargo:run
,都会从Nexus存储库(或本地repo缓存)中新安装tomcat。
For debug Cargo, you can configure you container like by this: 对于调试Cargo,您可以像这样配置容器:
<container>
<containerId>tomcat4x</containerId>
<home>c:/apps/jakarta-tomcat-4.1.30</home>
<log>target/cargo.log</log>
<logLevel>debug</logLevel>
</container>
If you want to debug container, then set JVM with this: 如果要调试容器,请使用以下命令设置JVM:
-Xdebug
-Xrunjdwp:transport=dt_socket,server=y,suspend=<suspend>,address=<port>
-Xnoagent
-Djava.compiler=NONE
More information about Cargo debugging is here . 有关货物调试的更多信息,请点击此处 。
I wrote a blog post about maven cargo plugin for using integration test. 我写了一篇关于使用集成测试的maven货物插件的博客文章。 Maybe it will help you.
也许它会帮助你。 http://hrabosch.com/2016/06/12/how-to-run-integration-tests-with-cargo-maven-plugin-in-a-separate-container/ There is Jetty, but you can change it to tomcat.
http://hrabosch.com/2016/06/12/how-to-run-integration-tests-with-cargo-maven-plugin-in-a-separate-container/有Jetty,但你可以改成它tomcat的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.