简体   繁体   English

使用货物插件调试Tomcat部署的代码

[英]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.

相关问题 使用货运插件时无法将应用程序部署在tomcat8上 - Not able to get the application deployed on tomcat8 while using cargo plugin Tomcat无法通过Hudson从Cargo插件部署NoClassDefFoundError - Tomcat failure to deploy from Cargo plugin via Hudson, NoClassDefFoundError 如何正确设置 tomcat 日志到 Maven Cargo Plugin - How properly to set up tomcat logs into Maven Cargo Plugin 使用摘要身份验证将Maven Cargo插件部署到tomcat - Maven Cargo plugin deploying to tomcat using digest authentication Cargo-Maven2-Plugin没有找到Tomcat / lib目录 - Cargo-Maven2-Plugin not finding Tomcat /lib directory 如何在Tomcat中部署的Eclipse中调试Java应用程序? - How to debug java application in Eclipse deployed in tomcat? 使用 Tomcat 插件的 Jersey webapp 未部署 - Jersey webapp using Tomcat plugin is not getting deployed 通过cargo Maven插件在Wildfly上部署的战争应用程序中无法进行EJB注入 - EJB injection impossible in a war application deployed on wildfly via cargo maven plugin Eclipse Tomcat Server启动,但代码未部署 - Eclipse Tomcat Server starting but code is not getting deployed 使用IDEA,如何调试部署到本地tomcat的Web应用程序? - Using IDEA, how to debug web app that is deployed to local tomcat?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM