brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rich...@apache.org
Subject [3/5] brooklyn-server git commit: Enable older Java versions
Date Tue, 18 Apr 2017 12:41:57 GMT
Enable older Java versions

(cherry picked from commit b6c8566bbbc4766dd5e332a9c0db7f992f5f9ed4)


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

Branch: refs/heads/0.11.x
Commit: 5e1ed0a0312c2f74eb29e616a94212edb605b5ed
Parents: 4547cef
Author: Duncan Godwin <duncan.godwin@cloudsoftcorp.com>
Authored: Fri Apr 14 13:20:03 2017 +0100
Committer: Richard Downer <richard@apache.org>
Committed: Tue Apr 18 13:37:22 2017 +0100

----------------------------------------------------------------------
 .../java/org/apache/brooklyn/util/ssh/BashCommands.java   | 10 ++++++++++
 1 file changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/5e1ed0a0/utils/common/src/main/java/org/apache/brooklyn/util/ssh/BashCommands.java
----------------------------------------------------------------------
diff --git a/utils/common/src/main/java/org/apache/brooklyn/util/ssh/BashCommands.java b/utils/common/src/main/java/org/apache/brooklyn/util/ssh/BashCommands.java
index 4d0fd81..414abc5 100644
--- a/utils/common/src/main/java/org/apache/brooklyn/util/ssh/BashCommands.java
+++ b/utils/common/src/main/java/org/apache/brooklyn/util/ssh/BashCommands.java
@@ -621,6 +621,7 @@ public class BashCommands {
     public static String installJava(int version) {
         Preconditions.checkArgument(version == 6 || version == 7 || version == 8, "Supported
Java versions are 6, 7, or 8");
         List<String> commands = new LinkedList<String>();
+        commands.add(ok(addOpenJDKPPK()));
         commands.add(installPackageOr(MutableMap.of("apt", "openjdk-" + version + "-jdk","yum",
"java-1." + version + ".0-openjdk-devel"), null,
                 ifExecutableElse1("zypper", chainGroup(
                         ok(sudo("zypper --non-interactive addrepo http://download.opensuse.org/repositories/Java:/openjdk6:/Factory/SLE_11_SP3
java_sles_11")),
@@ -671,6 +672,15 @@ public class BashCommands {
     }
 
     /**
+     * Adds the PPA for OpenJDK for older JDK versions (7 and lower) required by some software
(e.g. JBoss)
+     */
+    public static String addOpenJDKPPK(){
+        return chainGroup(
+                sudo("sudo add-apt-repository -y ppa:openjdk-r/ppa"),
+                sudo("sudo apt-get update"));
+    }
+
+    /**
      * Returns a command which upgrades NSS on Yum based machines - Addresses https://issues.apache.org/jira/browse/BROOKLYN-320
      * @return command
      */


Mime
View raw message