activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From martyntay...@apache.org
Subject [2/3] activemq-artemis git commit: ARTEMIS-564 Fixing runtime with folders & spaces
Date Thu, 09 Jun 2016 10:14:53 GMT
ARTEMIS-564 Fixing runtime with folders & spaces

https://issues.apache.org/jira/browse/ARTEMIS-564


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/76af1f33
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/76af1f33
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/76af1f33

Branch: refs/heads/master
Commit: 76af1f33d0bda9870bc5ced066444dfc71a29376
Parents: 17ffcd4
Author: Clebert Suconic <clebertsuconic@apache.org>
Authored: Wed Jun 8 13:56:45 2016 -0400
Committer: Clebert Suconic <clebertsuconic@apache.org>
Committed: Wed Jun 8 21:45:24 2016 -0400

----------------------------------------------------------------------
 .../activemq/artemis/cli/commands/Stop.java       | 10 +++-------
 .../artemis/cli/commands/bin/artemis-service      |  4 ++--
 .../artemis/cli/commands/bin/artemis-service.xml  | 15 +++++++++------
 .../activemq/artemis/cli/commands/bin/artemis.cmd | 18 +++++++++---------
 .../artemis/cli/commands/etc/artemis.profile.cmd  |  5 +++--
 .../src/main/resources/README.html                |  2 --
 .../src/main/resources/bin/artemis.cmd            |  8 ++++----
 7 files changed, 30 insertions(+), 32 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/76af1f33/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Stop.java
----------------------------------------------------------------------
diff --git a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Stop.java
b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Stop.java
index 800c0cf..5f89253 100644
--- a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Stop.java
+++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Stop.java
@@ -19,6 +19,7 @@ package org.apache.activemq.artemis.cli.commands;
 import java.io.File;
 
 import io.airlift.airline.Command;
+import org.apache.activemq.artemis.dto.BrokerDTO;
 
 @Command(name = "stop", description = "stops the broker instance")
 public class Stop extends Configurable {
@@ -26,14 +27,9 @@ public class Stop extends Configurable {
    @Override
    public Object execute(ActionContext context) throws Exception {
       super.execute(context);
+      BrokerDTO broker = getBrokerDTO();
 
-      String value = getConfiguration();
-
-      if (value != null && value.startsWith("xml:")) {
-         value = value.substring("xml:".length());
-      }
-
-      File file = new File(value).getParentFile();
+      File file = broker.server.getConfigurationFile().getParentFile();
 
       File stopFile = new File(file, "STOP_ME");
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/76af1f33/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/bin/artemis-service
----------------------------------------------------------------------
diff --git a/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/bin/artemis-service
b/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/bin/artemis-service
index e88396f..af384b9 100755
--- a/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/bin/artemis-service
+++ b/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/bin/artemis-service
@@ -96,9 +96,9 @@ start() {
   fi
 
   if [ -z "$ARTEMIS_USER" -o `id -un` = "$ARTEMIS_USER" ] ; then
-    nohup ${ARTEMIS_INSTANCE}/bin/artemis run > /dev/null 2> /dev/null &
+    nohup "${ARTEMIS_INSTANCE}/bin/artemis" run > /dev/null 2> /dev/null &
   else
-    sudo -n -u ${ARTEMIS_USER} nohup ${ARTEMIS_INSTANCE}/bin/artemis run > /dev/null 2>
/dev/null &
+    sudo -n -u ${ARTEMIS_USER} nohup "${ARTEMIS_INSTANCE}/bin/artemis" run > /dev/null
2> /dev/null &
   fi
 
   echo $! > "${PID_FILE}"

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/76af1f33/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/bin/artemis-service.xml
----------------------------------------------------------------------
diff --git a/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/bin/artemis-service.xml
b/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/bin/artemis-service.xml
index dfb8023..593a509 100644
--- a/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/bin/artemis-service.xml
+++ b/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/bin/artemis-service.xml
@@ -22,10 +22,14 @@
    <name>ActiveMQ Artemis: ${artemis.instance.name} @ ${host}</name>
    <description>Apache ActiveMQ Artemis is a reliable messaging broker</description>
 
+   <env name="ARTEMIS_HOME" value="${artemis.home}"/>
+   <env name="ARTEMIS_INSTANCE" value="${artemis.instance}"/>
+
    <logpath>${artemis.instance}\log</logpath>
    <logmode>roll</logmode>
 
    <executable>java</executable>
+   <argument>-Xbootclasspath/a:%ARTEMIS_HOME%\lib\${logmanager}</argument>
    <argument>-XX:+UseParallelGC</argument>
    <argument>-XX:+AggressiveOpts</argument>
    <argument>-XX:+UseFastAccessorMethods</argument>
@@ -40,13 +44,12 @@
    -->
 
    <argument>-classpath</argument>
-   <argument>"${artemis.home}\lib\artemis-boot.jar"</argument>
-   <argument>-Dartemis.home="${artemis.home}"</argument>
-   <argument>-Dartemis.instance="${artemis.instance}"</argument>
-   <argument>-Ddata.dir="${artemis.instance}\data"</argument>
+   <argument>%ARTEMIS_HOME%\lib\artemis-boot.jar</argument>
+   <argument>-Dartemis.home=%ARTEMIS_HOME%</argument>
+   <argument>-Dartemis.instance=%ARTEMIS_INSTANCE%</argument>
    <argument>-Djava.util.logging.manager=org.jboss.logmanager.LogManager</argument>
-   <argument>-Dlogging.configuration="file:${artemis.instance}\etc\logging.properties"</argument>
-   <argument>-Djava.security.auth.login.config="${artemis.instance}\etc\login.config"</argument>
+   <argument>-Dlogging.configuration=file:%ARTEMIS_INSTANCE%\etc\logging.properties</argument>
+   <argument>-Djava.security.auth.login.config=%ARTEMIS_INSTANCE%\etc\login.config</argument>
 
 
    <!-- Debug args: Uncomment to enable debug

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/76af1f33/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/bin/artemis.cmd
----------------------------------------------------------------------
diff --git a/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/bin/artemis.cmd
b/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/bin/artemis.cmd
index 809adfe..abbd468 100644
--- a/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/bin/artemis.cmd
+++ b/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/bin/artemis.cmd
@@ -21,11 +21,11 @@ setlocal
 if NOT "%ARTEMIS_INSTANCE%"=="" goto CHECK_ARTEMIS_INSTANCE
 PUSHD .
 CD %~dp0..
-set ARTEMIS_INSTANCE=%CD%
+set ARTEMIS_INSTANCE="%CD%"
 POPD
 
 :CHECK_ARTEMIS_INSTANCE
-if exist "%ARTEMIS_INSTANCE%\bin\artemis.cmd" goto CHECK_JAVA
+if exist %ARTEMIS_INSTANCE%\bin\artemis.cmd goto CHECK_JAVA
 
 :NO_HOME
 echo ARTEMIS_INSTANCE environment variable is set incorrectly. Please set ARTEMIS_INSTANCE.
@@ -53,17 +53,17 @@ set ARTEMIS_DATA_DIR=%ARTEMIS_INSTANCE%\data
 set ARTEMIS_LOG_MANAGER=org.jboss.logmanager.LogManager
 
 rem "Load Profile Config"
-call "%ARTEMIS_INSTANCE%\etc\artemis.profile.cmd" %*
+call %ARTEMIS_INSTANCE%\etc\artemis.profile.cmd %*
 
 rem "Create full JVM Args"
 set JVM_ARGS=%JAVA_ARGS%
 if not "%ARTEMIS_CLUSTER_PROPS%"=="" set JVM_ARGS=%JVM_ARGS% %ARTEMIS_CLUSTER_PROPS%
-set JVM_ARGS=%JVM_ARGS% -classpath "%ARTEMIS_HOME%\lib\artemis-boot.jar"
-set JVM_ARGS=%JVM_ARGS% -Dartemis.home="%ARTEMIS_HOME%"
-set JVM_ARGS=%JVM_ARGS% -Dartemis.instance="%ARTEMIS_INSTANCE%"
-set JVM_ARGS=%JVM_ARGS% -Ddata.dir="%ARTEMIS_DATA_DIR%"
-set JVM_ARGS=%JVM_ARGS% -Djava.util.logging.manager="%ARTEMIS_LOG_MANAGER%"
-set JVM_ARGS=%JVM_ARGS% -Dlogging.configuration="%ARTEMIS_LOGGING_CONF%"
+set JVM_ARGS=%JVM_ARGS% -classpath %ARTEMIS_HOME%\lib\artemis-boot.jar
+set JVM_ARGS=%JVM_ARGS% -Dartemis.home=%ARTEMIS_HOME%
+set JVM_ARGS=%JVM_ARGS% -Dartemis.instance=%ARTEMIS_INSTANCE%
+set JVM_ARGS=%JVM_ARGS% -Ddata.dir=%ARTEMIS_DATA_DIR%
+set JVM_ARGS=%JVM_ARGS% -Djava.util.logging.manager=%ARTEMIS_LOG_MANAGER%
+set JVM_ARGS=%JVM_ARGS% -Dlogging.configuration=%ARTEMIS_LOGGING_CONF%
 if not "%DEBUG_ARGS%"=="" set JVM_ARGS=%JVM_ARGS% %DEBUG_ARGS%
 
 "%_JAVACMD%" %JVM_ARGS% org.apache.activemq.artemis.boot.Artemis %*

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/76af1f33/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/artemis.profile.cmd
----------------------------------------------------------------------
diff --git a/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/artemis.profile.cmd
b/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/artemis.profile.cmd
index 604011c..47e288c 100644
--- a/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/artemis.profile.cmd
+++ b/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/artemis.profile.cmd
@@ -1,3 +1,4 @@
+@echo off
 rem Licensed to the Apache Software Foundation (ASF) under one
 rem or more contributor license agreements.  See the NOTICE file
 rem distributed with this work for additional information
@@ -15,8 +16,8 @@ rem KIND, either express or implied.  See the License for the
 rem specific language governing permissions and limitations
 rem under the License.
 
-set ARTEMIS_HOME=${artemis.home}
-set ARTEMIS_INSTANCE=${artemis.instance}
+set ARTEMIS_HOME="${artemis.home}"
+set ARTEMIS_INSTANCE="${artemis.instance}"
 
 rem Cluster Properties: Used to pass arguments to ActiveMQ Artemis which can be referenced
in broker.xml
 rem set ARTEMIS_CLUSTER_PROPS=-Dactivemq.remoting.default.port=61617 -Dactivemq.remoting.amqp.port=5673
-Dactivemq.remoting.stomp.port=61614 -Dactivemq.remoting.hornetq.port=5446

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/76af1f33/artemis-distribution/src/main/resources/README.html
----------------------------------------------------------------------
diff --git a/artemis-distribution/src/main/resources/README.html b/artemis-distribution/src/main/resources/README.html
index 6d438b2..b708568 100644
--- a/artemis-distribution/src/main/resources/README.html
+++ b/artemis-distribution/src/main/resources/README.html
@@ -31,8 +31,6 @@ under the License.
 
 <h1>Getting Started</h1>
 
-<b>Note (Windows users):</b> The broker currently does not support spaces in
path names.  For this reason the broker should be placed in a directory with no spaces in
it's absolute path.<br><br>
-
 <b>Note (Windows users):</b> Examples below use the shell script `artemis` for
use with linux, Windows users should use the `artemis.cmd` script with the same parameters.<br><br>
 
 <h2>Creating a broker</h2>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/76af1f33/artemis-distribution/src/main/resources/bin/artemis.cmd
----------------------------------------------------------------------
diff --git a/artemis-distribution/src/main/resources/bin/artemis.cmd b/artemis-distribution/src/main/resources/bin/artemis.cmd
index 4132fb6..9573d49 100755
--- a/artemis-distribution/src/main/resources/bin/artemis.cmd
+++ b/artemis-distribution/src/main/resources/bin/artemis.cmd
@@ -21,11 +21,11 @@ setlocal
 if NOT "%ARTEMIS_HOME%"=="" goto CHECK_ARTEMIS_HOME
 PUSHD .
 CD %~dp0..
-set ARTEMIS_HOME=%CD%
+set ARTEMIS_HOME="%CD%"
 POPD
 
 :CHECK_ARTEMIS_HOME
-if exist "%ARTEMIS_HOME%\bin\artemis.cmd" goto CHECK_JAVA
+if exist %ARTEMIS_HOME%\bin\artemis.cmd goto CHECK_JAVA
 
 :NO_HOME
 echo ARTEMIS_HOME environment variable is set incorrectly. Please set ARTEMIS_HOME.
@@ -53,8 +53,8 @@ set JAVA_ARGS=-XX:+UseParallelGC -XX:+AggressiveOpts -XX:+UseFastAccessorMethods
 rem "Create full JVM Args"
 set JVM_ARGS=%JAVA_ARGS%
 if not "%ARTEMIS_CLUSTER_PROPS%"=="" set JVM_ARGS=%JVM_ARGS% %ARTEMIS_CLUSTER_PROPS%
-set JVM_ARGS=%JVM_ARGS% -classpath "%ARTEMIS_HOME%\lib\artemis-boot.jar"
-set JVM_ARGS=%JVM_ARGS% -Dartemis.home="%ARTEMIS_HOME%"
+set JVM_ARGS=%JVM_ARGS% -classpath %ARTEMIS_HOME%\lib\artemis-boot.jar
+set JVM_ARGS=%JVM_ARGS% -Dartemis.home=%ARTEMIS_HOME%
 if not "%DEBUG_ARGS%"=="" set JVM_ARGS=%JVM_ARGS% %DEBUG_ARGS%
 
 "%_JAVACMD%" %JVM_ARGS% org.apache.activemq.artemis.boot.Artemis %*


Mime
View raw message