Handle Nexus Repository Manager mirrors #452
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Purpose of changes
This change allows Webdrivermanager to use Nexus Repository Manager 3 raw repositories as a download mirror.
Problem
We use Nexus Repository Manager as mirror for our webdrivers. The behavior of Nexus is different - the directory listings come from a REST url, for example we set this:
wdm.chromeDriverMirrorUrl=http://nexus.example.com/nexus/service/rest/repository/browse/mirror/chromedriver/Which gives us links that point somewhere else on the Nexus instance, e.g. this:
http://nexus.example.com/repository/mirror/chromedriver/2.40/chromedriver_linux64.zipBecause the driver URL does not
startsWithmirror URL Webdrivermanager refuses to follow these links.Solution
There were three choices (I have currently chosen Option 2), all affecting this line of code:
If you'd prefer me to update the PR with any of the alternate options let me know.
Types of changes
How has this been tested?
I have tested this against our Nexus Repository Manager instance and also against the taobao mirror which continues to work as before.