Issue
rI want to run jetty:run in debug mode with MAVEN_OPTS setted in environment variable. But it seams like hardcode MAVEN_OPTS. Is it possible to set MAVEN_OPTS in command line like mvn MAVEN_OPTS=...
Thank you.
Solution
Is it possible to set MAVEN_OPTS in command line like mvn MAVEN_OPTS=...
No, MAVEN_OPTS is an environment variable, you can't set it on the command line. But you there is an alternative. Instead of mvn
, you can simply run mvnDebug
(a little variation of the former script that set debug options):
$ mvnDebug jetty:run Preparing to Execute Maven in Debug Mode Listening for transport dt_socket at address: 8000
I find this alternative pretty handy, and easier.
Answered By - Pascal Thivent