如何为mvn tomcat插件(jpda)设置agentlib属性 [英] How to set agentlib property for mvn tomcat plugin (jpda)
问题描述
有关 eclipse调试远程Web应用程序 => 如何在日食中调试远程应用程序
如何在mvn tomcat插件中设置/存档? http://tomcat.apache.org/maven-plugin -2.0-SNAPSHOT/tomcat7-maven-plugin/
How can I set / archive this in the mvn tomcat plugin? http://tomcat.apache.org/maven-plugin-2.0-SNAPSHOT/tomcat7-maven-plugin/
可能唯一有用的方法是设置systemProperty,但对我不起作用;/
The only thing that might help is setting systemProperty but that doesn't work for me ;/
目标:让tomcat通过maven在控制台上运行,但为不同的IDE启用远程调试
Goal: let tomcat run on console via maven but enable remote debugging for different IDEs
(是的,我们可以在Eclipse WTP中运行tomcat!这不是问题;)
(YES guys, we can run tomcat in Eclipse WTP! That's not the question ;)
推荐答案
$ export MAVEN_OPTS=-agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n
$ mvn tomcat7:run-war
^^就是这样,不是很酷(因为它不在POM中),但是可以正常工作
^^ that's it, not cool (as it is not in POM) but it works
来源: http://aaronz- sakai.blogspot.de/2009/02/debugging-jetty-when-running-mvn.html
这篇关于如何为mvn tomcat插件(jpda)设置agentlib属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!