You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ch...@apache.org on 2011/06/03 22:18:49 UTC
svn commit: r1131190 - in
/activemq/activemq-apollo/trunk/apollo-cli/src/main:
resources/org/apache/activemq/apollo/cli/commands/bin/apollo-broker-service.xml
scala/org/apache/activemq/apollo/cli/commands/Create.scala
Author: chirino
Date: Fri Jun 3 20:18:48 2011
New Revision: 1131190
URL: http://svn.apache.org/viewvc?rev=1131190&view=rev
Log:
ixes https://issues.apache.org/jira/browse/APLO-10 : Support installing/running from folder pathnames with spaces
Modified:
activemq/activemq-apollo/trunk/apollo-cli/src/main/resources/org/apache/activemq/apollo/cli/commands/bin/apollo-broker-service.xml
activemq/activemq-apollo/trunk/apollo-cli/src/main/scala/org/apache/activemq/apollo/cli/commands/Create.scala
Modified: activemq/activemq-apollo/trunk/apollo-cli/src/main/resources/org/apache/activemq/apollo/cli/commands/bin/apollo-broker-service.xml
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-cli/src/main/resources/org/apache/activemq/apollo/cli/commands/bin/apollo-broker-service.xml?rev=1131190&r1=1131189&r2=1131190&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-cli/src/main/resources/org/apache/activemq/apollo/cli/commands/bin/apollo-broker-service.xml (original)
+++ activemq/activemq-apollo/trunk/apollo-cli/src/main/resources/org/apache/activemq/apollo/cli/commands/bin/apollo-broker-service.xml Fri Jun 3 20:18:48 2011
@@ -6,18 +6,18 @@
<logpath>${base}\log</logpath>
<logmode>roll</logmode>
- <executable>java.exe</executable>
+ <executable>"${java.home}\bin\java.exe"</executable>
<argument>-server</argument>
<argument>-Xrs</argument>
<argument>-Xmx1G</argument>
<argument>-Dcom.sun.management.jmxremote</argument>
- <argument>-Djava.util.logging.config.file=${home}\etc\jul.properties</argument>
- <argument>-Dapollo.base=${base}</argument>
- <argument>-Dapollo.home=${home}</argument>
+ <argument>"-Djava.util.logging.config.file=${home}\etc\jul.properties"</argument>
+ <argument>"-Dapollo.base=${base}"</argument>
+ <argument>"-Dapollo.home=${home}"</argument>
<argument>-classpath</argument>
- <argument>${base}\etc;${home}\lib\apollo-boot.jar</argument>
+ <argument>"${base}\etc;${home}\lib\apollo-boot.jar"</argument>
<argument>org.apache.activemq.apollo.boot.Boot</argument>
- <argument>${base}\lib:${home}\lib</argument>
+ <argument>"${base}\lib:${home}\lib"</argument>
<argument>org.apache.activemq.apollo.cli.Apollo</argument>
<argument>run</argument>
Modified: activemq/activemq-apollo/trunk/apollo-cli/src/main/scala/org/apache/activemq/apollo/cli/commands/Create.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-cli/src/main/scala/org/apache/activemq/apollo/cli/commands/Create.scala?rev=1131190&r1=1131189&r2=1131190&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-cli/src/main/scala/org/apache/activemq/apollo/cli/commands/Create.scala (original)
+++ activemq/activemq-apollo/trunk/apollo-cli/src/main/scala/org/apache/activemq/apollo/cli/commands/Create.scala Fri Jun 3 20:18:48 2011
@@ -198,12 +198,17 @@ class Create extends Action {
var content = new String(out.toByteArray, "UTF-8")
if( filter ) {
- content = content.replaceAll(Pattern.quote("${user}"), System.getProperty("user.name",""))
- content = content.replaceAll(Pattern.quote("${host}"), Matcher.quoteReplacement(host))
- content = content.replaceAll(Pattern.quote("${version}"), Matcher.quoteReplacement(Broker.version))
- val home = new File(System.getProperty("apollo.home"))
- content = content.replaceAll(Pattern.quote("${home}"), Matcher.quoteReplacement(home.getCanonicalPath))
- content = content.replaceAll(Pattern.quote("${base}"), Matcher.quoteReplacement(directory.getCanonicalPath))
+ def replace(key:String, value:String) = {
+ content = content.replaceAll(Pattern.quote(key), Matcher.quoteReplacement(value))
+ }
+ def cp(value:String) = new File(value).getCanonicalPath
+
+ replace("${user}", System.getProperty("user.name",""))
+ replace("${host}", host)
+ replace("${version}", Broker.version)
+ replace("${home}", cp(System.getProperty("apollo.home")))
+ replace("${base}", directory.getCanonicalPath)
+ replace("${java.home}", cp(System.getProperty("java.home")))
}
// and then writing out in the new target encoding.