Skip to content

Commit

Permalink
Merge pull request #37 from cevou/cook3641
Browse files Browse the repository at this point in the history
[COOK-3641] Add Windows support
  • Loading branch information
Sean OMeara committed Feb 23, 2015
2 parents 4139236 + 0dd183d commit 97a8b26
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 8 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Requirements
- CentOS
- Red Hat
- Fedora
- Windows

The following Chef Software cookbooks are dependencies:
- java - this cookbook not only depends on the java virtual machine but it also depends on the java_ark LWRP present in the java cookbooks
Expand Down
2 changes: 2 additions & 0 deletions metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@

depends 'ark', '~> 0.4'
depends 'java', '~> 1.13'
depends 'windows'

supports 'centos'
supports 'debian'
supports 'fedora'
supports 'redhat'
supports 'ubuntu'
supports 'windows'
28 changes: 20 additions & 8 deletions recipes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,26 @@
mvn_version = node['maven']['version'].to_s

ark 'maven' do
url node['maven'][mvn_version]['url']
checksum node['maven'][mvn_version]['checksum']
home_dir node['maven']['m2_home']
version node['maven'][mvn_version]['version']
url node['maven'][mvn_version]['url']
checksum node['maven'][mvn_version]['checksum']
home_dir node['maven']['m2_home']
win_install_dir node['maven']['m2_home']
version node['maven'][mvn_version]['version']
append_env_path true
end

template '/etc/mavenrc' do
source 'mavenrc.erb'
mode '0755'
end
if node['platform_family'] === 'windows'
env 'M2_HOME' do
value node['maven']['m2_home']
action :create
end
env 'MAVEN_OPTS' do
value node['maven']['mavenrc']['opts']
action :create
end
else
template '/etc/mavenrc' do
source 'mavenrc.erb'
mode '0755'
end
end

0 comments on commit 97a8b26

Please sign in to comment.