вторник, 9 ноября 2010 г.

Maven Tomcat remote debugging under Windows

If you want to debug Java application, which is running through mvn tomcat:run on Windows, you MUST set environment variable MAVEN_OPTS without double quotes! It's some stupid problem that eats many time to resolve.

So use the following commands in your Windows cmd:

>set MAVEN_OPTS=-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
>mvn tomcat:run
In the Linux use:
>MAVEN_OPTS="-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000";
>export MAVEN_OPTS
>mvn tomcat:run

Комментариев нет:

Отправить комментарий