diff options
author | Olaf Flebbe <of@fleb.be> | 2016-04-10 19:58:11 +0200 |
---|---|---|
committer | Olaf Flebbe <of@fleb.be> | 2016-04-11 19:12:27 +0200 |
commit | d401eda870a2abfed2b897ed488ee2a571678e68 (patch) | |
tree | af4b57c519142d67110153f77c34bcb9a5b5314e | |
parent | d9ff01c644e537767a7f1a72d3cff5741ee819b1 (diff) |
BIGTOP-2379: update maven to 3.3.9 and refactor toolchain
-rw-r--r-- | bigtop_toolchain/manifests/deps.pp | 27 | ||||
-rw-r--r-- | bigtop_toolchain/manifests/gradle.pp | 3 | ||||
-rw-r--r-- | bigtop_toolchain/manifests/maven.pp | 19 | ||||
-rw-r--r-- | bigtop_toolchain/manifests/protobuf.pp | 2 |
4 files changed, 13 insertions, 38 deletions
diff --git a/bigtop_toolchain/manifests/deps.pp b/bigtop_toolchain/manifests/deps.pp deleted file mode 100644 index d265708f..00000000 --- a/bigtop_toolchain/manifests/deps.pp +++ /dev/null @@ -1,27 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You 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. - - -class bigtop_toolchain::deps { - - $apache_prefix = nearest_apache_mirror() - include bigtop_toolchain::packages - - exec {"/usr/bin/wget $apache_prefix/maven/maven-3/3.3.3/binaries/apache-maven-3.3.3-bin.tar.gz": - cwd => "/usr/src", - require => Package[$packages::pkgs], - unless => "/usr/bin/test -f /usr/src/apache-maven-3.3.3-bin.tar.gz", - } -} diff --git a/bigtop_toolchain/manifests/gradle.pp b/bigtop_toolchain/manifests/gradle.pp index 70be36e7..aa4247a2 100644 --- a/bigtop_toolchain/manifests/gradle.pp +++ b/bigtop_toolchain/manifests/gradle.pp @@ -15,11 +15,8 @@ class bigtop_toolchain::gradle { - include bigtop_toolchain::deps - exec {"/usr/bin/wget http://services.gradle.org/distributions/gradle-2.7-bin.zip": cwd => "/usr/src", - require => Package[$packages::pkgs], unless => "/usr/bin/test -f /usr/src/gradle-2.7-bin.zip", } diff --git a/bigtop_toolchain/manifests/maven.pp b/bigtop_toolchain/manifests/maven.pp index 352c1bef..dbdcbd0c 100644 --- a/bigtop_toolchain/manifests/maven.pp +++ b/bigtop_toolchain/manifests/maven.pp @@ -14,18 +14,25 @@ # limitations under the License. class bigtop_toolchain::maven { + $mvnversion = '3.3.9' + $mvn = "apache-maven-$mvnversion" - include bigtop_toolchain::deps - exec {'/bin/tar xvzf /usr/src/apache-maven-3.3.3-bin.tar.gz': + $apache_prefix = nearest_apache_mirror() + + exec {"/usr/bin/wget $apache_prefix/maven/maven-3/$mvnversion/binaries/$mvn-bin.tar.gz": + cwd => "/usr/src", + unless => "/usr/bin/test -f /usr/src/$mvn-bin.tar.gz", + } + + exec {"/bin/tar xvzf /usr/src/$mvn-bin.tar.gz": cwd => '/usr/local', refreshonly => true, - subscribe => Exec["/usr/bin/wget $bigtop_toolchain::deps::apache_prefix/maven/maven-3/3.3.3/binaries/apache-maven-3.3.3-bin.tar.gz"], - require => Exec["/usr/bin/wget $bigtop_toolchain::deps::apache_prefix/maven/maven-3/3.3.3/binaries/apache-maven-3.3.3-bin.tar.gz"], + require => Exec["/usr/bin/wget $apache_prefix/maven/maven-3/$mvnversion/binaries/$mvn-bin.tar.gz"], } file {'/usr/local/maven': ensure => link, - target => '/usr/local/apache-maven-3.3.3', - require => Exec['/bin/tar xvzf /usr/src/apache-maven-3.3.3-bin.tar.gz'], + target => "/usr/local/apache-maven-$mvnversion", + require => Exec["/bin/tar xvzf /usr/src/$mvn-bin.tar.gz"], } } diff --git a/bigtop_toolchain/manifests/protobuf.pp b/bigtop_toolchain/manifests/protobuf.pp index c71dec29..06c575a9 100644 --- a/bigtop_toolchain/manifests/protobuf.pp +++ b/bigtop_toolchain/manifests/protobuf.pp @@ -15,8 +15,6 @@ class bigtop_toolchain::protobuf { - include bigtop_toolchain::deps - case $operatingsystem{ /Ubuntu|Debian/: { case $architecture { |