Skip to content
This repository has been archived by the owner on Dec 18, 2021. It is now read-only.

Support authentication on artifacts download location #86

Merged
merged 6 commits into from Feb 18, 2019

Conversation

vdotjansen
Copy link

Many servers cannot access the internet directly. I would like our ci server to be able to use mvnw. We use a maven repository (artifactory) to cache and validate artifacts we download. our artifactory is password protected and has different rights based on the users. I have added authentication based on environment variables as including the username and password in the URL would exposes our user and password with way too much rights.

elif command -v curl > /dev/null; then
if [ "$MVNW_VERBOSE" = true ]; then
echo "Found curl ... using curl"
fi
curl -o "$wrapperJarPath" "$jarUrl"
if [ -z "$MVNW_WRAPPER_AUTH_USERNAME" ] || [ -z "$MVNW_WRAPPER_AUTH_PASSWORD" ]; then
curl -o "$wrapperJarPath" "$jarUrl" -f
Copy link
Author

Choose a reason for hiding this comment

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

Added -f to not create a file when the http status is not correct (in my example 401).

@sanderino666
Copy link

I could really use this feature for our company. Here is my upvote!

@mosabua
Copy link
Member

mosabua commented Dec 18, 2018

Could you resolve the conflict so we get this working with TLS 1.2 on Windows (I cant test or develop this on Windows.

Also could you simplify the property names to just MVNW_USERNAME and MVNW_PASSWORD?

Last but not least... does this basically replace #96 .. it seems like this is a much more complete implementation. Am I right or am I missing something?

@mosabua
Copy link
Member

mosabua commented Dec 18, 2018

Once the above items are covered I am hoping to cut a new release soon.

@reinsch82 reinsch82 mentioned this pull request Dec 18, 2018
@mosabua mosabua merged commit a88725d into takari:master Feb 18, 2019
isopov pushed a commit to isopov/maven-wrapper that referenced this pull request Jul 30, 2019
Support authentication on artifacts download location
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants