Permalink
Browse files

Merge pull request #61 from loicfrering/master

Working on multi JDK support
  • Loading branch information...
2 parents afa31a8 + 4f979c3 commit e226d9fe098c6172a3c52da302a8a0430fd43332 @michaelklishin michaelklishin committed May 23, 2012
@@ -27,3 +27,5 @@
else
set['java']['java_home'] = "/usr/lib/jvm/default-java"
end
+
+default[:java][:multi][:versions] = ["openjdk6", "openjdk7", "oraclejdk7"]
@@ -0,0 +1,4 @@
+node['java']['multi']['versions'].each do |java_version|
+ Chef::Log.info("Installing Java #{java_version}.")
+ include_recipe "java::#{java_version}"
+end
@@ -0,0 +1,17 @@
+version = 6
+
+pkgs = value_for_platform(
+ ["centos","redhat","fedora","scientific","amazon"] => {
+ "default" => ["java-1.#{version}.0-openjdk","java-1.#{version}.0-openjdk-devel"]
+ },
+ ["arch","freebsd"] => {
+ "default" => ["openjdk#{version}"]
+ },
+ "default" => ["openjdk-#{version}-jdk"]
+)
+
+pkgs.each do |pkg|
+ package pkg do
+ action :install
+ end
+end
@@ -0,0 +1,17 @@
+version = 7
+
+pkgs = value_for_platform(
+ ["centos","redhat","fedora","scientific","amazon"] => {
+ "default" => ["java-1.#{version}.0-openjdk","java-1.#{version}.0-openjdk-devel"]
+ },
+ ["arch","freebsd"] => {
+ "default" => ["openjdk#{version}"]
+ },
+ "default" => ["openjdk-#{version}-jdk"]
+)
+
+pkgs.each do |pkg|
+ package pkg do
+ action :install
+ end
+end

0 comments on commit e226d9f

Please sign in to comment.