-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CASSANDRA-16597 - introduce Maven wrapper to the build process for Maven-less environments #963
base: trunk
Are you sure you want to change the base?
Conversation
676f855
to
936f783
Compare
936f783
to
ddac95d
Compare
eef53eb
to
c3593d9
Compare
…ven-less build environments
c3593d9
to
bc5f1cd
Compare
while IFS="=" read key value; do | ||
case "$key" in (wrapperUrl) jarUrl="$value"; break ;; | ||
esac | ||
done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could source the file; its bash compatible
source "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties"
echo "$jarUrl"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bear in mind this is just a copy of an upstream script: https://github.com/takari/maven-wrapper/blob/master/mvnw
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah Mick is right, this is what upstream contains ... I do not think we are going to mess with that and introduce some custom stuff into it.
if command -v wget > /dev/null; then | ||
if [ "$MVNW_VERBOSE" = true ]; then | ||
echo "Found wget ... using wget" | ||
fi | ||
if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then | ||
wget "$jarUrl" -O "$wrapperJarPath" | ||
else | ||
wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath" | ||
fi | ||
elif command -v curl > /dev/null; then | ||
if [ "$MVNW_VERBOSE" = true ]; then | ||
echo "Found curl ... using curl" | ||
fi | ||
if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then | ||
curl -o "$wrapperJarPath" "$jarUrl" -f | ||
else | ||
curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f | ||
fi | ||
|
||
else |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we not just use curl
? curl
is on most systems (wget
is not), so we could simplify this to just be the curl command. By doing this we can also drop the MavenWrapperDownloader
class all together (less to support)
if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then | ||
curl -o "$wrapperJarPath" "$jarUrl" -f | ||
else | ||
curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
quote user/pass
Still feeling that all that mix of Ant/Maven configurations should be in long-term simplified - with pure Maven setup. |
5b858d3
to
48b8f1f
Compare
Speculative reads will now be triggered after sampleReadLatency past the replica reads are issued, instead of past queryStartNanoTime
No description provided.