-
Notifications
You must be signed in to change notification settings - Fork 376
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
UpdateMavenWrapper does not work when the distributionUrl requires credentials #5046
Comments
Welcome back @tylervangorder-8451! 👋 Just to note, the download itself happens later when the It seems like the Maven wrapper itself only supports basic authentication for pulling a distribution, so I'm assuming that if a wrapper were to have been installed into a repository, then you're configuring basic authentication to then pull the distribution as described here? The NOTE: the same issue is present for the |
Hi @shanman190 , Sorry, I forgot to add context: The stacktrace:
These are the same credentials we use in our
And, in fact, the Maven pom downloader is working when using version selectors to download the pom.xml files for the wrapper to pick up the correct, latest version. As a user, It is a reasonable expectation for this to also work when downloading the actual wrapper when the repositoryUrl is specified and requires authentication. That is why I was suggesting that the |
So I've been thinking about this a little bit. I think unfortunately that in order to utilize |
What version of OpenRewrite are you using?
I am using
How are you running OpenRewrite?
Running maven plugin on a single pom.xml project.
The issue
We are attempting to use the UpdateMavenWrapper recipe to add/update the maven wrapper and specifying the follow:
We do not allow any downloads from Maven central and use an Artifactory mirror.
The problem with this recipe is that it is creating a Remote source file using repositoryUrl but has no knowledge of the credentials and fails here:
https://github.com/openrewrite/rewrite/blob/main/rewrite-maven/src/main/java/org/openrewrite/maven/utilities/MavenWrapper.java#L134-L135
This recipe really needs to be Maven Settings-aware (and probably should be using the
MavenArtifactDownloader
to download the distribution)The text was updated successfully, but these errors were encountered: