Fix dev:create-dump command

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

Branch: refs/heads/master
Commit: abfbc3b160c84e837d6b3be7e8e31d1de428a2dd
Parents: 79cf409
Author: Guillaume Nodet <gno...@gmail.com>
Authored: Fri Feb 21 16:04:13 2014 +0100
Committer: Guillaume Nodet <gno...@gmail.com>
Committed: Fri Feb 21 18:09:52 2014 +0100

----------------------------------------------------------------------
 .../java/org/apache/karaf/diagnostic/command/DumpCommand.java    | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf/blob/abfbc3b1/diagnostic/command/src/main/java/org/apache/karaf/diagnostic/command/DumpCommand.java
----------------------------------------------------------------------
diff --git 
a/diagnostic/command/src/main/java/org/apache/karaf/diagnostic/command/DumpCommand.java
 
b/diagnostic/command/src/main/java/org/apache/karaf/diagnostic/command/DumpCommand.java
index 551fc0e..9a0af4c 100644
--- 
a/diagnostic/command/src/main/java/org/apache/karaf/diagnostic/command/DumpCommand.java
+++ 
b/diagnostic/command/src/main/java/org/apache/karaf/diagnostic/command/DumpCommand.java
@@ -30,11 +30,13 @@ import org.apache.karaf.diagnostic.core.DumpProvider;
 import org.apache.karaf.diagnostic.core.common.DirectoryDumpDestination;
 import org.apache.karaf.diagnostic.core.common.ZipDumpDestination;
 import org.apache.karaf.shell.console.OsgiCommandSupport;
+import org.apache.karaf.shell.inject.Service;
 
 /**
  * Command to create dump from shell.
  */
 @Command(scope = "dev", name = "dump-create", description = "Creates zip 
archive with diagnostic info.")
+@Service
 public class DumpCommand extends OsgiCommandSupport {
 
     /**
@@ -85,7 +87,7 @@ public class DumpCommand extends OsgiCommandSupport {
             provider.createDump(destination);
         }
         destination.save();
-        session.getConsole().println("Diagnostic dump created.");
+        session.getConsole().println("Diagnostic dump created at " + 
target.getAbsolutePath() + ".");
 
         return null;
     }

Reply via email to