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

Add support for resolvers with a custom protocol handler #29

Merged
merged 11 commits into from
Mar 11, 2024

Conversation

rolang
Copy link
Contributor

@rolang rolang commented Mar 11, 2024

Hi, we have some resolvers using a custom protocol handler that can be registered globally for example like in this plugin https://github.com/abdolence/sbt-gcs-resolver , but sbt-dependency-updates wasn't able to pick up updates for those.

After a closer look it seemed to work with http/https only, so I tried to make it work with custom handler and came up with this update.
Have been using it locally for some time now and it seems to work well.

}

override def getVersions(
organization: String,
artifactId: String,
attrs: Map[String, String]
): Future[Seq[ArtifactVersion]] = {
val location =
protocol + Paths.get(base, organization.split('.').mkString("/"), artifactId, "maven-metadata.xml").toString
val location = new URI(s"$protocol$base/${organization.split('.').mkString("/")}/$artifactId/maven-metadata.xml")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed this because it was failing on windows due to \ in the file path

@aiyanbo aiyanbo merged commit 9a7aab0 into aiyanbo:master Mar 11, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants