Thursday, September 5, 2019

Debugging SBT build files

1. How to see dependency tree in sbt?
-Inspect the SBT dependency tree as described in the documentation:
sbt:foo> inspect tree clean

2. Sonatype repos
https://oss.sonatype.org/content/repositories/public/

3. Resolvers
resolvers ++= Seq(
Resolver.sonatypeRepo("releases"),
Resolver.sonatypeRepo("snapshots")
)

3. Why is SBT unable to resolve my dependency?

4.

5. sbt: Dependency Management

6. When the libdeps are not being imported by a resolver check that the resolver is looking for the correct version at the remote repo. Check the Scala compiler and package version number.

val circeVersion = "0.8.0"
resolvers ++= Seq(
  Resolver.sonatypeRepo("releases"),  Resolver.sonatypeRepo("snapshots")
)

libraryDependencies ++= Seq(
  "io.circe" %% "circe-core",  "io.circe" %% "circe-generic",  "io.circe" %% "circe-parser").map(_ % circeVersion)

7. Check the package Scala compiler and package version numbers in the Ivy cache.

 → ls ~/.ivy2/cache/io.circe/circe-core_2.12/jars/
circe-core_2.12-0.8.0.jar

8. Search at the remote repo for the package to see the version numbers that are available.
https://oss.sonatype.org/#nexus-search;quick~circe

No comments:

Post a Comment