You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by he...@apache.org on 2014/07/01 12:40:02 UTC

[1/6] git commit: Tips for using the JSGui launcher on Windows.

Repository: incubator-brooklyn
Updated Branches:
  refs/heads/master b8f1a04df -> 490ebbd86


Tips for using the JSGui launcher on Windows.


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

Branch: refs/heads/master
Commit: f43d36c471c63310da910341515d48ccc2dd4bd8
Parents: 351111c
Author: Svetoslav Neykov <sv...@cloudsoftcorp.com>
Authored: Mon Jun 30 15:41:04 2014 +0300
Committer: Svetoslav Neykov <sv...@cloudsoftcorp.com>
Committed: Tue Jul 1 10:33:58 2014 +0300

----------------------------------------------------------------------
 .../rest/jsgui/BrooklynJavascriptGuiLauncher.java     | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/f43d36c4/usage/jsgui/src/test/java/brooklyn/rest/jsgui/BrooklynJavascriptGuiLauncher.java
----------------------------------------------------------------------
diff --git a/usage/jsgui/src/test/java/brooklyn/rest/jsgui/BrooklynJavascriptGuiLauncher.java b/usage/jsgui/src/test/java/brooklyn/rest/jsgui/BrooklynJavascriptGuiLauncher.java
index 2c85ed5..a31ab96 100644
--- a/usage/jsgui/src/test/java/brooklyn/rest/jsgui/BrooklynJavascriptGuiLauncher.java
+++ b/usage/jsgui/src/test/java/brooklyn/rest/jsgui/BrooklynJavascriptGuiLauncher.java
@@ -11,7 +11,19 @@ import brooklyn.rest.BrooklynRestApiLauncher;
 import brooklyn.util.net.Networking;
 
 /** launches Javascript GUI programmatically. and used for tests.
- * see {@link BrooklynRestApiLauncher} for more information. */
+ * see {@link BrooklynRestApiLauncher} for more information.
+ *
+ * WINDOWS tips:
+ * On Windows Jetty will lock all static files preventing any changes on them.
+ * To work around the problem and tell Jetty not to lock files:
+ * <ul>
+ *   <li>find jetty-webapp-&lt;ver&gt;.jar from your classpath
+ *   <li>extract the file webdefault.xml from folder org/eclipse/jetty/webapp (On Eclipse
+ *      just expanding the jar from the dependencies, right click/copy on the file.)
+ *   <li>in this project create a java package org.eclipse.jetty.webapp and put the webdefault.html file in it
+ *   <li>edit the file and change the property useFileMappedBuffer to false
+ * </ul> 
+ **/
 public class BrooklynJavascriptGuiLauncher {
 
     private static final Logger log = LoggerFactory.getLogger(BrooklynJavascriptGuiLauncher.class);


[6/6] git commit: Add comments for #29.

Posted by he...@apache.org.
Add comments for #29.


Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/490ebbd8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/490ebbd8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/490ebbd8

Branch: refs/heads/master
Commit: 490ebbd86acd2120780da31c1809b70b8c90f40a
Parents: 71e3a75
Author: Alex Heneveld <al...@cloudsoftcorp.com>
Authored: Tue Jul 1 11:39:33 2014 +0100
Committer: Alex Heneveld <al...@cloudsoftcorp.com>
Committed: Tue Jul 1 11:39:33 2014 +0100

----------------------------------------------------------------------
 utils/common/src/main/java/brooklyn/util/os/Os.java | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/490ebbd8/utils/common/src/main/java/brooklyn/util/os/Os.java
----------------------------------------------------------------------
diff --git a/utils/common/src/main/java/brooklyn/util/os/Os.java b/utils/common/src/main/java/brooklyn/util/os/Os.java
index f2ca037..ac474d5 100644
--- a/utils/common/src/main/java/brooklyn/util/os/Os.java
+++ b/utils/common/src/main/java/brooklyn/util/os/Os.java
@@ -174,12 +174,15 @@ public class Os {
         return System.getProperty("user.home");
     }
 
-    /** merges paths using forward slash (unix way); see {@link Urls#mergePaths(String...)} */
+    /** merges paths using forward slash (unix way); 
+     * now identical to {@link Os#mergePaths(String...)} but kept for contexts
+     * where caller wants to indicate the target system should definitely be unix */
     public static String mergePathsUnix(String ...items) {
         return Urls.mergePaths(items);
     }
 
-    /** merges paths using the local file separator */
+    /** merges paths using forward slash as the "local OS file separator", because it is recognised on windows,
+     * making paths more consistent and avoiding problems with backslashes being escaped */
     public static String mergePaths(String ...items) {
         char separatorChar = '/';
         StringBuilder result = new StringBuilder();


[3/6] git commit: Always use forward slash as separator.

Posted by he...@apache.org.
Always use forward slash as separator.

When building commands on Windows for remote UNIX system the current method will produce invalid results. Forward slash will work on all platforms.


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

Branch: refs/heads/master
Commit: 677490548eff3e42be1a1928a8a7ecd23729292a
Parents: f43d36c
Author: Svetoslav Neykov <sv...@cloudsoftcorp.com>
Authored: Mon Jun 30 19:36:56 2014 +0300
Committer: Svetoslav Neykov <sv...@cloudsoftcorp.com>
Committed: Tue Jul 1 10:33:59 2014 +0300

----------------------------------------------------------------------
 utils/common/src/main/java/brooklyn/util/os/Os.java     | 2 +-
 utils/common/src/test/java/brooklyn/util/os/OsTest.java | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/67749054/utils/common/src/main/java/brooklyn/util/os/Os.java
----------------------------------------------------------------------
diff --git a/utils/common/src/main/java/brooklyn/util/os/Os.java b/utils/common/src/main/java/brooklyn/util/os/Os.java
index 71504bb..f2ca037 100644
--- a/utils/common/src/main/java/brooklyn/util/os/Os.java
+++ b/utils/common/src/main/java/brooklyn/util/os/Os.java
@@ -181,7 +181,7 @@ public class Os {
 
     /** merges paths using the local file separator */
     public static String mergePaths(String ...items) {
-        char separatorChar = File.separatorChar;
+        char separatorChar = '/';
         StringBuilder result = new StringBuilder();
         for (String item: items) {
             if (Strings.isEmpty(item)) continue;

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/67749054/utils/common/src/test/java/brooklyn/util/os/OsTest.java
----------------------------------------------------------------------
diff --git a/utils/common/src/test/java/brooklyn/util/os/OsTest.java b/utils/common/src/test/java/brooklyn/util/os/OsTest.java
index 7e3f430..5ef694f 100644
--- a/utils/common/src/test/java/brooklyn/util/os/OsTest.java
+++ b/utils/common/src/test/java/brooklyn/util/os/OsTest.java
@@ -61,10 +61,10 @@ public class OsTest {
     
     public void testMergePaths() throws Exception {
         assertEquals(Os.mergePaths("a"), "a"); 
-        assertEquals(Os.mergePaths("a", "b"), "a" + File.separator + "b"); 
+        assertEquals(Os.mergePaths("a", "b"), "a/b"); 
         assertEquals(Os.mergePaths("a/", "b"), "a/b");
-        assertEquals(Os.mergePaths("a", "b/"), "a" + File.separator + "b/");
-        assertEquals(Os.mergePaths("/a", "b"), "/a" + File.separator + "b");
+        assertEquals(Os.mergePaths("a", "b/"), "a/b/");
+        assertEquals(Os.mergePaths("/a", "b"), "/a/b");
     }
 
 }


[4/6] git commit: Update comment to match code changes

Posted by he...@apache.org.
Update comment to match code changes


Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/1f2267b4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/1f2267b4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/1f2267b4

Branch: refs/heads/master
Commit: 1f2267b4209a60a2ed06ec3e6c969da7dd9033d4
Parents: 6774905
Author: Svetoslav Neykov <sv...@cloudsoftcorp.com>
Authored: Tue Jul 1 10:35:01 2014 +0300
Committer: Svetoslav Neykov <sv...@cloudsoftcorp.com>
Committed: Tue Jul 1 10:35:01 2014 +0300

----------------------------------------------------------------------
 core/src/main/java/brooklyn/location/basic/LocationConfigKeys.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/1f2267b4/core/src/main/java/brooklyn/location/basic/LocationConfigKeys.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/brooklyn/location/basic/LocationConfigKeys.java b/core/src/main/java/brooklyn/location/basic/LocationConfigKeys.java
index 1a77f27..7d8840e 100644
--- a/core/src/main/java/brooklyn/location/basic/LocationConfigKeys.java
+++ b/core/src/main/java/brooklyn/location/basic/LocationConfigKeys.java
@@ -38,7 +38,7 @@ public class LocationConfigKeys {
     public static final ConfigKey<String> PASSWORD = ConfigKeys.newStringConfigKey("password");
     public static final ConfigKey<String> PUBLIC_KEY_FILE = ConfigKeys.newStringConfigKey("publicKeyFile", "colon-separated list of ssh public key file(s) to use; if blank will infer from privateKeyFile by appending \".pub\"");
     public static final ConfigKey<String> PUBLIC_KEY_DATA = ConfigKeys.newStringConfigKey("publicKeyData", "ssh public key string to use (takes precedence over publicKeyFile)");
-    public static final ConfigKey<String> PRIVATE_KEY_FILE = ConfigKeys.newStringConfigKey("privateKeyFile", "colon-separated list of ssh private key files; uses first in list that can be read",
+    public static final ConfigKey<String> PRIVATE_KEY_FILE = ConfigKeys.newStringConfigKey("privateKeyFile", "a '" + File.pathSeparator + "' separated list of ssh private key files; uses first in list that can be read",
                                                                                            Os.fromHome(".ssh/id_rsa") + File.pathSeparator + Os.fromHome(".ssh/id_dsa"));
     public static final ConfigKey<String> PRIVATE_KEY_DATA = ConfigKeys.newStringConfigKey("privateKeyData", "ssh private key string to use (takes precedence over privateKeyFile)");
     public static final ConfigKey<String> PRIVATE_KEY_PASSPHRASE = ConfigKeys.newStringConfigKey("privateKeyPassphrase");


[2/6] git commit: OS-independent path for default private key locations

Posted by he...@apache.org.
OS-independent path for default private key locations


Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/351111ca
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/351111ca
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/351111ca

Branch: refs/heads/master
Commit: 351111ca1a02b65684c9bbf8d0e7dc7b6498f7c0
Parents: b8f1a04
Author: Svetoslav Neykov <sv...@cloudsoftcorp.com>
Authored: Mon Jun 30 15:40:40 2014 +0300
Committer: Svetoslav Neykov <sv...@cloudsoftcorp.com>
Committed: Tue Jul 1 10:33:58 2014 +0300

----------------------------------------------------------------------
 .../main/java/brooklyn/location/basic/LocationConfigKeys.java   | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/351111ca/core/src/main/java/brooklyn/location/basic/LocationConfigKeys.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/brooklyn/location/basic/LocationConfigKeys.java b/core/src/main/java/brooklyn/location/basic/LocationConfigKeys.java
index eeb070d..1a77f27 100644
--- a/core/src/main/java/brooklyn/location/basic/LocationConfigKeys.java
+++ b/core/src/main/java/brooklyn/location/basic/LocationConfigKeys.java
@@ -1,10 +1,12 @@
 package brooklyn.location.basic;
 
+import java.io.File;
 import java.util.Set;
 
 import brooklyn.config.ConfigKey;
 import brooklyn.entity.basic.ConfigKeys;
 import brooklyn.event.basic.BasicConfigKey;
+import brooklyn.util.os.Os;
 
 import com.google.common.base.CaseFormat;
 import com.google.common.reflect.TypeToken;
@@ -36,7 +38,8 @@ public class LocationConfigKeys {
     public static final ConfigKey<String> PASSWORD = ConfigKeys.newStringConfigKey("password");
     public static final ConfigKey<String> PUBLIC_KEY_FILE = ConfigKeys.newStringConfigKey("publicKeyFile", "colon-separated list of ssh public key file(s) to use; if blank will infer from privateKeyFile by appending \".pub\"");
     public static final ConfigKey<String> PUBLIC_KEY_DATA = ConfigKeys.newStringConfigKey("publicKeyData", "ssh public key string to use (takes precedence over publicKeyFile)");
-    public static final ConfigKey<String> PRIVATE_KEY_FILE = ConfigKeys.newStringConfigKey("privateKeyFile", "colon-separated list of ssh private key files; uses first in list that can be read", "~/.ssh/id_rsa:~/.ssh/id_dsa");
+    public static final ConfigKey<String> PRIVATE_KEY_FILE = ConfigKeys.newStringConfigKey("privateKeyFile", "colon-separated list of ssh private key files; uses first in list that can be read",
+                                                                                           Os.fromHome(".ssh/id_rsa") + File.pathSeparator + Os.fromHome(".ssh/id_dsa"));
     public static final ConfigKey<String> PRIVATE_KEY_DATA = ConfigKeys.newStringConfigKey("privateKeyData", "ssh private key string to use (takes precedence over privateKeyFile)");
     public static final ConfigKey<String> PRIVATE_KEY_PASSPHRASE = ConfigKeys.newStringConfigKey("privateKeyPassphrase");
 


[5/6] git commit: This closes #29

Posted by he...@apache.org.
This closes #29


Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/71e3a75b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/71e3a75b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/71e3a75b

Branch: refs/heads/master
Commit: 71e3a75ba3719632970da443478535ca75bf56d3
Parents: b8f1a04 1f2267b
Author: Alex Heneveld <al...@cloudsoftcorp.com>
Authored: Tue Jul 1 11:37:13 2014 +0100
Committer: Alex Heneveld <al...@cloudsoftcorp.com>
Committed: Tue Jul 1 11:37:13 2014 +0100

----------------------------------------------------------------------
 .../brooklyn/location/basic/LocationConfigKeys.java   |  5 ++++-
 .../rest/jsgui/BrooklynJavascriptGuiLauncher.java     | 14 +++++++++++++-
 utils/common/src/main/java/brooklyn/util/os/Os.java   |  2 +-
 .../common/src/test/java/brooklyn/util/os/OsTest.java |  6 +++---
 4 files changed, 21 insertions(+), 6 deletions(-)
----------------------------------------------------------------------