You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by an...@apache.org on 2015/03/02 14:49:39 UTC
[1/2] activemq-6 git commit: Replace file separate in ACTIVEMQ_HOME
for Windows
Repository: activemq-6
Updated Branches:
refs/heads/master 4152eba77 -> 9578e078d
Replace file separate in ACTIVEMQ_HOME for Windows
ActiveMQ uses URI's for locating files on a file system. Absolute file
URIs are generated using an ACTIVEMQ_HOME variable defined via the start
up scripts. For Windows this will contain "\" character as file path
separator. This is invalid for the file URI scheme. This patch
rewrites the ACTIVEMQ_HOME variable ensuring "/" are used on both
Windows and Linux.
Project: http://git-wip-us.apache.org/repos/asf/activemq-6/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-6/commit/9e4b40b0
Tree: http://git-wip-us.apache.org/repos/asf/activemq-6/tree/9e4b40b0
Diff: http://git-wip-us.apache.org/repos/asf/activemq-6/diff/9e4b40b0
Branch: refs/heads/master
Commit: 9e4b40b03374192a068eb05b7559c692de1b91b4
Parents: 2e0e662
Author: Martyn Taylor <mt...@redhat.com>
Authored: Mon Mar 2 12:18:32 2015 +0000
Committer: Martyn Taylor <mt...@redhat.com>
Committed: Mon Mar 2 12:25:14 2015 +0000
----------------------------------------------------------------------
.../src/main/java/org/apache/activemq/cli/commands/Run.java | 4 ++++
.../src/main/java/org/apache/activemq/cli/commands/Stop.java | 8 +++++++-
2 files changed, 11 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/9e4b40b0/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 d898bfe..1acf05c 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
@@ -52,7 +52,11 @@ public class Run implements Action
ActiveMQ.printBanner();
+ /* We use File URI for locating files. The ACTIVEMQ_HOME variable is used to determine file paths. For Windows
+ the ACTIVEMQ_HOME variable will include back slashes (An invalid file URI character path separator). For this
+ reason we overwrite the ACTIVEMQ_HOME variable with backslashes replaced with forward slashes. */
String activemqHome = System.getProperty("activemq.home").replace("\\", "/");
+ System.setProperty("activemq.home", activemqHome);
if (configuration == null)
{
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/9e4b40b0/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 da92f48..fab53e7 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
@@ -33,9 +33,15 @@ public class Stop implements Action
@Override
public Object execute(ActionContext context) throws Exception
{
+ /* We use File URI for locating files. The ACTIVEMQ_HOME variable is used to determine file paths. For Windows
+ the ACTIVEMQ_HOME variable will include back slashes (An invalid file URI character path separator). For this
+ reason we overwrite the ACTIVEMQ_HOME variable with backslashes replaced with forward slashes. */
+ String activemqHome = System.getProperty("activemq.home").replace("\\", "/");
+ System.setProperty("activemq.home", activemqHome);
+
if (configuration == null)
{
- configuration = "xml:" + System.getProperty("activemq.home").replace("\\", "/") + "/config/non-clustered/bootstrap.xml";
+ configuration = "xml:" + activemqHome + "/config/non-clustered/bootstrap.xml";
}
BrokerDTO broker = BrokerFactory.createBrokerConfiguration(configuration);
[2/2] activemq-6 git commit: merge #128 - Replace file separate in
ACTIVEMQ_HOME for Windows
Posted by an...@apache.org.
merge #128 - Replace file separate in ACTIVEMQ_HOME for Windows
Project: http://git-wip-us.apache.org/repos/asf/activemq-6/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-6/commit/9578e078
Tree: http://git-wip-us.apache.org/repos/asf/activemq-6/tree/9578e078
Diff: http://git-wip-us.apache.org/repos/asf/activemq-6/diff/9578e078
Branch: refs/heads/master
Commit: 9578e078d79a41ccc3b4180984b42824636a01b7
Parents: 4152eba 9e4b40b
Author: Andy Taylor <an...@gmail.com>
Authored: Mon Mar 2 13:48:36 2015 +0000
Committer: Andy Taylor <an...@gmail.com>
Committed: Mon Mar 2 13:48:36 2015 +0000
----------------------------------------------------------------------
.../src/main/java/org/apache/activemq/cli/commands/Run.java | 4 ++++
.../src/main/java/org/apache/activemq/cli/commands/Stop.java | 8 +++++++-
2 files changed, 11 insertions(+), 1 deletion(-)
----------------------------------------------------------------------