rewrite icon indicating copy to clipboard operation
rewrite copied to clipboard

Deprecate `MavenPomDownloader` constructors

Open knutwannheden opened this issue 10 months ago • 2 comments

The current MavenPomDownloader constructors are a bit confusing, especially since one of them is specific to Gradle and the others are intended to be used for Maven. (The difference being that in the Gradle case Maven Central and Maven Local should not be automatically added as repos.)

There are various ways to improve this. The simplest thing would be to make the constructors private and provide factory methods with "Maven" and "Gradle" in their names. There are probably other better options.

knutwannheden avatar Feb 27 '25 10:02 knutwannheden

Another option would be to have the Maven marker carry all repositories, including any default ones like Maven Central.

shanman190 avatar Feb 27 '25 15:02 shanman190

One deprecated constructor was already marked private as part of

  • https://github.com/openrewrite/rewrite/pull/5324

That still leaves three public, and one private constructor for now: https://github.com/openrewrite/rewrite/blob/ae69105d4df3ef3d981fdab270008621baf27db9/rewrite-maven/src/main/java/org/openrewrite/maven/internal/MavenPomDownloader.java#L90-L145

timtebeek avatar May 04 '25 11:05 timtebeek

This issue is stale because it has not had any activity for 60 days. Remove question label or comment or this will be closed in two weeks. Issues may be reopened when there is renewed interest.

github-actions[bot] avatar Jul 28 '25 11:07 github-actions[bot]