You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bigtop.apache.org by ju...@apache.org on 2020/02/27 03:44:33 UTC
[bigtop] branch master updated: BIGTOP-3310: URL of maven and ant
package list page is changed
This is an automated email from the ASF dual-hosted git repository.
junhe pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/bigtop.git
The following commit(s) were added to refs/heads/master by this push:
new 99423aa BIGTOP-3310: URL of maven and ant package list page is changed
99423aa is described below
commit 99423aa68b90030e6972e0607111778ca248f397
Author: Jun He <ju...@arm.com>
AuthorDate: Wed Feb 19 10:13:00 2020 +0800
BIGTOP-3310: URL of maven and ant package list page is changed
bigtop_toolchain uses packages list page hosted on
https://www.apache.org/dist/ to detect latest version of maven and ant.
This url has been moved to https://downloads.apache.org/ and latest_*_binary
functions need to be updated to reflect this.
To adapt to future URL change,'-L' option is added too.
Change-Id: Ia732be3c79f5d54b3db0eaa010adbfc8ff0d7395
Signed-off-by: Jun He <ju...@arm.com>
---
bigtop_toolchain/lib/puppet/parser/functions/latest_ant_binary.rb | 2 +-
bigtop_toolchain/lib/puppet/parser/functions/latest_maven_binary.rb | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/bigtop_toolchain/lib/puppet/parser/functions/latest_ant_binary.rb b/bigtop_toolchain/lib/puppet/parser/functions/latest_ant_binary.rb
index 94d0c6c..78b9b6c 100644
--- a/bigtop_toolchain/lib/puppet/parser/functions/latest_ant_binary.rb
+++ b/bigtop_toolchain/lib/puppet/parser/functions/latest_ant_binary.rb
@@ -17,6 +17,6 @@ module Puppet::Parser::Functions
newfunction(:latest_ant_binary, :type => :rvalue) do |args|
versionmask=args[0]
# We are using main mirror here because can't be sure about Apache Server config on every mirror. It could be Nginx, btw.
- %x(curl --stderr /dev/null 'https://www.apache.org/dist/ant/binaries/?F=0&V=1' | grep -o '<li>.*href="apache-ant-#{versionmask}-bin.tar.gz"' | grep -o "apache-ant-#{versionmask}" | tail -1 | tr -d '\r').chomp
+ %x(curl -L --stderr /dev/null 'https://downloads.apache.org/ant/binaries/?F=0&V=1' | grep -o '<li>.*href="apache-ant-#{versionmask}-bin.tar.gz"' | grep -o "apache-ant-#{versionmask}" | tail -1 | tr -d '\r').chomp
end
end
diff --git a/bigtop_toolchain/lib/puppet/parser/functions/latest_maven_binary.rb b/bigtop_toolchain/lib/puppet/parser/functions/latest_maven_binary.rb
index ceeb959..ff92b91 100644
--- a/bigtop_toolchain/lib/puppet/parser/functions/latest_maven_binary.rb
+++ b/bigtop_toolchain/lib/puppet/parser/functions/latest_maven_binary.rb
@@ -17,6 +17,6 @@ module Puppet::Parser::Functions
newfunction(:latest_maven_binary, :type => :rvalue) do |args|
versionmask=args[0]
# We are using main mirror here because can't be sure about Apache Server config on every mirror. It could be Nginx, btw.
- %x(curl --stderr /dev/null 'https://www.apache.org/dist/maven/maven-3/?F=0&V=1' | grep -o '<li>.*href="#{versionmask}/"' | tail -1 | grep -o '#{versionmask}'| tr -d '\r').chomp
+ %x(curl -L --stderr /dev/null 'https://downloads.apache.org/maven/maven-3/?F=0&V=1' | grep -o '<li>.*href="#{versionmask}/"' | tail -1 | grep -o '#{versionmask}'| tr -d '\r').chomp
end
end