rtimush / sbt-updates

sbt plugin that can check Maven and Ivy repositories for dependency updates
BSD 3-Clause "New" or "Revised" License
761 stars 55 forks source link

Does this use custom resolvers? #147

Closed zkendall closed 4 years ago

zkendall commented 4 years ago

I tried this plugin out and it only showed results for open-source libraries. None of our own internal dependencies showed up.

We have our resolvers set like

import sbt._

object Common {
...
  val resolvers = Seq(
    "Nexus" at "https://OUR.INTERNAL.net/content/groups/public",
    "Twitter" at "https://maven.twttr.com"
  )
...
}
rtimush commented 4 years ago

In general, looking up updates in internal repositories should work without additional effort. For maven repositories, sbt-updates tries to download maven-metadata.xml (you can see this if you run sbt --debug dependencyUpdates). One possible reason could be that your Nexus server is not set up to rebuild the maven metadata. You can create a scheduled task in Nexus for that, or update metadata when publishing your internal artifacts by using something like sbt-aether-deploy.

Potentially, sbt-updates can also apply the same heuristic as it uses for Ivy repositories where it parses the HTML output — this should be relatively easy to implement.

mosche commented 4 years ago

I was just looking into a similar issue for our private repos. In our case it turns out that the request never reached Nexus behind Cloudflare.

Cloudflare rejects requests with missing User-Agent header because of a Browser Integrity Check that's enabled by default. If that's the case for you, you might want to disable that check using a page rule.

rtimush commented 4 years ago

@mosche, thank you for the hint! I will check and add user agent to the requests the plugin makes.