Skip to content
This repository has been archived by the owner on Sep 2, 2020. It is now read-only.

Commit

Permalink
Refactored and simplified.
Browse files Browse the repository at this point in the history
  • Loading branch information
Etienne Pelletier committed Nov 5, 2012
1 parent b029376 commit e07ff12
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 33 deletions.
15 changes: 0 additions & 15 deletions manifests/ant.pp

This file was deleted.

14 changes: 13 additions & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
class ant {
class ant($version = $ant::params::version) inherits ant::params {
wget::fetch { "ant":
source => "http://archive.apache.org/dist/ant/binaries/apache-ant-${version}-bin.tar.gz",
destination => "${ant::params::srcdir}/apache-ant-${version}-bin.tar.gz"
} ->
exec { "tar zxvf ${ant::params::srcdir}/apache-ant-${version}-bin.tar.gz":
cwd => "/usr/share/",
creates => "/usr/share/apache-ant-${version}",
path => "/bin/:/usr/bin"
} ->
file { "/usr/bin/ant":
ensure => "/usr/share/apache-ant-${version}/bin/ant",
}

}
2 changes: 1 addition & 1 deletion manifests/ivy.pp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
class ant::ivy($version="2.2.0") {
include ant::params
require ant

wget::fetch { "ivy":
source => "http://mirrors.gigenet.com/apache//ant/ivy/${version}/apache-ivy-${version}-bin.tar.gz",
Expand Down
3 changes: 2 additions & 1 deletion manifests/tasks/maven.pp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
class ant::tasks::maven($version = "2.1.3") {
include ant::params
require ant

wget::fetch { "maven-ant-task":
source => "http://archive.apache.org/dist/maven/binaries/maven-ant-tasks-$version.jar",
destination => "/usr/share/apache-ant-${ant::params::version}/lib/maven-ant-tasks-$version.jar"
Expand Down
2 changes: 1 addition & 1 deletion manifests/tasks/sonar.pp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
class ant::tasks::sonar($version="1.2") {
include ant::params
require ant
wget::fetch { "sonar-ant-task":
source => "http://repository.codehaus.org/org/codehaus/sonar-plugins/sonar-ant-task/$version/sonar-ant-task-$version.jar",
destination => "/usr/share/apache-ant-${ant::params::version}/lib/sonar-ant-task-$version.jar"
Expand Down
14 changes: 0 additions & 14 deletions spec/classes/ant_spec.rb

This file was deleted.

0 comments on commit e07ff12

Please sign in to comment.