1

Get dependency error (play application with silhouette) after switching to a new development system.

sbt.version=1.3.3

in build.sbt:

resolvers += Resolver.jcenterRepo
resolvers += "Sonatype snapshots" at "https://oss.sonatype.org/content/repositories/snapshots/"
[error] Error downloading com.atlassian.jwt:jwt-api:2.0.5
[error]   Not found
[error]   Not found
[error]   not found: /Users/robert/.ivy2/local/com.atlassian.jwt/jwt-api/2.0.5/ivys/ivy.xml
[error]   not found: https://repo1.maven.org/maven2/com/atlassian/jwt/jwt-api/2.0.5/jwt-api-2.0.5.pom
RobertJo
  • 121
  • 1
  • 10

1 Answers1

5

The artifact com.atlassian.jwt:jwt-api:2.0.5 seems to be available only from Atlassian's repositories (see https://mvnrepository.com/artifact/com.atlassian.jwt/jwt-api/2.0.5).

Add the following resolver:

resolvers += "Atlassian's Maven Public Repository" at "https://packages.atlassian.com/maven-public/"
cbley
  • 4,538
  • 1
  • 17
  • 32
  • I've tried: resolvers += "Atlassian's Maven Public Repository" at "https://packages.atlassian.com/maven-public/" and resolvers += Resolver.url("Atlassian Maven", new URL("https://packages.atlassian.com/maven-public/"))(Resolver.mavenStylePatterns) without success ... the only thing that works is copying the files to: ~/.ivy2/local/com.atlassian.jwt/jwt-core/2.0.5/* – RobertJo Nov 23 '19 at 11:35
  • sbt tries to resolve local, public, local-preloaded-ivy and local-preloaded. The public url is always https://repo1.maven.org/maven2/com/atlassian/jwt/jwt-core/2.0.1/jwt-core-2.0.5.pom. And there is no such file at this address. Adding an additional resolver does not change anything. Tried this with sbt Versions: 0.13.18, 1.3.2 and 1.3.3, seems that the address https://repro1.maven.org/ is hard coded. – RobertJo Nov 23 '19 at 12:12
  • @RobertJo it works for me. You probably have some settings in your build which change the resolvers inadvertently. Show the output of `inspect resolvers`. – cbley Nov 25 '19 at 12:07
  • `[info] Setting: scala.collection.Seq[sbt.librarymanagement.Resolver] = Vector() [info] Description: [info] The user-defined additional resolvers for automatically managed dependencies. [info] Provided by: [info] Global / resolvers [info] Defined at: [info] (sbt.Classpaths.baseGlobalDefaults) Defaults.scala:2181 [info] Reverse dependencies: [info] externalResolvers [info] Delegates: [info] resolvers [info] ThisBuild / resolvers [info] Global / resolvers [info] Related: [info] Global / resolvers [info] tousrv / resolvers` – RobertJo Nov 25 '19 at 16:12
  • 1
    See, you actually have no additional resolvers defined - the `Vector` is empty. Maybe you only have the resolver defined for a single project of your multi-project build? You need to show us your project - or a minimal project that reproduces the problem. – cbley Nov 25 '19 at 16:26
  • you are right that's it (oh man) thanks a lot! `resolvers in ThisBuild += "Atlassian's Maven Public Repository" at "https://packages.atlassian.com/maven-public/"` fixes it. – RobertJo Nov 25 '19 at 21:00