Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
a capistrano recipe to download and install JDK for your projects.
Ruby AGS Script Shell

Merge branch 'master' into develop (fixes #1)

Conflicts:
	.rultor.yml
	rultor/Makefile
	rultor/rubygems.yml.asc
latest commit 1cb6b27348
@yyuu authored
Failed to load latest commit information.
lib
rultor Update rultor/Makefile
test version up vagrant; 1.0.6 -> 1.1.x
.gitignore
.rultor.yml
CHANGES.md
Gemfile
LICENSE.txt
README.md
Rakefile
capistrano-jdk-installer.gemspec

README.md

capistrano-jdk-installer

a capistrano recipe to download and install JDK for your projects.

Installation

Add this line to your application's Gemfile:

gem 'capistrano-jdk-installer'

And then execute:

$ bundle

Or install it yourself as:

$ gem install capistrano-jdk-installer

Usage

This recipes will try to do following things during Capistrano deploy:setup.

  1. Download JDK information from updates.jenkins-ci.org
  2. Download JDK archive
  3. Install JDK for your project remotely (default) and/or locally

To enable this recipe, add following in your config/deploy.rb.

# in "config/deploy.rb"
require 'capistrano-jdk-installer'
set(:java_version_name, "7u6")
set(:java_oracle_username, "foo@example.com") # your ID on oracle.com
set(:java_oracle_password, "secret") # your password on oracle.com
set(:java_license_title, "Oracle Binary Code License Agreement for Java SE")
set(:java_accept_license, true)

Following options are available to manage your JDK installation.

  • :java_version_name - preferred JDK version. this value must be defined in JSON response from :java_installer_json_uri.
  • :java_oracle_username - your credential to be used to download JDK archive from oracle.com.
  • :java_oracle_password - your credential to be used to download JDK archive from oracle.com.
  • :java_license_title - the license title of JDK which you will accept.
  • :java_accept_license - specify whether you accept the JDK license. false by default.
  • :java_setup_locally - specify whether you want to setup JDK on local machine. false by default.
  • :java_setup_remotely - specify whether you want to setup JDK on remote machines. true by default.
  • :java_installer_json_uri - http://updates.jenkins-ci.org/updates/hudson.tools.JDKInstaller.json by default.
  • :java_installer_json_cache - the cache file path of "hudson.tools.JDKINstaller.json".
  • :java_installer_json_expires - the cache TTL. cache 259200 seconds by default.
  • :java_installer_json_keep_stale - use stale cache when :java_installer_json_uri is down. true by default.
  • :java_home - the path to the JAVA_HOME on remote machines.
  • :java_home_local - the path to the JAVA_HOME on local machine.
  • :java_cmd - the java command on remote machines.
  • :java_cmd_local - the java command on local machine.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Author

License

MIT

Something went wrong with that request. Please try again.