cookbook 'java', '= 1.46.0'
java
(142) Versions
1.46.0
-
-
12.0.6
-
12.0.5
-
12.0.4
-
12.0.3
-
12.0.2
-
11.2.2
-
11.2.1
-
11.2.0
-
11.1.14
-
11.1.13
-
11.1.12
-
11.1.11
-
11.1.10
-
11.1.9
-
11.1.8
-
11.1.7
-
11.1.6
-
11.1.5
-
11.1.4
-
11.1.3
-
11.1.2
-
11.1.1
-
11.1.0
-
11.0.2
-
11.0.1
-
11.0.0
-
10.2.2
-
10.2.1
-
10.2.0
-
10.1.2
-
10.1.1
-
10.1.0
-
10.0.1
-
10.0.0
-
9.0.1
-
9.0.0
-
8.6.1
-
8.6.0
-
8.5.0
-
8.4.0
-
8.3.2
-
8.3.1
-
8.3.0
-
8.2.1
-
8.2.0
-
8.1.2
-
8.1.1
-
8.1.0
-
8.0.1
-
8.0.0
-
7.0.0
-
6.0.0
-
5.0.0
-
4.3.0
-
4.2.0
-
4.1.0
-
4.0.0
-
3.2.1
-
3.2.0
-
3.1.2
-
3.1.1
-
3.1.0
-
3.0.0
-
2.2.1
-
2.2.0
-
2.1.0
-
2.0.1
-
2.0.0
-
1.50.0
-
1.49.0
-
1.48.0
-
1.47.0
-
1.46.0
-
1.45.0
-
1.43.0
-
1.42.0
-
1.41.0
-
1.40.4
-
1.40.3
-
1.40.1
-
1.40.0
-
1.39.0
-
1.38.0
-
1.37.0
-
1.36.0
-
1.35.0
-
1.31.0
-
1.29.0
-
1.28.0
-
1.27.0
-
1.26.0
-
1.25.0
-
1.24.0
-
1.23.0
-
1.22.0
-
1.21.2
-
1.21.0
-
1.20.0
-
1.19.2
-
1.19.0
-
1.18.0
-
1.17.6
-
1.17.4
-
1.17.2
-
1.17.0
-
1.16.4
-
1.16.2
-
1.16.0
-
1.15.4
-
1.15.2
-
1.15.0
-
1.14.0
-
1.13.0
-
1.12.0
-
1.11.6
-
1.11.4
-
1.11.2
-
1.11.0
-
1.10.2
-
1.10.0
-
1.9.6
-
1.9.4
-
1.9.2
-
1.9.0
-
1.8.2
-
1.8.0
-
1.7.0
-
1.6.4
-
1.6.2
-
1.6.0
-
1.5.4
-
1.5.2
-
1.5.0
-
1.4.2
-
1.4.0
-
1.1.0
-
1.0.0
-
0.15.2
-
0.10.3
-
0.10.2
-
0.10.0
-
0.7.0
Follow526
- 12.0.6
- 12.0.5
- 12.0.4
- 12.0.3
- 12.0.2
- 11.2.2
- 11.2.1
- 11.2.0
- 11.1.14
- 11.1.13
- 11.1.12
- 11.1.11
- 11.1.10
- 11.1.9
- 11.1.8
- 11.1.7
- 11.1.6
- 11.1.5
- 11.1.4
- 11.1.3
- 11.1.2
- 11.1.1
- 11.1.0
- 11.0.2
- 11.0.1
- 11.0.0
- 10.2.2
- 10.2.1
- 10.2.0
- 10.1.2
- 10.1.1
- 10.1.0
- 10.0.1
- 10.0.0
- 9.0.1
- 9.0.0
- 8.6.1
- 8.6.0
- 8.5.0
- 8.4.0
- 8.3.2
- 8.3.1
- 8.3.0
- 8.2.1
- 8.2.0
- 8.1.2
- 8.1.1
- 8.1.0
- 8.0.1
- 8.0.0
- 7.0.0
- 6.0.0
- 5.0.0
- 4.3.0
- 4.2.0
- 4.1.0
- 4.0.0
- 3.2.1
- 3.2.0
- 3.1.2
- 3.1.1
- 3.1.0
- 3.0.0
- 2.2.1
- 2.2.0
- 2.1.0
- 2.0.1
- 2.0.0
- 1.50.0
- 1.49.0
- 1.48.0
- 1.47.0
- 1.46.0
- 1.45.0
- 1.43.0
- 1.42.0
- 1.41.0
- 1.40.4
- 1.40.3
- 1.40.1
- 1.40.0
- 1.39.0
- 1.38.0
- 1.37.0
- 1.36.0
- 1.35.0
- 1.31.0
- 1.29.0
- 1.28.0
- 1.27.0
- 1.26.0
- 1.25.0
- 1.24.0
- 1.23.0
- 1.22.0
- 1.21.2
- 1.21.0
- 1.20.0
- 1.19.2
- 1.19.0
- 1.18.0
- 1.17.6
- 1.17.4
- 1.17.2
- 1.17.0
- 1.16.4
- 1.16.2
- 1.16.0
- 1.15.4
- 1.15.2
- 1.15.0
- 1.14.0
- 1.13.0
- 1.12.0
- 1.11.6
- 1.11.4
- 1.11.2
- 1.11.0
- 1.10.2
- 1.10.0
- 1.9.6
- 1.9.4
- 1.9.2
- 1.9.0
- 1.8.2
- 1.8.0
- 1.7.0
- 1.6.4
- 1.6.2
- 1.6.0
- 1.5.4
- 1.5.2
- 1.5.0
- 1.4.2
- 1.4.0
- 1.1.0
- 1.0.0
- 0.15.2
- 0.10.3
- 0.10.2
- 0.10.0
- 0.7.0
Recipes and resources for installing Java and managing certificates
cookbook 'java', '= 1.46.0', :supermarket
knife supermarket install java
knife supermarket download java
java cookbook
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
), defaultopenjdk
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 Defaultfalse
. -
node['java']['openjdk_packages']
- Array of OpenJDK package names to install in thejava::openjdk
recipe. This is set based on the platform. -
node['java']['tarball']
- Name of the tarball to retrieve from your internal repository, defaultjdk1.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']['windows']['remove_obsolete']
- Indicates whether to remove previous versions of the JRE (default isfalse
) -
node['java']['windows']['aws_access_key_id']
- AWS Acess Key ID to use with AWS API calls -
node['java']['windows']['aws_secret_access_key']
- AWS Secret Access Key to use with AWS API calls -
node['java']['windows']['aws_session_token']
- AWS Session Token to use with AWS API calls -
node['java']['ibm']['url']
- The URL which to download the IBM JDK/SDK. See theibm
recipe section below. -
node['java']['ibm']['accept_ibm_download_terms']
- Indicates that you accept IBM's EULA (forjava::ibm
) -
node['java']['oracle_rpm']['type']
- Type of java RPM (jre
orjdk
), defaultjdk
-
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.
default_java_symlink
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.
notify
The java::notify
recipe contains a log resource that's :write
action
is called when a JDK version changes. This gives cookbook authors a way
to subscribe to JDK changes and take actions (say restart a java service):
service 'somejavaservice' action :restart subscribes :write, 'log[jdk-version-changed]', :delayed end
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 symlinkedbin_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 beapp_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 thebin
subdirectory of the extracted folder. Will be ignored if thisjava_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 -
proxy
: optional address and port of proxy server, for example,proxy.example.com:1234
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 totrue
. -
priority
: priority of the alternatives. Integer, defaults to1061
.
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
java_certificate
This cookbook contains the java_certificate
LWRP which simplifies
adding certificates to a java keystore. It can also populate the keystore
with a certificate retrieved from a given SSL end-point. It defaults
to the default keystore <java_home>/jre/lib/security/cacerts
with the
default password if a specific keystore is not provided.
Actions
-
:install
: installs a certificate. -
:remove
: removes a certificate.
Attribute Parameters
-
cert_alias
: The alias of the certificate in the keystore. This defaults to the name of the resource.
Optional parameters:
java_home
: the java home directory. Defaults tonode['java']['java_home']
.keystore_path
: the keystore path. Defaults tonode['java']['java_home']/jre/lib/security/cacerts
.keystore_passwd
: the keystore password. Defaults to 'changeit' as specified by the Java Documentation.
Only one of the following
- cert_data
: the certificate data to install
- cert_file
: path to a certificate file to install
- ssl_endpoint
: an SSL end-point from which to download the certificate
Examples
java_certificate "Install LDAP server certificate to Java CA keystore for Jenkins" do
cert_alias node['jenkins']['ldap']['url'][/\/\/(.*)/, 1]
ssl_endpoint node['jenkins']['ldap']['url']
action :install
notifies :restart, "runit_service[jenkins]", :delayed
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
- Author: Eric Helgeson (erichelgeson@gmail.com)
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.
Java Cookbook CHANGELOG
This file is used to list changes made in each version of the Java cookbook.
v1.45.0 - 12/27/2016
- fix jce installation on windows #386
v1.45.0 - 12/27/2016
- Update to resolve latest rubocop rules
v1.44.0 - 12/27/2016
- Unpublished due to newer rubocop rules in travis
- Added zlinux defaults
v1.43.0 - 12/6/2016
- Switch recursive chown from executing on the jdk parent directory to executing on the jdk directory itself.
- Added proxy support to curl
- add java_certificate LWRP from java-libraries cookbook - java-libraries now depricated.
- (Windows) support removal of obsolete JREs via optional attribute
- (Windows) Can download from s3 only using an IAM profile
- (Windows) aws session token for windows java download
v1.42.0 - 8/8/2016
- Use openjdk ppa for all ubuntu versions to allow for older/newer jdks to be installed. Fixes #368
- update oracle java 8u101 - Use sha256 hash (seems to help with downloading each converge)
- Mac default converge fails since notify is not included by homebrew
- Remove chef 14(!) depreciation warning in tests
- Resolve chef-12 related warning
v1.41.0 - 7/15/2016
- Feature: Add new resource for cookbooks to subscribe to, see README
- Use a remote_file resource for JCE download instead of curl in an execute block.
- Since v1.40.4 Travis deploys cookbook to supermarket - expect more frequent, smaller releases.
v1.40.4 - 7/12/2016
- Automated deploy, no cookbook changes.
v1.40.3 - 7/12/2016
- Attempt to have travis publish this.
- Mac depends on homebrew.
- Fixed typo in platform family spelling for OS X
- fix openjdk version logic for freebsd
- Enable Ark provider to handle URI with get parameters
v1.40.1 - 7/8/2016
- Fixed: JAVA_HOME not set on systems with restrictive umask #359
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
- #143 - Symlink /usr/lib/jvm/default-java for both OpenJDK and Oracle
- #144 - Remove /var/lib/alternatives/#{cmd} before calling alternatives (Hopefully fixes sporadic issues when setting alternatives)
- Make default_java_symlink conditional on set_default attribute
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
- #133 - Allow jdk_version to be a string or number
- #131 - Fix JDK install on Windows
- Fix openjdk_packages on Arch Linux
v1.19.0
Refactor the cookbook to better support wrapper cookbooks and other cookbook authoring patterns.
Improvement
- #123 - Update documentation & add warning for issue 122
- #124 - Refactor default recipe to better enable wrapper cookbooks
- #125 - Removes the attribute to purge deprecated packages
- #127 - Add safety check if attributes are unset
- Adds tests for directly using openjdk and oracle recipes
- Adds recipes to README
- The Opscode CCLA is no longer required
- Adds tests for openjdk-7 and oracle-7
Bug
- #119 - Use java_home instead of java_location for update-alternatives
- Fix java_home for rhel and fedora
v1.18.0
Improvement
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
- COOK-4114 - Test Kitchen no longer works after merging Pull Request #95 for openjdk tests on Debian/Ubuntu
- COOK-4124 - update-alternatives fails to run
- #81 - Ensure local directory hierarchy
- #97 - Expose LWRP state attributes
- #99 - support for MD5 checksum
- #106 - Fixed windows case to prevent bad java_home variable setting
- Update checksums to the officially-published ones from Oracle
- Further test kitchen fixes to use the default recipe
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
- COOK-3823 - Upgrade to JDK 7u45-b18
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
- COOK-2793 - Improve Windows support
v1.13.0
Bug
Improvement
- COOK-3278 - Upgrade to Oracle Java 7u25
- COOK-3029 - Add Oracle RPM support
-
COOK-2931 - Add support for the platform
xenserver
- COOK-2154 - Add SmartOS support
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
Collaborator Number Metric
1.46.0 passed this metric
Foodcritic Metric
1.46.0 failed this metric
FC007: Ensure recipe dependencies are reflected in cookbook metadata: /tmp/4eda64bb6f970d526be60d29/java/recipes/windows.rb:39
FC052: Metadata uses the unimplemented "suggests" keyword: /tmp/4eda64bb6f970d526be60d29/java/metadata.rb:52
FC059: LWRP provider does not declare use_inline_resources: /tmp/4eda64bb6f970d526be60d29/java/providers/alternatives.rb:1
FC059: LWRP provider does not declare use_inline_resources: /tmp/4eda64bb6f970d526be60d29/java/providers/ark.rb:1
Run with Foodcritic Version 8.1.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
License Metric
1.46.0 passed this metric
1.46.0 passed this metric
1.46.0 failed this metric
FC007: Ensure recipe dependencies are reflected in cookbook metadata: /tmp/4eda64bb6f970d526be60d29/java/recipes/windows.rb:39
FC052: Metadata uses the unimplemented "suggests" keyword: /tmp/4eda64bb6f970d526be60d29/java/metadata.rb:52
FC059: LWRP provider does not declare use_inline_resources: /tmp/4eda64bb6f970d526be60d29/java/providers/alternatives.rb:1
FC059: LWRP provider does not declare use_inline_resources: /tmp/4eda64bb6f970d526be60d29/java/providers/ark.rb:1
Run with Foodcritic Version 8.1.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
License Metric
1.46.0 passed this metric
1.46.0 passed this metric