From a7b156acc3284916421ff6a24119e3799112edda Mon Sep 17 00:00:00 2001 From: Brett Leslie Porter Date: Sat, 30 Jul 2005 02:13:16 +0000 Subject: [PATCH] still allow debugging the verifier, and don't discard all MAVEN_OPTS (I need it to have my home directory set correctly!) git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@226460 13f79535-47bb-0310-9956-ffa450edef68 --- maven-core-it/maven-core-it.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/maven-core-it/maven-core-it.sh b/maven-core-it/maven-core-it.sh index 6bfbfd80a3..8acecba11c 100755 --- a/maven-core-it/maven-core-it.sh +++ b/maven-core-it/maven-core-it.sh @@ -23,6 +23,15 @@ if [ ! -z "$M2_HOME" ]; then jvm_m2_home="-Dmaven.home=$M2_HOME" fi -#java "$jvm_m2_home" $MAVEN_OPTS -cp "$cp" $verifier $@ -java "$jvm_m2_home" -cp "$cp" $verifier $@ +# Don't debug the verifier, debug m2 +opts=`echo $MAVEN_OPTS | sed 's/-Xdebug//' | sed 's/-Djava.compiler=NONE//' | sed 's/-Xnoagent//' | sed 's/-Xrunjdwp[^ ]*//'` + +# If you want to debug the verifier, make --debug the first argument +if [ "$1" = "--debug" ]; then + shift + opts="$opts -Xdebug -Djava.compiler=NONE -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005" + echo Debugging verifier on port 5005 +fi + +java "$jvm_m2_home" $opts -cp "$cp" $verifier $@