Skip to content

Instantly share code, notes, and snippets.

@ojacobson
Created December 16, 2013 18:32
Show Gist options
  • Save ojacobson/7991889 to your computer and use it in GitHub Desktop.
Save ojacobson/7991889 to your computer and use it in GitHub Desktop.
#!/bin/bash -e
## usage: mvn-debug <target...>
## or: SUSPEND=y mvn-debug <target...>
## or: DEBUG_PORT=2000 mvn-debug <target>
SUSPEND="${SUSPEND:-n}"
DEBUG_PORT="${DEBUG_PORT:-8000}"
export MAVEN_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,address=${DEBUG_PORT},server=y,suspend=${SUSPEND} ${MAVEN_OPTS}"
exec "$(dirname "$0")/mvn" "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment