karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbono...@apache.org
Subject karaf git commit: [KARAF-3421] Introduce JAVA_DEBUG_PORT variable to easily change the debug port number [KARAF-3420] Use Java6 like debug JVM argument
Date Thu, 25 Dec 2014 16:57:20 GMT
Repository: karaf
Updated Branches:
  refs/heads/master 50e44f777 -> 5fbefba3d


[KARAF-3421] Introduce JAVA_DEBUG_PORT variable to easily change the debug port number
[KARAF-3420] Use Java6 like debug JVM argument


Project: http://git-wip-us.apache.org/repos/asf/karaf/repo
Commit: http://git-wip-us.apache.org/repos/asf/karaf/commit/5fbefba3
Tree: http://git-wip-us.apache.org/repos/asf/karaf/tree/5fbefba3
Diff: http://git-wip-us.apache.org/repos/asf/karaf/diff/5fbefba3

Branch: refs/heads/master
Commit: 5fbefba3dd0ead94227ce7879276eac93ee87407
Parents: 50e44f7
Author: Jean-Baptiste Onofré <jbonofre@apache.org>
Authored: Thu Dec 25 17:56:05 2014 +0100
Committer: Jean-Baptiste Onofré <jbonofre@apache.org>
Committed: Thu Dec 25 17:56:05 2014 +0100

----------------------------------------------------------------------
 .../src/main/filtered-resources/resources/bin/instance        | 7 +++++--
 .../src/main/filtered-resources/resources/bin/instance.bat    | 2 +-
 .../framework/src/main/filtered-resources/resources/bin/karaf | 7 ++++++-
 .../src/main/filtered-resources/resources/bin/karaf.bat       | 2 +-
 .../framework/src/main/filtered-resources/resources/bin/shell | 6 +++++-
 .../src/main/filtered-resources/resources/bin/shell.bat       | 2 +-
 6 files changed, 19 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf/blob/5fbefba3/assemblies/features/framework/src/main/filtered-resources/resources/bin/instance
----------------------------------------------------------------------
diff --git a/assemblies/features/framework/src/main/filtered-resources/resources/bin/instance
b/assemblies/features/framework/src/main/filtered-resources/resources/bin/instance
index eae018c..abb36eb 100755
--- a/assemblies/features/framework/src/main/filtered-resources/resources/bin/instance
+++ b/assemblies/features/framework/src/main/filtered-resources/resources/bin/instance
@@ -283,8 +283,11 @@ setupDefaults() {
 
     CLASSPATH="$CLASSPATH:$KARAF_HOME/lib/karaf-jmx-boot.jar"
 
-    
-    DEFAULT_JAVA_DEBUG_OPTS="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005"
+    DEFAULT_JAVA_DEBUG_PORT="5005"
+    if [ "x$JAVA_DEBUG_PORT" = "x" ]; then
+        JAVA_DEBUG_PORT="$DEFAULT_JAVA_DEBUG_PORT"
+    fi
+    DEFAULT_JAVA_DEBUG_OPTS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=$JAVA_DEBUG_PORT"
 
     ##
     ## TODO: Move to conf/profiler/yourkit.{sh|cmd}

http://git-wip-us.apache.org/repos/asf/karaf/blob/5fbefba3/assemblies/features/framework/src/main/filtered-resources/resources/bin/instance.bat
----------------------------------------------------------------------
diff --git a/assemblies/features/framework/src/main/filtered-resources/resources/bin/instance.bat
b/assemblies/features/framework/src/main/filtered-resources/resources/bin/instance.bat
index 0fc928b..b485e9a 100644
--- a/assemblies/features/framework/src/main/filtered-resources/resources/bin/instance.bat
+++ b/assemblies/features/framework/src/main/filtered-resources/resources/bin/instance.bat
@@ -95,7 +95,7 @@ if "%KARAF_ETC%" == "" (
 )
 
 set DEFAULT_JAVA_OPTS=
-set DEFAULT_JAVA_DEBUG_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005
+set DEFAULT_JAVA_DEBUG_OPTS=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005
 
 rem Support for loading native libraries
 set PATH=%PATH%;%KARAF_BASE%\lib;%KARAF_HOME%\lib

http://git-wip-us.apache.org/repos/asf/karaf/blob/5fbefba3/assemblies/features/framework/src/main/filtered-resources/resources/bin/karaf
----------------------------------------------------------------------
diff --git a/assemblies/features/framework/src/main/filtered-resources/resources/bin/karaf
b/assemblies/features/framework/src/main/filtered-resources/resources/bin/karaf
index 15b2d28..8d53ee1 100755
--- a/assemblies/features/framework/src/main/filtered-resources/resources/bin/karaf
+++ b/assemblies/features/framework/src/main/filtered-resources/resources/bin/karaf
@@ -308,7 +308,12 @@ setupDefaults() {
             CLASSPATH="$CLASSPATH:$file"
         fi
     done
-    DEFAULT_JAVA_DEBUG_OPTS="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005"
+
+    DEFAULT_JAVA_DEBUG_PORT="5005"
+    if [ "x$JAVA_DEBUG_PORT" = "x" ]; then
+        JAVA_DEBUG_PORT="$DEFAULT_JAVA_DEBUG_PORT"
+    fi
+    DEFAULT_JAVA_DEBUG_OPTS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=$JAVA_DEBUG_PORT"
 
     ##
     ## TODO: Move to conf/profiler/yourkit.{sh|cmd}

http://git-wip-us.apache.org/repos/asf/karaf/blob/5fbefba3/assemblies/features/framework/src/main/filtered-resources/resources/bin/karaf.bat
----------------------------------------------------------------------
diff --git a/assemblies/features/framework/src/main/filtered-resources/resources/bin/karaf.bat
b/assemblies/features/framework/src/main/filtered-resources/resources/bin/karaf.bat
index c650fcb..23add97 100644
--- a/assemblies/features/framework/src/main/filtered-resources/resources/bin/karaf.bat
+++ b/assemblies/features/framework/src/main/filtered-resources/resources/bin/karaf.bat
@@ -98,7 +98,7 @@ set LOCAL_CLASSPATH=%CLASSPATH%
 set JAVA_MODE=-server
 
 set CLASSPATH=%LOCAL_CLASSPATH%;%KARAF_BASE%\conf
-set DEFAULT_JAVA_DEBUG_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005
+set DEFAULT_JAVA_DEBUG_OPTS=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005
 
 if "%LOCAL_CLASSPATH%" == "" goto :KARAF_CLASSPATH_EMPTY
     set CLASSPATH=%LOCAL_CLASSPATH%;%KARAF_BASE%\conf

http://git-wip-us.apache.org/repos/asf/karaf/blob/5fbefba3/assemblies/features/framework/src/main/filtered-resources/resources/bin/shell
----------------------------------------------------------------------
diff --git a/assemblies/features/framework/src/main/filtered-resources/resources/bin/shell
b/assemblies/features/framework/src/main/filtered-resources/resources/bin/shell
index d6c4965..e200ba9 100755
--- a/assemblies/features/framework/src/main/filtered-resources/resources/bin/shell
+++ b/assemblies/features/framework/src/main/filtered-resources/resources/bin/shell
@@ -280,7 +280,11 @@ setupDefaults() {
     CLASSPATH="$CLASSPATH:$KARAF_HOME/system/org/ops4j/pax/logging/pax-logging-api/${pax.logging.version}/pax-logging-api-${pax.logging.version}.jar"
     CLASSPATH="$CLASSPATH:$KARAF_HOME/system/jline/jline/${jline.version}/jline-${jline.version}.jar"
 
-    DEFAULT_JAVA_DEBUG_OPTS="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005"
+    DEFAULT_JAVA_DEBUG_PORT="5005"
+    if [ "x$JAVA_DEBUG_PORT" = "x" ]; then
+        JAVA_DEBUG_PORT="$DEFAULT_JAVA_DEBUG_PORT"
+    fi
+    DEFAULT_JAVA_DEBUG_OPTS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=$JAVA_DEBUG_PORT"
 
     ##
     ## TODO: Move to conf/profiler/yourkit.{sh|cmd}

http://git-wip-us.apache.org/repos/asf/karaf/blob/5fbefba3/assemblies/features/framework/src/main/filtered-resources/resources/bin/shell.bat
----------------------------------------------------------------------
diff --git a/assemblies/features/framework/src/main/filtered-resources/resources/bin/shell.bat
b/assemblies/features/framework/src/main/filtered-resources/resources/bin/shell.bat
index cd04162..d1f06ca 100644
--- a/assemblies/features/framework/src/main/filtered-resources/resources/bin/shell.bat
+++ b/assemblies/features/framework/src/main/filtered-resources/resources/bin/shell.bat
@@ -95,7 +95,7 @@ if "%KARAF_ETC%" == "" (
 )
 
 set DEFAULT_JAVA_OPTS=
-set DEFAULT_JAVA_DEBUG_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005
+set DEFAULT_JAVA_DEBUG_OPTS=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005
 
 rem Support for loading native libraries
 set PATH=%PATH%;%KARAF_BASE%\lib;%KARAF_HOME%\lib


Mime
View raw message