Compare commits

..

6 Commits
0.1.1 ... 0.1.3

Author SHA1 Message Date
Jeff McCune
cc1dd231e3 Update CHANGELOG for version 0.1.3 2011-05-28 14:14:02 -07:00
Jeff McCune
221a6d3dab Merge branch 'bug/master/get_rid_of_stages'
* bug/master/get_rid_of_stages:
  Remove stages from java module
2011-05-28 14:13:15 -07:00
Jeff McCune
7efde2db1e Remove stages from java module
The stages feature of stdlib is turning out to be more trouble than it's
worth.  Integrating the changes from Cody and Gary results in the entire
mcollective class being in the main stage.  We've already found is
preferable to have stages after main rather than before to avoid
dependency cycles.  This only works if all modules use stages.  The
first module to not use stages will create a cycle if it requires and
modules who do use stages and the stages come after main.
2011-05-28 14:00:39 -07:00
Jeff McCune
d93930d6e3 Update CHANGELOG to 0.1.2 2011-05-26 11:31:33 -07:00
Jeff McCune
b3eb1642ae Merge branch 'comment/master/jre_vs_jdk'
* comment/master/jre_vs_jdk:
  Change jre and jdk booleans to a single string
2011-05-26 11:31:23 -07:00
Jeff McCune
867f8c524a Change jre and jdk booleans to a single string
Dan raised the comment in the previous patch set that it doesn't make
sense to provide two options and four states when there are really only
two possibilities; install the jre or the jdk.

This change removes the jdk and jre class parameters and replaces them
with a single distribution parameters.
2011-05-26 11:29:17 -07:00
3 changed files with 22 additions and 20 deletions

View File

@@ -1,3 +1,9 @@
2011-05-28 Jeff McCune <jeff@puppetlabs.com> - 0.1.3
* Remove stages
2011-05-26 Jeff McCune <jeff@puppetlabs.com> - 0.1.2
* Changes JRE/JDK selection class parameter to $distribution
2011-05-25 Jeff McCune <jeff@puppetlabs.com> - 0.1.1 2011-05-25 Jeff McCune <jeff@puppetlabs.com> - 0.1.1
* Re-did versioning to follow semantic versioning * Re-did versioning to follow semantic versioning

View File

@@ -1,5 +1,5 @@
name 'puppetlabs-java' name 'puppetlabs-java'
version '0.1.1' version '0.1.3'
source 'git://github.com/puppetlabs/puppetlabs-java' source 'git://github.com/puppetlabs/puppetlabs-java'
author 'puppetlabs' author 'puppetlabs'
license 'Apache' license 'Apache'

View File

@@ -12,33 +12,29 @@
# #
# [Remember: No empty lines between comments and class definition] # [Remember: No empty lines between comments and class definition]
class java( class java(
$jre = false, $distribution = 'jdk',
$jdk = true, $version = 'installed'
$version='1.6.0_25-fcs'
) { ) {
# Cannot pass anonymous arrays to functions in 2.6.8 # Cannot pass anonymous arrays to functions in 2.6.8
$v_true_false = [ '^true$', '^false$' ] $v_distribution = [ '^jre$', '^jdk$' ]
# Must compare string values, not booleans. # Must compare string values, not booleans.
validate_re("$jre", $v_true_false)
validate_re("$jdk", $v_true_false)
validate_re($version, '^[._0-9a-zA-Z:-]+$') validate_re($version, '^[._0-9a-zA-Z:-]+$')
validate_re($distribution, $v_distribution)
$jre_real = $jre $version_real = $version
$jdk_real = $jdk $distribution_real = $distribution
$version_real = $version
if $jre_real { case $distribution_real {
class { 'java::jre_package': jre: {
version => $version_real, class { 'java::jre_package':
stage => 'runtime', version => $version_real,
}
} }
} jdk: {
class { 'java::jdk_package':
if $jdk_real { version => $version_real,
class { 'java::jdk_package': }
version => $version_real,
stage => 'runtime',
} }
} }