Created
March 23, 2017 17:59
-
-
Save brunorozendo/c1a7793b1e21707755b6424c4c50b2c7 to your computer and use it in GitHub Desktop.
debug_maven
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Inside mvn(sh)# | |
| read LOWERPORT UPPERPORT < /proc/sys/net/ipv4/ip_local_port_range | |
| while : | |
| do | |
| PORT="`shuf -i $LOWERPORT-$UPPERPORT -n 1`" | |
| ss -lpn | grep -q ":$PORT " || break | |
| done | |
| MAVEN_OPTS="$MAVEN_OPTS -Xdebug -agentlib:jdwp=transport=dt_socket,address=$PORT,server=y,suspend=n" | |
| export JAVA_HOME=/opt/jdk/jdk6 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment