Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set agentlib property for mvn tomcat plugin (jpda)

Related to eclipse debug remote web application => How do I debug a remote application in my eclipse

How can I set / archive this in the mvn tomcat plugin? http://tomcat.apache.org/maven-plugin-2.0-SNAPSHOT/tomcat7-maven-plugin/

The only thing that might help is setting systemProperty but that doesn't work for me ;/

Goal: let tomcat run on console via maven but enable remote debugging for different IDEs

(YES guys, we can run tomcat in Eclipse WTP! That's not the question ;)

like image 288
childno͡.de Avatar asked Sep 14 '12 09:09

childno͡.de


People also ask

What is Tomcat Maven plugin?

The Apache Tomcat Maven Plugin provides goals to manipulate WAR projects within the Apache Tomcat servlet container. You can run your War Apache Maven project through Apache Maven without deploying your WAR file to an Apache Tomcat instance.

What is the debug port for Tomcat?

Host: The IP address of the host your Tomcat installation is running on (127.0. 0.1 if it is your local machine). Port: The port of your Tomcat debugging interface, which should be 8000 if you've followed the instructions above.


1 Answers

$ export MAVEN_OPTS=-agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n
$ mvn tomcat7:run-war

^^ that's it, not cool (as it is not in POM) but it works

Source: http://aaronz-sakai.blogspot.de/2009/02/debugging-jetty-when-running-mvn.html

like image 53
childno͡.de Avatar answered Oct 04 '22 13:10

childno͡.de