Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

Select Status

RSS

java (139) Versions 1.40.0

Recipes and resources for installing Java and managing certificates

Policyfile
Berkshelf
Knife
cookbook 'java', '= 1.40.0', :supermarket
cookbook 'java', '= 1.40.0'
knife supermarket install java
knife supermarket download java
README
Dependencies
Changelog
Quality 0%

java cookbook

travis-badge
Cookbook Version

This cookbook installs a Java JDK/JRE. It defaults to installing
OpenJDK, but it can also install Oracle and IBM JDKs.

Usage

Simply include the java recipe wherever you would like Java installed, such as a run list (recipe[java]) or a cookbook (include_recipe 'java'). By default, OpenJDK 6 is installed. The install_flavor attribute is used to determine which JDK to install (OpenJDK, Oracle, IBM, or Windows), and jdk_version specifies which version to install (currently 6 and 7 are supported for all JDK types, 8 for Oracle only).

Examples

To install Oracle Java 7 (note that when installing Oracle JDK, accept_oracle_download_terms attribute must be set -- see below role for an example):
ruby
name "java"
description "Install Oracle Java"
default_attributes(
"java" => {
"install_flavor" => "oracle",
"jdk_version" => "7",
"oracle" => {
"accept_oracle_download_terms" => true
}
}
)
run_list(
"recipe[java]"
)

Example role to install IBM flavored Java:
ruby
name "java"
description "Install IBM Java on Ubuntu"
default_attributes(
"java" => {
"install_flavor" => "ibm",
"ibm" => {
"accept_ibm_download_terms" => true,
"url" => "http://fileserver.example.com/ibm-java-x86_64-sdk-7.0-4.1.bin",
"checksum" => "The SHA256 checksum of the bin"
}
}
)
run_list(
"recipe[java]"
)

Requirements

Chef 11+

Platform

  • Debian, Ubuntu
  • CentOS, Red Hat, Fedora, Scientific, Amazon, XenServer
  • ArchLinux
  • FreeBSD
  • SmartOS
  • Windows
  • Mac OS X

Attributes

See attributes/default.rb for default values.

  • node['java']['install_flavor'] - Flavor of JVM you would like installed (oracle, oracle_rpm, openjdk, ibm, windows), default openjdk on Linux/Unix platforms, windows on Windows platforms.
  • node['java']['jdk_version'] - JDK version to install, defaults to '6'.
  • node['java']['java_home'] - Default location of the "$JAVA_HOME".
  • node['java']['set_etc_environment'] - Optionally sets JAVA_HOME in /etc/environment for Default false.
  • node['java']['openjdk_packages'] - Array of OpenJDK package names to install in the java::openjdk recipe. This is set based on the platform.
  • node['java']['tarball'] - Name of the tarball to retrieve from your internal repository, default jdk1.6.0_29_i386.tar.gz
  • node['java']['tarball_checksum'] - Checksum for the tarball, if you use a different tarball, you also need to create a new sha256 checksum
  • node['java']['jdk'] - Version and architecture specific attributes for setting the URL on Oracle's site for the JDK, and the checksum of the .tar.gz.
  • node['java']['oracle']['accept_oracle_download_terms'] - Indicates that you accept Oracle's EULA
  • node['java']['windows']['url'] - The internal location of your java install for windows
  • node['java']['windows']['package_name'] - The package name used by windows_package to check in the registry to determine if the install has already been run
  • node['java']['windows']['checksum'] - The checksum for the package to download on Windows machines (default is nil, which does not perform checksum validation)
  • node['java']['ibm']['url'] - The URL which to download the IBM JDK/SDK. See the ibm recipe section below.
  • node['java']['ibm']['accept_ibm_download_terms'] - Indicates that you accept IBM's EULA (for java::ibm)
  • node['java']['oracle_rpm']['type'] - Type of java RPM (jre or jdk), default jdk
  • node['java']['oracle_rpm']['package_version'] - optional, can be set to pin a version different from the up-to-date one available in the YUM repo, it might be needed to also override the node['java']['java_home'] attribute to a value consistent with the defined version
  • node['java']['oracle_rpm']['package_name'] - optional, can be set to define a package name different from the RPM published by Oracle.
  • node['java']['accept_license_agreement'] - Indicates that you accept the EULA for openjdk package installation.
  • node['java']['set_default'] - Indicates whether or not you want the JDK installed to be default on the system. Defaults to true.
  • node['java']['oracle']['jce']['enabled'] - Indicates if the JCE Unlimited Strength Jurisdiction Policy Files should be installed for oracle JDKs
  • node['java']['oracle']['jce']['home'] - Where the JCE policy files should be installed to
  • node['java']['oracle']['jce'][java_version]['checksum'] - Checksum of the JCE policy zip. Can be sha256 or md5
  • node['java']['oracle']['jce'][java_version]['url'] - URL which to download the JCE policy zip

Recipes

default

Include the default recipe in a run list or recipe to get java. By default
the openjdk flavor of Java is installed, but this can be changed by
using the install_flavor attribute. By default on Windows platform
systems, the install_flavor is windows and on Mac OS X platform systems, the install_flavor is homebrew.

OpenJDK is the default because of licensing changes made upstream by
Oracle. See notes on the oracle recipe below.

NOTE: In most cases, including just the default recipe will be sufficient.
It's possible to include the install_type recipes directly, as long as
the necessary attributes (such as java_home) are set.

set_attributes_from_version

Sets default attributes based on the JDK version. This is included by default.rb. This logic must be in
a recipe instead of attributes/default.rb. See #95
for details.

Updates /usr/lib/jvm/default-java to point to JAVA_HOME.

purge_packages

Purges deprecated Sun Java packages.

openjdk

This recipe installs the openjdk flavor of Java. It also uses the
alternatives system on RHEL/Debian families to set the default Java.

On platforms such as SmartOS that require the acceptance of a license
agreement during package installation, set
node['java']['accept_license_agreement'] to true in order to indicate
that you accept the license.

oracle

This recipe installs the oracle flavor of Java. This recipe does not
use distribution packages as Oracle changed the licensing terms with
JDK 1.6u27 and prohibited the practice for both RHEL and Debian family
platforms.

As of 26 March 2012 you can no longer directly download the JDK from
Oracle's website without using a special cookie. This cookbook uses
that cookie to download the oracle recipe on your behalf, however the
java::oracle recipe forces you to set either override the
node['java']['oracle']['accept_oracle_download_terms'] to true or
set up a private repository accessible by HTTP.

override the accept_oracle_download_terms in, e.g., roles/base.rb
ruby
default_attributes(
:java => {
:oracle => {
"accept_oracle_download_terms" => true
}
}
)

For both RHEL and Debian families, this recipe pulls the binary
distribution from the Oracle website, and installs it in the default
JAVA_HOME for each distribution. For Debian, this is
/usr/lib/jvm/default-java. For RHEl, this is /usr/lib/jvm/java.

After putting the binaries in place, the java::oracle recipe updates
/usr/bin/java to point to the installed JDK using the
update-alternatives script. This is all handled in the java_ark
LWRP.

oracle_i386

This recipe installs the 32-bit Java virtual machine without setting
it as the default. This can be useful if you have applications on the
same machine that require different versions of the JVM.

This recipe operates in a similar manner to java::oracle.

oracle_rpm

This recipe installs the Oracle JRE or JDK provided by a custom YUM
repositories.
It also uses the alternatives system on RHEL families to set
the default Java.

While public YUM repos for Oracle Java 7 and prior are available,
you need to download the RPMs manually for Java 8 and make
your own internal repository. This must be done to use this recipe to
install Oracle Java 8 via RPM. You will also likely need to set
node['java']['oracle_rpm']['package_name'] to jdk1.8.0_40,
replacing 40 with the most current version in your local repo.

windows

Because as of 26 March 2012 you can no longer directly download the
JDK msi from Oracle's website without using a special cookie. This recipe
requires you to set node['java']['oracle']['accept_oracle_download_terms']
to true or host it internally on your own http repo or s3 bucket.

IMPORTANT NOTE

If you use the windows recipe, you'll need to make sure you've uploaded
the aws and windows cookbooks. As of version 1.18.0, this cookbook
references them with suggests instead of depends, as they are only
used by the windows recipe.

ibm

The java::ibm recipe is used to install the IBM version of Java.
Note that IBM requires you to create an account and log in to
download the binary installer for your platform. You must accept the
license agreement with IBM to use their version of Java. In this
cookbook, you indicate this by setting
node['java']['ibm']['accept_ibm_download_terms'] to true. You must
also host the binary on your own HTTP server to have an automated
installation. The node['java']['ibm']['url'] attribute must be set
to a valid https/http URL; the URL is checked for validity in the recipe.

At this time the java::ibm recipe does not support multiple SDK
installations.

Resources/Providers

java_ark

This cookbook contains the java_ark LWRP. Generally speaking this
LWRP is deprecated in favor of ark from the
ark cookbook, but it is
still used in this cookbook for handling the Oracle JDK installation.

By default, the extracted directory is extracted to
app_root/extracted_dir_name and symlinked to app_root/default

Actions

  • :install: extracts the tarball and makes necessary symlinks
  • :remove: removes the tarball and run update-alternatives for all symlinked bin_cmds

Attribute Parameters

  • url: path to tarball, .tar.gz, .bin (oracle-specific), and .zip currently supported
  • checksum: SHA256 checksum, not used for security but avoid redownloading the archive on each chef-client run
  • app_home: the default for installations of this type of application, for example, /usr/lib/tomcat/default. If your application is not set to the default, it will be placed at the same level in the directory hierarchy but the directory name will be app_root/extracted_directory_name + "_alt"
  • app_home_mode: file mode for app_home, is an integer
  • bin_cmds: array of binary commands that should be symlinked to /usr/bin, examples are mvn, java, javac, etc. These cmds must be in the bin subdirectory of the extracted folder. Will be ignored if this java_ark is not the default
  • owner: owner of extracted directory, set to "root" by default
  • group: group of extracted directory, set to :owner by default
  • default: whether this the default installation of this package, boolean true or false
  • reset_alternatives: whether alternatives is reset boolean true or false
  • use_alt_suffix: whether '_alt' suffix is used for not default javas boolean true or false

Examples

# install jdk6 from Oracle
java_ark "jdk" do
    url 'http://download.oracle.com/otn-pub/java/jdk/6u29-b11/jdk-6u29-linux-x64.bin'
    checksum  'a8603fa62045ce2164b26f7c04859cd548ffe0e33bfc979d9fa73df42e3b3365'
    app_home '/usr/local/java/default'
    bin_cmds ["java", "javac"]
    action :install
end

java_alternatives

The java_alternatives LWRP uses update-alternatives command
to set and unset command alternatives for various Java tools
such as java, javac, etc.

Actions

  • :set: set alternatives for Java tools
  • :unset: unset alternatives for Java tools

Attribute Parameters

  • java_location: Java installation location.
  • bin_cmds: array of Java tool names to set or unset alternatives on.
  • default: whether to set the Java tools as system default. Boolean, defaults to true.
  • priority: priority of the alternatives. Integer, defaults to 1061.

Examples

# set alternatives for java and javac commands
java_alternatives "set java alternatives" do
    java_location '/usr/local/java'
    bin_cmds ["java", "javac"]
    action :set
end

Production Deployment with Oracle Java

Oracle has been known to change the behavior of its download site frequently. It is recommended you store the archives on an artifact server or s3 bucket. You can then override the attributes in a cookbook, role, or environment:

default['java']['jdk_version'] = '7'
default['java']['install_flavor'] = 'oracle'
default['java']['jdk']['7']['x86_64']['url'] = 'http://artifactory.example.com/artifacts/jdk-7u65-linux-x64.tar.gz'
default['java']['jdk']['7']['x86_64']['checksum'] = 'The SHA-256 checksum of the JDK archive'
default['java']['oracle']['accept_oracle_download_terms'] = true

Recommendations for inclusion in community cookbooks

This cookbook is a dependency for many other cookbooks in the Java/Chef sphere. Here are some guidelines for including it into other cookbooks:

Allow people to not use this cookbook

Many users manage Java on their own or have systems that already have java installed. Give these users an option to skip this cookbook, for example:
ruby
include_recipe 'java' if node['maven']['install_java']

This would allow a users of the maven cookbook to choose if they want the maven cookbook to install java for them or leave that up to the consumer.

Another good example is from the Jenkins Cookbook Java recipe.

Pinning to major version of cookbook and Java

This cookbook follows semver. It is recommended to pin at the major version of this cookbook when including it in other cookbooks, eg: depends 'java', '~> 1.0'

It is acceptable to set the node['java']['jdk_version'] to a specific version if required for your software to run, eg software xyz requires Java 8 to run. Refrain from pinning to specific patches of the JDK to allow users to consume security updates.

Development

This cookbook uses
test-kitchen for
integration tests and
ChefSpec/RSpec for unit tests.
See TESTING.md for testing instructions.

At this time due to licensing concerns, the IBM recipe is not set up
in test kitchen. If you would like to test this locally, copy
.kitchen.yml to .kitchen.local.yml and add the following suite:
yml
suites:
- name: ibm
run_list: ["recipe[java]"]
attributes:
java:
install_flavor: "ibm"
ibm:
accept_ibm_download_terms: true
url: "http://jenkins/ibm-java-x86_64-sdk-7.0-4.1.bin"
checksum: the-sha256-checksum

Log into the IBM DeveloperWorks site to download a copy of the IBM
Java SDK you wish to use/test, host it on an internal HTTP server, and
calculate the SHA256 checksum to use in the suite.

License and Author

Copyright: 2014-2015, Agile Orbit, LLC

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Dependent cookbooks

apt >= 0.0.0
windows >= 0.0.0

Contingent cookbooks

abiquo Applicable Versions
activemq Applicable Versions
aem Applicable Versions
aet Applicable Versions
akibanserver Applicable Versions
alfresco Applicable Versions
alfresco-utils Applicable Versions
alphard-artifactory Applicable Versions
alphard-chef-artifactory Applicable Versions
alphard-chef-deploy Applicable Versions
alphard-chef-sbt Applicable Versions
android-sdk Applicable Versions
ant Applicable Versions
apache-log-analysis Applicable Versions
apache-newrelic-plugin Applicable Versions
apache_hadoop Applicable Versions
apache_kafka Applicable Versions
apache_spark Applicable Versions
apache_spark_ng Applicable Versions
apache_tomcat Applicable Versions
apache_zookeeper Applicable Versions
apktool Applicable Versions
application_java Applicable Versions
archiva Applicable Versions
ark Applicable Versions
artifact-deployer Applicable Versions
artifactory Applicable Versions
artifactory_ii Applicable Versions
asgard Applicable Versions
askbot Applicable Versions
aws-cloud-watch-cli-tools Applicable Versions
aws_developer_tools Applicable Versions
bamboo Applicable Versions
bamboo-agent Applicable Versions
baragon Applicable Versions
bastion Applicable Versions
bazel Applicable Versions
bigdata Applicable Versions
bitbucket_server Applicable Versions
bjn_java Applicable Versions
bootstrap Applicable Versions
buildr Applicable Versions
cassandra Applicable Versions
cassandra-dse Applicable Versions
cassandra-opscenter Applicable Versions
cassandra-priam Applicable Versions
cassandra-reaper Applicable Versions
cdap Applicable Versions
cerner_kafka Applicable Versions
cerner_tomcat Applicable Versions
chamber-kibana Applicable Versions
chef Applicable Versions
chef-server Applicable Versions
chef-teamcity Applicable Versions
chef_crowd Applicable Versions
chef_ec2_cli_tools Applicable Versions
chef_jira Applicable Versions
chronos Applicable Versions
coffee-truck Applicable Versions
configure_and_deploy_ssc Applicable Versions
confluence Applicable Versions
confluent Applicable Versions
confluent-cookbook Applicable Versions
coopr Applicable Versions
corbel Applicable Versions
corus Applicable Versions
couchdb Applicable Versions
cq Applicable Versions
crowd Applicable Versions
deploy-play Applicable Versions
dima-repose Applicable Versions
drelephant Applicable Versions
drill Applicable Versions
dropwizard Applicable Versions
druid Applicable Versions
dse Applicable Versions
dse-chef Applicable Versions
dynatrace Applicable Versions
dynatrace-appmon Applicable Versions
elassandra Applicable Versions
elastic Applicable Versions
elasticsearch Applicable Versions
elasticsearch-cluster Applicable Versions
elasticsearch-ng Applicable Versions
elasticsearch_cluster Applicable Versions
elk Applicable Versions
elkstack Applicable Versions
emptyness Applicable Versions
enstratius_agent_proxy Applicable Versions
epipe Applicable Versions
esri-tomcat Applicable Versions
et_elk Applicable Versions
et_gradle Applicable Versions
et_mesos Applicable Versions
eulipion-cleanspeak Applicable Versions
exhibitor Applicable Versions
flink Applicable Versions
flume Applicable Versions
flyway-cli Applicable Versions
foreflight_build_agent Applicable Versions
formatron_monitor Applicable Versions
gads Applicable Versions
ganglia_cluster Applicable Versions
gatling Applicable Versions
gerrit Applicable Versions
glassfish Applicable Versions
gobblin Applicable Versions
gocd Applicable Versions
gocd_agent Applicable Versions
gradle Applicable Versions
graphhopper Applicable Versions
graylog2 Applicable Versions
grinder Applicable Versions
groovy Applicable Versions
hadoop Applicable Versions
hadoop_cluster Applicable Versions
hadoop_cluster_rpm Applicable Versions
hadoop_for_hbase Applicable Versions
hadoop_spark Applicable Versions
hbase Applicable Versions
hbase_cluster Applicable Versions
hipsnip-jetty Applicable Versions
hive Applicable Versions
hops Applicable Versions
ice Applicable Versions
idea Applicable Versions
ignite-openfire Applicable Versions
impala Applicable Versions
intel_hadoop_metrics Applicable Versions
jar_deployment Applicable Versions
java-management Applicable Versions
java-service Applicable Versions
java_sun Applicable Versions
javadeploy Applicable Versions
jboss Applicable Versions
jboss-atg Applicable Versions
jboss7 Applicable Versions
jenkins Applicable Versions
jenkins-server Applicable Versions
jenkins_config Applicable Versions
jenkins_jnlp_slave Applicable Versions
jenkins_utils Applicable Versions
jetty Applicable Versions
jira Applicable Versions
jmeter Applicable Versions
jmxsh-chef Applicable Versions
jpackage Applicable Versions
jruby Applicable Versions
kafka Applicable Versions
kafka-cluster Applicable Versions
kafka-manager Applicable Versions
kafka_broker Applicable Versions
karaf Applicable Versions
katello Applicable Versions
keycloak Applicable Versions
kibana5-gm Applicable Versions
kibana_lwrp Applicable Versions
kkafka Applicable Versions
knotx Applicable Versions
kzookeeper Applicable Versions
lein Applicable Versions
leiningen Applicable Versions
liquibase Applicable Versions
livy Applicable Versions
logstash Applicable Versions
logstash_simple Applicable Versions
looker Applicable Versions
mapr Applicable Versions
marathon Applicable Versions
maven Applicable Versions
mecab-java Applicable Versions
mesos Applicable Versions
midokura Applicable Versions
minecraft Applicable Versions
minecraft-server Applicable Versions
mule Applicable Versions
neo4j Applicable Versions
netkernel Applicable Versions
nexus Applicable Versions
nexus_repository_manager Applicable Versions
nodestack Applicable Versions
noosfero Applicable Versions
ohmage Applicable Versions
oozie Applicable Versions
opendj-openam Applicable Versions
openfire Applicable Versions
openhab Applicable Versions
openmq Applicable Versions
opennms Applicable Versions
openoffice Applicable Versions
opentsdb Applicable Versions
oracle-fmw Applicable Versions
oracle_java Applicable Versions
orientdb Applicable Versions
paramount Applicable Versions
pennyworth Applicable Versions
petals Applicable Versions
pig Applicable Versions
pipeline Applicable Versions
platformstack Applicable Versions
polyglot Applicable Versions
protractor Applicable Versions
puncha-kibana Applicable Versions
r_config Applicable Versions
recognizer Applicable Versions
resin Applicable Versions
riak Applicable Versions
riemann2 Applicable Versions
robot Applicable Versions
rubymine Applicable Versions
rundeck Applicable Versions
rundeck-alt Applicable Versions
rundeck-server Applicable Versions
sauceconnect Applicable Versions
sbt-extras Applicable Versions
scala Applicable Versions
sda-agent Applicable Versions
simple-cerebro Applicable Versions
singularity Applicable Versions
singularity_executor Applicable Versions
sips-office-server Applicable Versions
soa_tools Applicable Versions
solr Applicable Versions
solr-lts Applicable Versions
solr_6 Applicable Versions
solrcloud Applicable Versions
sonar Applicable Versions
sonarqube_server Applicable Versions
spark Applicable Versions
spigot Applicable Versions
spinen-artifactory Applicable Versions
spring-boot Applicable Versions
stack-java Applicable Versions
stack_commons Applicable Versions
stash Applicable Versions
storm Applicable Versions
storm-cluster Applicable Versions
subrosa Applicable Versions
sudo_elastic Applicable Versions
sudo_logstash Applicable Versions
sumologic-collector Applicable Versions
takipi Applicable Versions
taurus Applicable Versions
teamcity_server Applicable Versions
tekno-mineos Applicable Versions
tensorflow Applicable Versions
thrift Applicable Versions
titan Applicable Versions
tizen Applicable Versions
tomcat Applicable Versions
tomcat-all Applicable Versions
tomcat-openam Applicable Versions
tomcat-solr Applicable Versions
tomcat7 Applicable Versions
tomcat8 Applicable Versions
tomcat_latest Applicable Versions
tomee Applicable Versions
tungsten Applicable Versions
typesafe-stack Applicable Versions
unifi Applicable Versions
unjava Applicable Versions
vault-cli Applicable Versions
vertx Applicable Versions
was_liberty Applicable Versions
webgoat Applicable Versions
weblogic Applicable Versions
webobjects Applicable Versions
wildfly Applicable Versions
wlp Applicable Versions
xldeploy Applicable Versions
xlrelease Applicable Versions
yajsw Applicable Versions
youtrack Applicable Versions
zabbix Applicable Versions
zammad Applicable Versions
zendserver Applicable Versions
zenoss Applicable Versions
zeppelin Applicable Versions
ziggrid Applicable Versions
zipkin Applicable Versions
zncrypt Applicable Versions
zookeeper Applicable Versions
zookeeper-cluster Applicable Versions
zookeeper-grid Applicable Versions
zookeeper_cluster Applicable Versions
zookeeperd Applicable Versions

Java Cookbook CHANGELOG

This file is used to list changes made in each version of the Java cookbook.

v1.40 - 6/29/2016

  • Travis build green
  • Add Windows JCE support
  • Changes to prevent re-execution of resource creating file '/etc/profile.d/jdk.sh'
  • Fix JDK checksum
  • Update ibm_jdk.installer.properties.erb for IBM JDK 1.8
  • Install OpenJDK from distribution if Ubuntu version >= 15.10
  • Fixes #342 - Tar is included in macosx and homebrews package is gnutar which causes this to fail
  • Add 12.04 to jdk8 test suite
  • Add source and issues urls to supermarket
  • Distinguishing the Java version for installing on the Mac OS X
  • Doc and cruft cleanup

v1.39 - 1/14/2016

  • Travis debugging only, no code changes.

v1.38 - 1/13/2016

  • (Win) Fix for Java install failing on Windows (introduced in #315)
  • Travis fixes/badge

v1.37 - 11/9/2015

  • (Win) Attirbute for specifying the install directory for the public jre #315

v1.36 - 9/3/2015

  • Oracle JDK 1.8.0_65
  • Add Ubuntu ppa (allows OpenJDK 8)
  • Added ChefSpec matchers #284
  • Fix compile error using Chef::Application.fatal #279
  • #222 Provide possibility to set ark download timeout
  • Openjdk6 does not exist in deb 8.2
  • Change to create java home dir even if top level doesn't exist(Eg mkdir_p instead of mkdir)
  • Fix berks url and remove apt
  • Documentation and dependency updates

v1.35 - 8/4/2015

  • Use bento boxes and remove EOL distros from testing suite.
  • Update to latest JDKs. Note Oracle JDK7 is now EOL.
  • Alternatives improvements
  • Fixes #155 to allow install of OpenJDK 1.8
  • Fixes #257 Changed switches for the jdk 8 exe installer on windows
  • Make sure tar package installed for java_ark
  • Add support for Mac OS X "mac_os_x" via homebrew.
  • Update metadata.rb to contain source and issue information for supermarket and chef-repo convenience

Known Issues

  • Kitchen CI test with 12.04 fails due to hostname unable to be set.

v1.31 - 2/3/2015

  • Update to latest JDKs for 7 and 8. JDK7 will be EOL April 2015
  • Fix up Travis support.
  • Add ability to install JCE policy files for oracle JDK #228
  • Change connect timeout to 30 seconds

v1.29.0 - 11/14/2014

Bug

  • #216 - Ensure dirs, links, and jinfo files are owned correctly
  • #217 - Update to Oracle JDK 8u25
  • #214 - Update to Oracle JDK 7u71-b14

Improvement

  • Adding a connect_timeout option for downloading java.

Misc

  • Switched to chef-zero provisioner in test suites.
  • Adding ISSUES.md for guidance on creating new issues for the Java cookbook.
  • Fix IBM unit tests.

v1.28.0 - 9/6/2014

Improvement

  • Allow setting of group to extracted java files.

Bug

  • Add -no-same-owner parameter to tar extract to avoid issues when the chef cache dir is on an NFS mounted drive.
  • In the ark provider, it doesn't compare the MD5 sum with the right value which causes Java cookbook always download tarball from oracle server

v1.27.0 - 8/22/2014

  • Update Oracle JDK8 to version 8u20

v1.26.0 - 8/16/2014

  • #201 - Allow pinning of package versions for openjdk
  • #198 - Update Oracle JDK7 to version 7u67
  • #189 - Support specific version and name for Oracle RPM

v1.25.0 - 8/1/2014

Improvement

  • #189 - Resource ark -> attribute bin_cmds default value
  • #168 - Add option to put JAVA_HOME in /etc/environment
  • #172 - Allow ark to pull from http and files ending in .gz.

Documentation

  • Recommendations for inclusion in community cookbooks
  • Production Deployment with Oracle Java
  • Update testing instructions for chefdk
  • Various Readme formatting.

Misc

  • Use Supermarket endpoint in berksfile
  • rspec cleanup
  • Adding ubuntu-14.04 to test suite

v1.24.0 - 7/25/2014

New Cookbook maintainer! Agile Orbit

Improvement

  • #192 - Bump JDK7 URLs to 7u65
  • #191 - Upgrade Oracle's Java 8 to u11
  • #188 - Allow for alternatives priority to be set from attribute.
  • #176 - Change ownership of extracted files
  • #169 - Add retries and retry_delay parameters to java_ark LWRP
  • #167 - default: don't fail when using java 8 on windows
  • #165 - Support for Server JRE
  • #158 - Updated README for accepting oracle terms
  • #157 -Remove VirtualBox specific box_urls
  • List AgileOrbit as the maintainer (AgileOrbit took over from Socrata in July 2014)

v1.23.0 - 7/25/2014

  • Tagged but never published to community cookbooks. All changes rolled into 1.24.0

v1.22.0

Improvement

  • #148 - Add support for Oracle JDK 1.8.0
  • #150 - Make use of Chef's cache directory instead of /tmp
  • #151 - Update Test Kitchen suites
  • #154 - Add safety check for JDK 8 on non-Oracle

v1.21.2

Bug

  • #146 - Update Oracle accept-license-terms cookie format

v1.21.0

Improvement

v1.20.0

Improvement

  • #137 - Create /usr/lib/jvm/default-java on Debian
  • #138 - allow wrapping cookbook without providing templates
  • #140 - Adds set_default attribute to toggle setting JDK as default

Bug

  • #141 - set java_home correctly for oracle_rpm

v1.19.2

Improvement

  • #129 - Upgrade to ChefSpec 3
  • Rewrite unit tests for better coverage and to work with ChefSpec 3 (various commits)
  • List Socrata as the maintainer (Socrata took over from Opscode in December 2013)

Bug

v1.19.0

Refactor the cookbook to better support wrapper cookbooks and other cookbook authoring patterns.

Improvement

Bug

v1.18.0

Improvement

  • #118 - Upgrade to 7u51
  • #117 - Suggest windows and aws

v1.17.6

Bug

  • Revert COOK-4165 - The headers option was only added to remote_file in Chef 11.6.0, meaning this change breaks older clients.

v1.17.4

Bug

  • #111 - Fix alternatives for centos

Improvement

  • COOK-4165 - Replace curl with remote_file with cookie header
  • #110 - Update openjdk to use the alternatives resource

v1.17.2

Bug

  • COOK-4136 - Add md5 parameter to java_ark resource

v1.17.0

v1.16.4

Bug

  • #103 - set alternatives when using ibm_tar recipe
  • #104 - Specify windows attributes in attribute files

v1.16.2

Improvement

  • COOK-3488 - set alternatives for ibm jdk
  • COOK-3764 - IBM Java installer needs 'rpm' package on Ubuntu

Bug

  • COOK-3857 - do not unescape the java windows url before parsing it
  • #95 - fixes update-alternatives for openjdk installs
  • #100 - Use escaped quotes for Windows INSTALLDIR

v1.16.0

Improvement

v1.15.4

[COOK-4210] - remove unneeded run_command to prevent zombie processes

v1.15.2

[CHEF-4210] remove unneeded run_command to prevent zombie processes

v1.15.0

Bug

  • Fixing version number. Accidently released at 0.15.x instead of 1.15.x

v0.15.2

FIX

  • [COOK-3908] - Fixing JAVA_HOME on Ubuntu 10.04

v1.14.0

Bug

  • COOK-3704 - Fix alternatives when the package is already installed
  • COOK-3668 - Fix a condition that would result in an error executing action run on resource 'bash[update-java-alternatives]'
  • COOK-3569 - Fix bad checksum length
  • COOK-3541 - Fix an issue where Java cookbook installs both JDK 6 and JDK 7 when JDK 7 is specified
  • COOK-3518 - Allow Windoes recipe to download from signed S3 url
  • COOK-2996 - Fix a failure on Centos 6.4 and Oracle JDK 7

Improvement

v1.13.0

Bug

  • COOK-3295 - Add default platform_family option in Java helper
  • COOK-3277 - Fix support for Fedora

Improvement

v1.12.0

Improvement

  • [COOK-2154]: Add SmartOS support to java::openjdk recipe
  • [COOK-3278]: upgrade to Oracle Java 7u25

Bug

  • [COOK-2931]: Adding support for the platform 'xenserver' (for installations of java in DOM0)
  • [COOK-3277]: java cookbook fails on Fedora

v1.11.6

Bug

  • [COOK-2847]: Java cookbook does not have opensuse support
  • [COOK-3142]: Syntax Errors spec/default_spec.rb:4-8

v1.11.4

Bug

  • [COOK-2989]: bash[update-java-alternatives] resource uses wrong attribute

v1.11.2

Bug

  • Use SHA256 checksums for Oracle downloads, not SHA1.

v1.11.0

This version brings a wealth of tests and (backwards-compatible) refactoring, plus some new features (updated Java, IBM recipe).

Sub-task

  • [COOK-2897]: Add ibm recipe to java cookbook
  • [COOK-2903]: move java_home resources to their own recipe
  • [COOK-2904]: refactor ruby_block "update-java-alternatives"
  • [COOK-2905]: use platform_family in java cookbook
  • [COOK-2920]: add chefspec to java cookbook

Task

  • [COOK-2902]: Refactor java cookbook

Improvement

  • [COOK-2900]: update JDK to JDK 7u21, 6u45

v1.10.2

  • [COOK-2415] - Fixed deprecation warnings in ark provider and openjdk recipe by using Chef::Mixin::ShellOut instead of Chef::ShellOut

v1.10.0

  • [COOK-2400] - Allow java ark :url to be https
  • [COOK-2436] - Upgrade needed for oracle jdk in java cookbook

v1.9.6

  • [COOK-2412] - add support for Oracle Linux

v1.9.4

  • [COOK-2083] - Run set-env-java-home in Java cookbook only if necessary
  • [COOK-2332] - ark provider does not allow for *.tgz tarballs to be used
  • [COOK-2345] - Java cookbook fails on CentOS6 (update-java-alternatives)

v1.9.2

  • [COOK-2306] - FoodCritic fixes for java cookbook

v1.9.0

  • [COOK-2236] - Update the Oracle Java version in the Java cookbook to release 1.7u11

v1.8.2

  • [COOK-2205] - Fix for missing /usr/lib/jvm/default-java on Debian

v1.8.0

  • [COOK-2095] - Add windows support

v1.7.0

  • [COOK-2001] - improvements for Oracle update-alternatives
    • When installing an Oracle JDK it is now registered with a higher priority than OpenJDK. (Related to COOK-1131.)
    • When running both the oracle and oracle_i386 recipes, alternatives are now created for both JDKs.
    • Alternatives are now created for all binaries listed in version specific attributes. (Related to COOK-1563 and COOK-1635.)
    • When installing Oracke JDKs on Ubuntu, create .jinfo files for use with update-java-alternatives. Commands to set/install alternatives now only run if needed.

v1.6.4

  • [COOK-1930] - fixed typo in attribute for java 5 on i586

v1.6.2

  • whyrun support in java_ark LWRP
  • CHEF-1804 compatibility
  • [COOK-1786]- install Java 6u37 and Java 7u9
  • [COOK-1819] -incorrect warning text about node['java']['oracle']['accept_oracle_download_terms']

v1.6.0

  • [COOK-1218] - Install Oracle JDK from Oracle download directly
  • [COOK-1631] - set JAVA_HOME in openjdk recipe
  • [COOK-1655] - Install correct architecture on Amazon Linux

v1.5.4

  • [COOK-885] - update alternatives called on wrong file
  • [COOK-1607] - use shellout instead of execute resource to update alternatives

v1.5.2

  • [COOK-1200] - remove sun-java6-jre on Ubuntu before installing Oracle's Java
  • [COOK-1260] - fails on Ubuntu 12.04 64bit with openjdk7
  • [COOK-1265] - Oracle Java should symlink the jar command

v1.5.0

  • [COOK-1146] - Oracle now prevents download of JDK via non-browser
  • [COOK-1114] - fix File.exists?

v1.4.2

  • [COOK-1051] - fix attributes typo and platform case switch consistency

v1.4.0

  • [COOK-858] - numerous updates: handle jdk6 and 7, switch from sun to oracle, make openjdk default, add java_ark LWRP.
  • [COOK-942] - FreeBSD support
  • [COOK-520] - ArchLinux support

Foodcritic Metric
            

1.40.0 failed this metric

FC007: Ensure recipe dependencies are reflected in cookbook metadata: /tmp/4f7b20ccd50a62f9256abaf8/java/recipes/homebrew.rb:1
FC007: Ensure recipe dependencies are reflected in cookbook metadata: /tmp/4f7b20ccd50a62f9256abaf8/java/recipes/homebrew.rb:2
FC007: Ensure recipe dependencies are reflected in cookbook metadata: /tmp/4f7b20ccd50a62f9256abaf8/java/recipes/windows.rb:33
FC052: Metadata uses the unimplemented "suggests" keyword: /tmp/4f7b20ccd50a62f9256abaf8/java/metadata.rb:50
FC052: Metadata uses the unimplemented "suggests" keyword: /tmp/4f7b20ccd50a62f9256abaf8/java/metadata.rb:51
FC059: LWRP provider does not declare use_inline_resources: /tmp/4f7b20ccd50a62f9256abaf8/java/providers/alternatives.rb:1
FC059: LWRP provider does not declare use_inline_resources: /tmp/4f7b20ccd50a62f9256abaf8/java/providers/ark.rb:1