8331113: createJMHBundle.sh support configurable maven repo mirror
Reviewed-by: redestad, erikj
This commit is contained in:
parent
5af6b45eef
commit
ce9eac3819
@ -1,6 +1,6 @@
|
||||
#!/bin/bash -e
|
||||
#
|
||||
# Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@ -29,6 +29,7 @@
|
||||
JMH_VERSION=1.37
|
||||
COMMONS_MATH3_VERSION=3.6.1
|
||||
JOPT_SIMPLE_VERSION=5.0.4
|
||||
MAVEN_MIRROR=${MAVEN_MIRROR:-https://repo.maven.apache.org/maven2}
|
||||
|
||||
BUNDLE_NAME=jmh-$JMH_VERSION.tar.gz
|
||||
|
||||
@ -41,7 +42,7 @@ cd $JAR_DIR
|
||||
rm -f *
|
||||
|
||||
fetchJar() {
|
||||
url="https://repo.maven.apache.org/maven2/$1/$2/$3/$2-$3.jar"
|
||||
url="${MAVEN_MIRROR}/$1/$2/$3/$2-$3.jar"
|
||||
if command -v curl > /dev/null; then
|
||||
curl -O --fail $url
|
||||
elif command -v wget > /dev/null; then
|
||||
|
Loading…
Reference in New Issue
Block a user