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

Maven POM downloader optimizations #3822

Merged

Conversation

ammachado
Copy link
Contributor

What's changed?

This PR introduces two small optimizations to MavenPomDownloader:

  1. Add a trailing '/' to Maven repository URL checks to avoid HTTP 302 redirects on slow Artifactory instances. Also tag the repository URL as known, if able to connect to it.
  2. When deriving metadata for artifacts present on the local maven repository, consider only successfully downloaded artifacts.

This PR also fixes the counting of deriveMetadata successful calls.

What's your motivation?

Increased latency when working on network restricted environments with slow Artifactory proxies.

Anything in particular you'd like reviewers to focus on?

No.

Anyone you would like to review specifically?

Have you considered any alternatives or workarounds?

No workarounds for environment issues

Any additional context

Checklist

  • I've added unit tests to cover both positive and negative cases
  • I've read and applied the recipe conventions and best practices
  • I've used the IntelliJ IDEA auto-formatter on affected files

@ammachado ammachado marked this pull request as ready for review December 14, 2023 20:42
@timtebeek timtebeek self-requested a review December 14, 2023 21:15
@timtebeek timtebeek added the enhancement New feature or request label Dec 14, 2023
…st\' to the list of required arguments in the constructor
@jkschneider jkschneider merged commit ba1d1fd into openrewrite:main Dec 15, 2023
1 check passed
@timtebeek
Copy link
Contributor

Thanks a lot @ammachado !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants