activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andytay...@apache.org
Subject [1/2] activemq-6 git commit: Support Windows paths to config files on CLI
Date Tue, 03 Mar 2015 09:47:28 GMT
Repository: activemq-6
Updated Branches:
  refs/heads/master 806b9d7e3 -> 5e7827af3


Support Windows paths to config files on CLI


Project: http://git-wip-us.apache.org/repos/asf/activemq-6/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-6/commit/31bee43d
Tree: http://git-wip-us.apache.org/repos/asf/activemq-6/tree/31bee43d
Diff: http://git-wip-us.apache.org/repos/asf/activemq-6/diff/31bee43d

Branch: refs/heads/master
Commit: 31bee43d63c44afef4b963c7803c3373ec08eae5
Parents: 806b9d7
Author: Martyn Taylor <mtaylor@redhat.com>
Authored: Tue Mar 3 09:44:52 2015 +0000
Committer: Martyn Taylor <mtaylor@redhat.com>
Committed: Tue Mar 3 09:45:41 2015 +0000

----------------------------------------------------------------------
 .../src/main/java/org/apache/activemq/cli/commands/Run.java      | 3 +++
 .../src/main/java/org/apache/activemq/cli/commands/Stop.java     | 4 ++++
 2 files changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-6/blob/31bee43d/activemq-bootstrap/src/main/java/org/apache/activemq/cli/commands/Run.java
----------------------------------------------------------------------
diff --git a/activemq-bootstrap/src/main/java/org/apache/activemq/cli/commands/Run.java b/activemq-bootstrap/src/main/java/org/apache/activemq/cli/commands/Run.java
index 1acf05c..e48a5a5 100644
--- a/activemq-bootstrap/src/main/java/org/apache/activemq/cli/commands/Run.java
+++ b/activemq-bootstrap/src/main/java/org/apache/activemq/cli/commands/Run.java
@@ -63,6 +63,9 @@ public class Run implements Action
          configuration = "xml:" + activemqHome + "/config/non-clustered/bootstrap.xml";
       }
 
+      // To support Windows paths as explained above.
+      configuration = configuration.replace("\\", "/");
+
       System.out.println("Loading configuration file: " + configuration);
 
       BrokerDTO broker = BrokerFactory.createBrokerConfiguration(configuration);

http://git-wip-us.apache.org/repos/asf/activemq-6/blob/31bee43d/activemq-bootstrap/src/main/java/org/apache/activemq/cli/commands/Stop.java
----------------------------------------------------------------------
diff --git a/activemq-bootstrap/src/main/java/org/apache/activemq/cli/commands/Stop.java b/activemq-bootstrap/src/main/java/org/apache/activemq/cli/commands/Stop.java
index fab53e7..26b2c34 100644
--- a/activemq-bootstrap/src/main/java/org/apache/activemq/cli/commands/Stop.java
+++ b/activemq-bootstrap/src/main/java/org/apache/activemq/cli/commands/Stop.java
@@ -43,6 +43,10 @@ public class Stop implements Action
       {
          configuration = "xml:" + activemqHome + "/config/non-clustered/bootstrap.xml";
       }
+
+      // To support Windows paths as explained above.
+      configuration = configuration.replace("\\", "/");
+
       BrokerDTO broker = BrokerFactory.createBrokerConfiguration(configuration);
 
       String fileName = new URI(broker.server.configuration).getSchemeSpecificPart();


Mime
View raw message