Skip to content
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

Open
wants to merge 4 commits into
base: trunk
Choose a base branch
from

Conversation

smiklosovic
Copy link
Contributor

@smiklosovic smiklosovic commented Apr 13, 2021

No description provided.

Comment on lines +219 to +222
while IFS="=" read key value; do
case "$key" in (wrapperUrl) jarUrl="$value"; break ;;
esac
done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties"
Copy link
Contributor

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"

Copy link
Member

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

Copy link
Contributor Author

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.

Comment on lines +231 to +250
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
Copy link
Contributor

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

quote user/pass

@slachiewicz
Copy link
Member

Still feeling that all that mix of Ant/Maven configurations should be in long-term simplified - with pure Maven setup.

adelapena pushed a commit to adelapena/cassandra that referenced this pull request Feb 12, 2024
Speculative reads will now be triggered after sampleReadLatency past the replica reads are issued, instead of
past queryStartNanoTime
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants